[petsc-users] How to construct DMPlex of cells with different topological dimension?
袁煕
yuanxi at advancesoft.jp
Thu Oct 28 21:48:47 CDT 2021
Dear Matt,
My mesh is something like the following figure, which is composed of
three elements : one hexahedron(solid element), one quadrilateral (shell
element), and one line (beam element). I found the function "TestEmptyStrata"
in file \dm\impls\plex\tests\ex11.c would be a good example to read in such
a kind of mesh by using DMPlexSetCone. But a problem is that you should
declare all faces and edges of hexahedron element, all edges in
quadrilateral element by DMPlexSetCone, otherwise PETsc could not do
topological interpolation afterwards. Am I right here?
As general in FEM mesh, my mesh does not contain any information about faces
or edges of solid elements. That's why I consider using DMCOMPOSITE. That is
- Put hexahedron, quadrilateral, and line elements into different DM
structures.
- do topological interpolation in those DMs separately.
- composite them.
Is there anything wrong in my above consideration? Any suggestions?
------------
/| /|
/ | / | cell 0: Hex
/ | / |
------------/ |
| | | |
| | | | cell 1: Quad
| --------|---|------------
| / | / /
| / | / /
|/ |/ /
-------------------------------------------
cell 2: line
Much thanks for your help.
Yuan
2021年10月28日(木) 22:05 Matthew Knepley <knepley at gmail.com>:
> On Thu, Oct 28, 2021 at 4:59 AM 袁煕 <yuanxi at advancesoft.jp> wrote:
>
>> Dear Matt,
>>
>> Thank you for your quick response.
>>
>> I think what you mean is to build DAG from my mesh at first and then call
>> DMPlexCreateFromDAG
>> <https://petsc.org/main/docs/manualpages/DMPLEX/DMPlexCreateFromDAG.html#DMPlexCreateFromDAG>()
>> to construct DMPlex.
>>
>
> No, I do not mean that.
>
>
>> A new problem is, as I know, the function DMPlexInterpolate would
>> generate points with different depth. What's the difference between those
>> faces and segment elements generated by DMPlexInterpolate with that
>> defined by the original mesh, or should we not use DMPlexInterpolate in
>> such a case?
>>
>> On the other hand, can DMComposite be used in this case by defining
>> DMPlex with different topological dimensions at first and then composite
>> them?
>>
>
> You do not need that. I am obviously not understanding your question. My
> short answer is that Plex _already_ handles cells of different
> dimension automatically without anything extra.
>
> Maybe it would help if you defined a specific problem you have.
>
> Thanks,
>
> Matt
>
>
>> Thanks in advance.
>>
>> Yuan
>>
>>
>> 2021年10月27日(水) 19:27 Matthew Knepley <knepley at gmail.com>:
>>
>>> On Wed, Oct 27, 2021 at 4:50 AM 袁煕 <yuanxi at advancesoft.jp> wrote:
>>>
>>>> Hi,
>>>>
>>>> I am trying to parallelize my serial FEM program using PETSc. This
>>>> program calculates structure deformation by using various types of elements
>>>> such as solid, shell, beam, and truss. At the very beginning, I found it
>>>> was hard for me to put such kinds of elements into DMPlex. Because solid
>>>> elements are topologically three dimensional, shell element two, and beam
>>>> or truss are topologically one-dimensional elements. After reading chapter
>>>> 2.10: "DMPlex: Unstructured Grids in PETSc" of users manual carefully, I
>>>> found the provided functions, such as DMPlexSetCone, cannot declare those
>>>> topological differences.
>>>>
>>>> My question is : Is it possible and how to define all those
>>>> topologically different elements into a DMPlex struct?
>>>>
>>>
>>> Yes. The idea is to program in a dimension-independent way, so that the
>>> code can handle cells of any dimension.
>>> What you probably want is the "depth" in the DAG representation, which
>>> you can think of as the dimension of a cell.
>>>
>>>
>>> https://petsc.org/main/docs/manualpages/DMPLEX/DMPlexGetPointDepth.html#DMPlexGetPointDepth
>>>
>>> Thanks,
>>>
>>> Matt
>>>
>>>
>>>> Thanks in advance!
>>>>
>>>> Best regards,
>>>>
>>>> Yuan.
>>>>
>>>>
>>>
>>> --
>>> 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://www.cse.buffalo.edu/~knepley/
>>> <http://www.cse.buffalo.edu/~knepley/>
>>>
>>
>
> --
> 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://www.cse.buffalo.edu/~knepley/
> <http://www.cse.buffalo.edu/~knepley/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211029/cf7fb6a6/attachment-0001.html>
More information about the petsc-users
mailing list