[petsc-users] Inquiry about reading an exodus II file from coreform Cubit
Matthew Knepley
knepley at gmail.com
Sun Sep 22 10:13:01 CDT 2024
On Sun, Sep 22, 2024 at 9:26 AM Blaise Bourdin <bourdin at mcmaster.ca> wrote:
> On Sep 21, 2024, at 9:54 AM, neil liu <liufield at gmail.com> wrote:
>
> Caution: External email.
>
> Thanks a lot, David. That works.
> Then I tried another example from Cubit. The script is defined as follows,
>
> reset
> brick x 1
> mesh vol 1
> block 1 volume 1
> sideset 1 surface 1
> block 2 surface 1 #sides of these elements can now be referenced in a
> sideset
> block 2 element type quad
> sideset 2 curve 1
>
> Then the mesh was exported as a exodus file (attached), and imported into
> Petsc.
> Here, the code was stuck by the function, DMPlexCreateExodus().
> I think maybe this is due to block 1 is 3D while block 2 is 2D.
> But this seems necessary to define an edge using sideset.
>
>
>
> That is corrrect.
> As far as I understand, one of the few assumptions in dmplex is that
> “cells” have the same topological dimension
> Here sideset 1 and 2 have different dimensions.
> As far as I remember, exodusII does not have “Edge sets”, so your best bet
> would be to define a node set for curve 1.
>
It is, of course, possible to mark edges. The problem is that ExodusII
makes it very hard to connect the edges in your sideset
to edges in the actual mesh, which is really what you want. This, in my
opinion, is why ExodusII is a failure as a mesh format.
If we can explain, I you can make this connection, I have no problem
writing this code.
Thanks,
Matt
> Regards,
> Blaise
>
>
> Thanks,
>
> Xiaodong
>
> On Fri, Sep 20, 2024 at 3:15 PM David Andrs <andrsd at gmail.com> wrote:
>
>> Before you export the mesh from Cubit, change the element type to
>> something like QUAD4. PETSc does not automatically remap SHELL elements to
>> QUADs.
>>
>> --
>> David
>>
>> On Fri, Sep 20, 2024 at 8:05 AM neil liu <liufield at gmail.com> wrote:
>>
>>> Dear Petsc developers and users,
>>>
>>> I am trying to read an exodus II file from coreform cubit, but without
>>> success,
>>> Then I used petsc's built-in exodus file,
>>> /share/petsc/datafiles/meshes/sevenside.exo.
>>> This file can be read by petsc successfully.
>>>
>>> And I did a test. This file, sevenside.exo, is imported into coreform
>>> Cubit, and then is saved as a new exodus file. This new exodus file can not
>>> be read by petsc successfully.
>>>
>>> [0]PETSC ERROR: Invalid argument
>>> [0]PETSC ERROR: Unrecognized element type SHELL
>>> [0]PETSC ERROR: See https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!dee9Na-tSTsDKqZOWq2BLt5MPj0L04TPre2lr-cwZEDmoI_Cb8bezH_J6E6K7vJynTpnCxV-jbPjt4XvcUgN$
>>> <https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!fcN-KL0rs3WRHNRfT47zioS4djjyXM7OCr32LT2olmZHm3X1NIk-WMdU9-UR3rNotQSpINEm8NrcMtWTCFqKEg$> for
>>> trouble shooting.
>>> [0]PETSC ERROR: Petsc Release Version 3.21.1, Apr 26, 2024
>>> [0]PETSC ERROR: ./app on a arch-linux-c-opt named localhost.localdomain
>>> by xiaodongliu Fri Sep 20 09:36:16 2024
>>> [0]PETSC ERROR: Configure options -download-mumps -download-scalapack
>>> --with-cc=gcc --with-fc=gfortran --with-cxx=g++ --download-fblaslapack
>>> --download-mpich --with-scalar-type=complex --download-triangle
>>> --with-debugging=no --download-parmetis --download-metis -download-ptscotch
>>> --download-bison --download-hdf5
>>> -download-mmg=/home/xiaodongliu/Documents/3rdPartyLib/d5c43d1bcefe598d51428f6a7fee10ec29478b79.tar.gz
>>> --download-ctetgen --download-pragmatic --download-eigen
>>> --download-netcdf=/home/xiaodongliu/Documents/3rdPartyLib/netcdf-c-4.9.2-p1.tar.gz
>>> --download-zlib --download-pnetcdf --download-exodusii
>>> [0]PETSC ERROR: #1 ExodusGetCellType_Internal() at
>>> /home/xiaodongliu/Documents/petsc-with-docs-3.21.1/petsc-3.21.1/src/dm/impls/plex/plexexodusii.c:1470
>>> [0]PETSC ERROR: #2 DMPlexCreateExodus() at
>>> /home/xiaodongliu/Documents/petsc-with-docs-3.21.1/petsc-3.21.1/src/dm/impls/plex/plexexodusii.c:1551
>>> [0]PETSC ERROR: #3 DMPlexCreateExodusFromFile() at
>>> /home/xiaodongliu/Documents/petsc-with-docs-3.21.1/petsc-3.21.1/src/dm/impls/plex/plexexodusii.c:1390
>>>
>>> Thanks a lot.
>>>
>>> Xiaodong
>>> Compose:
>>> Inquiry about reading an exodus II file from coreform Cubit
>>> [image: Minimize][image: Pop-out][image: Close]
>>> PETSc users list
>>>
>> <test.e>
>
>
> —
> Canada Research Chair in Mathematical and Computational Aspects of Solid
> Mechanics (Tier 1)
> Professor, Department of Mathematics & Statistics
> Hamilton Hall room 409A, McMaster University
> 1280 Main Street West, Hamilton, Ontario L8S 4K1, Canada
> https://urldefense.us/v3/__https://www.math.mcmaster.ca/bourdin__;!!G_uCfscf7eWS!dee9Na-tSTsDKqZOWq2BLt5MPj0L04TPre2lr-cwZEDmoI_Cb8bezH_J6E6K7vJynTpnCxV-jbPjtwBSB1Pe$
> <https://urldefense.us/v3/__https://www.math.mcmaster.ca/bourdin__;!!G_uCfscf7eWS!YzPMMkfECQSktMgrUW3j1dP4pRrFZsFoSZr4r1lMwOE0lcYkNEJEHlB34fIrchVhFTlsruN-Tkb6S6JqWMbuqXTM$>
> | +1 (905) 525 9140 ext. 27243
>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!dee9Na-tSTsDKqZOWq2BLt5MPj0L04TPre2lr-cwZEDmoI_Cb8bezH_J6E6K7vJynTpnCxV-jbPjt7Gu_5vo$ <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!dee9Na-tSTsDKqZOWq2BLt5MPj0L04TPre2lr-cwZEDmoI_Cb8bezH_J6E6K7vJynTpnCxV-jbPjt1y3jn5O$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20240922/8cfbb2a7/attachment-0001.html>
More information about the petsc-users
mailing list