[petsc-users] DMPlexCreateFromDAG and orientation

Yann Jobic yann.jobic at univ-amu.fr
Sun Nov 19 15:59:00 CST 2017


Hello,

I want to create my custom DMPLEX by using DMPlexCreateFromDAG(). I 
tried with only one cell. I have :

   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






More information about the petsc-users mailing list