<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi,<br>
<br>
Finally i used DMPlexCreateFromCellList, i don't know why i didn't
try it first. I indeed create hex cells (so far).<br>
And it works !<br>
<br>
Thanks for the help,<br>
<br>
Yann<br>
<br>
Le 20/11/2017 à 14:47, Matthew Knepley a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAMYG4G=zPD1Pvu8WeP_QnMQBX1FCCYaGxKE-7HV2N9-LNYF0bA@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Sun, Nov 19, 2017 at 4:59 PM, Yann
Jobic <span dir="ltr"><<a
href="mailto:yann.jobic@univ-amu.fr" target="_blank"
moz-do-not-send="true">yann.jobic@univ-amu.fr</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
I want to create my custom DMPLEX by using
DMPlexCreateFromDAG(). I tried with only one cell. I have
:<br>
</blockquote>
<div><br>
</div>
<div>It looks like a hex cell. Here is how I order hex
cells:</div>
<div><br>
</div>
<div><a
href="https://bitbucket.org/petsc/petsc/src/d89bd21cf2b5366df29efb6006298d2bc22fb509/src/dm/impls/plex/plexinterpolate.c?at=master&fileviewer=file-view-default#plexinterpolate.c-113"
moz-do-not-send="true">https://bitbucket.org/petsc/petsc/src/d89bd21cf2b5366df29efb6006298d2bc22fb509/src/dm/impls/plex/plexinterpolate.c?at=master&fileviewer=file-view-default#plexinterpolate.c-113</a><br>
</div>
<div><br>
</div>
<div>The first four vertices are on the bottom, last four on
the top. Those faces start with vertices right above each
other, and</div>
<div>the faces have outward orientation. You can check your
structure by looking at the faces specified above, and see
if it</div>
<div>matches yours, with outward orientation for all.</div>
<div><br>
</div>
<div>Eventually me, or someone, will draw pictures of these
for the manual.</div>
<div><br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
type: plex<br>
Mesh 'DM_0x3dd7df0_0':<br>
orientation is missing<br>
cap --> base:<br>
[0] Max sizes cone: 8 support: 1<br>
[0]: 1 ----> 0<br>
[0]: 2 ----> 0<br>
[0]: 3 ----> 0<br>
[0]: 4 ----> 0<br>
[0]: 5 ----> 0<br>
[0]: 6 ----> 0<br>
[0]: 7 ----> 0<br>
[0]: 8 ----> 0<br>
base <-- cap:<br>
[0]: 0 <---- 1 (0)<br>
[0]: 0 <---- 5 (0)<br>
[0]: 0 <---- 7 (0)<br>
[0]: 0 <---- 3 (0)<br>
[0]: 0 <---- 2 (0)<br>
[0]: 0 <---- 6 (0)<br>
[0]: 0 <---- 8 (0)<br>
[0]: 0 <---- 4 (0)<br>
coordinates with 1 fields<br>
field 0 with 3 components<br>
Process 0:<br>
( 1) dim 3 offset 0 0. 0. 0.<br>
( 2) dim 3 offset 3 0. 0. 0.01<br>
( 3) dim 3 offset 6 0. 0.01 0.<br>
( 4) dim 3 offset 9 0. 0.01 0.01<br>
( 5) dim 3 offset 12 0.01 0. 0.<br>
( 6) dim 3 offset 15 0.01 0. 0.01<br>
( 7) dim 3 offset 18 0.01 0.01 0.<br>
( 8) dim 3 offset 21 0.01 0.01 0.01<br>
<br>
<br>
Which is not correct when i'm trying to see the DM in
visit. I tried one from the example ex4.c, which gives :<br>
<br>
base <-- cap:<br>
[0]: 0 <---- 1 (0)<br>
[0]: 0 <---- 2 (0)<br>
[0]: 0 <---- 3 (0)<br>
[0]: 0 <---- 4 (0)<br>
[0]: 0 <---- 5 (0)<br>
[0]: 0 <---- 6 (0)<br>
[0]: 0 <---- 7 (0)<br>
[0]: 0 <---- 8 (0)<br>
coordinates with 1 fields<br>
field 0 with 3 components<br>
Process 0:<br>
( 1) dim 3 offset 0 -1. -1. -1.<br>
( 2) dim 3 offset 3 -1. 1. -1.<br>
( 3) dim 3 offset 6 1. 1. -1.<br>
( 4) dim 3 offset 9 1. -1. -1.<br>
( 5) dim 3 offset 12 -1. -1. 1.<br>
( 6) dim 3 offset 15 1. -1. 1.<br>
( 7) dim 3 offset 18 1. 1. 1.<br>
( 8) dim 3 offset 21 -1. 1. 1.<br>
<br>
And this one is perfect.<br>
<br>
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.<br>
<br>
However, my connectivity looks good. What i am doing wrong
? This is even more complicated when i have two cells
sharing a face.<br>
<br>
Thanks for the help !<br>
<br>
Regards,<br>
<br>
Yann<br>
<br>
<br>
<br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>What most experimenters take for granted before
they begin their experiments is infinitely more
interesting than any results to which their
experiments lead.<br>
-- Norbert Wiener</div>
<div><br>
</div>
<div><a href="http://www.caam.rice.edu/%7Emk51/"
target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<p><br>
</p>
</body>
</html>