<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="moz-cite-prefix">On 05/01/2019 13:23, Matthew Knepley
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAMYG4G==s1+9o3Eto08g-hF7JgwVLnxovMzs_t_Tpp44b4k9OQ@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">On Sat, Jan 5, 2019 at 4:04 AM Yann Jobic <<a
href="mailto:yann.jobic@univ-amu.fr"
moz-do-not-send="true">yann.jobic@univ-amu.fr</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p><br>
</p>
<div class="gmail-m_-6168566035861119409moz-cite-prefix">On
05/01/2019 02:36, Matthew Knepley wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">On Fri, Jan 4, 2019 at 10:04 AM Yann
Jobic via petsc-users <<a
href="mailto:petsc-users@mcs.anl.gov"
target="_blank" moz-do-not-send="true">petsc-users@mcs.anl.gov</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px
0px 0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Dear Petsc
Users,<br>
<br>
I'm using DMPlexCreateFromCellList to create my
DM. I would like to have <br>
an order 2 geometry.<br>
<br>
It's working fine in 2D for elements of type Q9.<br>
</blockquote>
<div><br>
</div>
<div>I do not see how that is possible. The topology
does not work that way, and there</div>
<div>is no way a 9 vertex quad was interpolated, so
something else is happening.</div>
<div><br>
</div>
<div>Moreover, anything you input still has affine
geometry. Toby has been working on</div>
<div>non-affine geometry, and all the code is there,
but right now you have to build and</div>
<div>populate the coordinate space by hand. What
this means is that you create a</div>
<div>quadratic space for the coordinate DM (rather
than the default linear), get the</div>
<div>global coordinate vector out, and stick in the
Q9 coordinates. The topology is still</div>
<div>the same no matter what coordinates you read
in.</div>
</div>
</div>
</blockquote>
<p>I get the idea. So at the beginning i start with the
Q4/H8 dmplex, then i fill from the global coordinate
vector the missing coordinates, and attach this new
coordinate vector to the DM.</p>
</div>
</blockquote>
<div>Yes. <br>
</div>
</div>
</div>
</blockquote>
<p>So far, i can change the PetscSpace order, add this space to a
PetscFE, and finally attach this PetscFE to a PetscDS
(discetization) to my DM.</p>
<p>But if i'm doing that, the middle nodes will already be added (i
couldn't find this function so far, could you point me the name
?). I can still move those middle vertex to my geometry.<br>
</p>
<p>But i couldn't find a way to define the quadratic space for the
coordinate DM before all of that, at the DM (or DMPlex) level.</p>
<p>What way can you advise me to use in order to do that ?</p>
<p>Thank you,</p>
<p>Yann<br>
</p>
<blockquote type="cite"
cite="mid:CAMYG4G==s1+9o3Eto08g-hF7JgwVLnxovMzs_t_Tpp44b4k9OQ@mail.gmail.com">
<div dir="ltr">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Then the interpolation will be correct ?</p>
</div>
</blockquote>
<div>This is the tricky part. What you likely have to do is:</div>
<div><br>
</div>
<div> 1) Build the topology</div>
<div> 2) Run over the cells</div>
<div> 3) For each cell, put in the coordinates using
DMPlexVecSetClosure(). This is redundant, but the only way<br>
</div>
<div> you can connect with the Q9 format.</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p> Can i use DMproject and all the petsc functions ? <br>
</p>
</div>
</blockquote>
<div>This is the idea. The amount of testing is so far almost
nothing. </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p> </p>
<p>In order to output the results, i've got to write my
own vtk interface no ? (by splitting the Q9/H27 in 4xQ4
or 8xH8).</p>
</div>
</blockquote>
<div>That is a good question. Right now, it will just output
Q4. However, compared to everything else, writing Q9 should</div>
<div>be comparatively easy. </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Or is it working with the hdf5 one ?</p>
</div>
</blockquote>
<div>I would probably write code to to Xdmf through HDF5
rather than straight VTK, but we will end up having both.</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Does the p4est interface work with this setup ?</p>
</div>
</blockquote>
<div>It will. I do not know if it currently does. We have to
check.</div>
<div><br>
</div>
<div> Thanks,</div>
<div><br>
</div>
<div> Matt </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote">
<div><br>
</div>
<div>We will get around to making an interface for
this soon.</div>
</div>
</div>
</blockquote>
<p>Great ! <br>
</p>
<p>Thanks,</p>
<p>Yann<br>
</p>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote">
<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"> I checked that
it's working correctly by using <br>
DMPlexComputeCellGeometryFEM, and compute the
value of the determinant <br>
(CheckMeshGeometry of
dm/impls/plex/examples/tutorials/ex2.c)<br>
<br>
I can import H8 elements, it's working fine.<br>
<br>
But for H27 element, it's not working. I really
don't know how to order <br>
my vertex in the cells array. So far, the
determinant is zero...<br>
<br>
I don't know where to look in order to find this
information. I tried <br>
the function DMPlexGetRawFaces_Internal of the
file<br>
<br>
<a
href="https://www.mcs.anl.gov/petsc/petsc-current/src/dm/impls/plex/plexinterpolate.c.html#DMPlexGetRawFaces_Internal"
rel="noreferrer" target="_blank"
moz-do-not-send="true">https://www.mcs.anl.gov/petsc/petsc-current/src/dm/impls/plex/plexinterpolate.c.html#DMPlexGetRawFaces_Internal</a><br>
<br>
but it didn't help me.<br>
<br>
Could you please point me where to look ?<br>
<br>
Thanks, and happy new year !<br>
<br>
Yann<br>
<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr"
class="gmail-m_-6168566035861119409m_-4020022596717474202gmail_signature">
<div dir="ltr">
<div>
<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.cse.buffalo.edu/~knepley/"
target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<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.cse.buffalo.edu/~knepley/"
target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</body>
</html>