[petsc-users] DMPlexCreateFromDAG and orientation
Yann Jobic
yann.jobic at univ-amu.fr
Mon Nov 20 15:50:39 CST 2017
Hi,
Finally i used DMPlexCreateFromCellList, i don't know why i didn't try
it first. I indeed create hex cells (so far).
And it works !
Thanks for the help,
Yann
Le 20/11/2017 à 14:47, Matthew Knepley a écrit :
> On Sun, Nov 19, 2017 at 4:59 PM, Yann Jobic <yann.jobic at univ-amu.fr
> <mailto:yann.jobic at univ-amu.fr>> wrote:
>
> Hello,
>
> I want to create my custom DMPLEX by using DMPlexCreateFromDAG().
> I tried with only one cell. I have :
>
>
> It looks like a hex cell. Here is how I order hex cells:
>
> https://bitbucket.org/petsc/petsc/src/d89bd21cf2b5366df29efb6006298d2bc22fb509/src/dm/impls/plex/plexinterpolate.c?at=master&fileviewer=file-view-default#plexinterpolate.c-113
>
> The first four vertices are on the bottom, last four on the top. Those
> faces start with vertices right above each other, and
> the faces have outward orientation. You can check your structure by
> looking at the faces specified above, and see if it
> matches yours, with outward orientation for all.
>
> Eventually me, or someone, will draw pictures of these for the manual.
>
> Thanks,
>
> Matt
>
> type: plex
> Mesh 'DM_0x3dd7df0_0':
> orientation is missing
> cap --> base:
> [0] Max sizes cone: 8 support: 1
> [0]: 1 ----> 0
> [0]: 2 ----> 0
> [0]: 3 ----> 0
> [0]: 4 ----> 0
> [0]: 5 ----> 0
> [0]: 6 ----> 0
> [0]: 7 ----> 0
> [0]: 8 ----> 0
> base <-- cap:
> [0]: 0 <---- 1 (0)
> [0]: 0 <---- 5 (0)
> [0]: 0 <---- 7 (0)
> [0]: 0 <---- 3 (0)
> [0]: 0 <---- 2 (0)
> [0]: 0 <---- 6 (0)
> [0]: 0 <---- 8 (0)
> [0]: 0 <---- 4 (0)
> coordinates with 1 fields
> field 0 with 3 components
> Process 0:
> ( 1) dim 3 offset 0 0. 0. 0.
> ( 2) dim 3 offset 3 0. 0. 0.01
> ( 3) dim 3 offset 6 0. 0.01 0.
> ( 4) dim 3 offset 9 0. 0.01 0.01
> ( 5) dim 3 offset 12 0.01 0. 0.
> ( 6) dim 3 offset 15 0.01 0. 0.01
> ( 7) dim 3 offset 18 0.01 0.01 0.
> ( 8) dim 3 offset 21 0.01 0.01 0.01
>
>
> Which is not correct when i'm trying to see the DM in visit. I
> tried one from the example ex4.c, which gives :
>
> base <-- cap:
> [0]: 0 <---- 1 (0)
> [0]: 0 <---- 2 (0)
> [0]: 0 <---- 3 (0)
> [0]: 0 <---- 4 (0)
> [0]: 0 <---- 5 (0)
> [0]: 0 <---- 6 (0)
> [0]: 0 <---- 7 (0)
> [0]: 0 <---- 8 (0)
> coordinates with 1 fields
> field 0 with 3 components
> Process 0:
> ( 1) dim 3 offset 0 -1. -1. -1.
> ( 2) dim 3 offset 3 -1. 1. -1.
> ( 3) dim 3 offset 6 1. 1. -1.
> ( 4) dim 3 offset 9 1. -1. -1.
> ( 5) dim 3 offset 12 -1. -1. 1.
> ( 6) dim 3 offset 15 1. -1. 1.
> ( 7) dim 3 offset 18 1. 1. 1.
> ( 8) dim 3 offset 21 -1. 1. 1.
>
> And this one is perfect.
>
> I may have a problem with the "cone orientation", but i really
> don't understand how to set it. I tried the use DMPlexOrient(),
> but i still have the problem.
>
> However, my connectivity looks good. What i am doing wrong ? This
> is even more complicated when i have two cells sharing a face.
>
> Thanks for the help !
>
> Regards,
>
> Yann
>
>
>
>
>
>
>
> --
> 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.caam.rice.edu/%7Emk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171120/3d8d8e9b/attachment.html>
More information about the petsc-users
mailing list