<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, May 29, 2017 at 5:13 PM, Adrian Croucher <span dir="ltr"><<a href="mailto:a.croucher@auckland.ac.nz" target="_blank">a.croucher@auckland.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hi,<br>
<br>
I was asking about support for exactly these 6-node wedge elements in DMPlex back in January.<br>
<br>
At the time, there was no support for them. Has there been some progress since then?<br>
<br>
We are going to need them before we can release our software, which we're aiming to do by the end of the year.<br></blockquote><div><br></div><div>Sorry about not keeping up to date on that. I had not really thought about it working until Fabian suggested it.</div><div>So, it looks like XDMF output works. I am making a test now.</div><div><br></div><div>However, other stuff will not, like refinement, interpolation, cell geometry, and other discretization stuff.</div><div><br></div><div>What do you need working?</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cheers, Adrian<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Message: 4<br>
Date: Fri, 26 May 2017 22:40:40 -0500<br>
From: Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>><br>
To: "Fabian.Jakub" <<a href="mailto:Fabian.Jakub@physik.uni-muenchen.de" target="_blank">Fabian.Jakub@physik.uni-muenc<wbr>hen.de</a>><br>
Cc: PETSc <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>><br>
Subject: Re: [petsc-users] DMPlex export to hdf5/vtk for<br>
        triangle/prism mesh<br>
Message-ID:<br>
        <CAMYG4GkVOTtFL_OBpUBPGEcBTikM<wbr>bLOb5ruz=<a href="mailto:VU7tVTO6JQHTQ@mail.gmail.com" target="_blank">VU7tVTO6JQHTQ@mail.<wbr>gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<div><div class="h5"><br>
<br>
On Fri, May 26, 2017 at 12:27 PM, Fabian.Jakub <<br>
<a href="mailto:Fabian.Jakub@physik.uni-muenchen.de" target="_blank">Fabian.Jakub@physik.uni-muench<wbr>en.de</a>> wrote:<br>
<br>
> Dear Petsc Team,<br>
><br>
> I am playing around with DMPlex, using it to generate the Mesh for the<br>
> ICON weather model(<a href="http://doi.org/10.1002/2015MS000431" rel="noreferrer" target="_blank">http://doi.org/10.1002/2<wbr>015MS000431</a>), which employs a<br>
> triangle mesh horizontally and columns, vertically.<br>
><br>
> This results in a grid, looking like prisms, where top and bottom faces<br>
> are triangles and side faces are rectangles.<br>
><br>
> I was delighted to see that I could export the triangle DMPlex (2d Mesh)<br>
> to hdf5 and use petsc_gen_xdmf.py to then visualize the mesh in<br>
> visit/paraview.<br>
> This is especially nice when exporting petscsections/vectors directly to<br>
> VTK.<br>
><br>
<br>
Great.<br>
<br>
<br>
> I then tried the same approach for the prism grid in 3D.<br>
> I attached the code for one single cell, as well as the output in hdf5.<br>
><br>
> However, trying to convert the hdf5 output, it fails with:<br>
><br>
> make prism.xmf<br>
><br>
> $PETSC_DIR/bin/petsc_gen_xdmf.<wbr>py prism.h5<br>
> Traceback (most recent call last):<br>
>   File<br>
> "/software/meteo/xenial/x86_64<wbr>/petsc/master/debug_gcc/..//<br>
> bin/petsc_gen_xdmf.py",<br>
> line 241, in <module><br>
>     generateXdmf(f)<br>
>   File<br>
> "/software/meteo/xenial/x86_64<wbr>/petsc/master/debug_gcc/..//<br>
> bin/petsc_gen_xdmf.py",<br>
> line 235, in generateXdmf<br>
>     Xdmf(xdmfFilename).write(hdfF<wbr>ilename, topoPath, numCells,<br>
> numCorners, cellDim, geomPath, numVertices, spaceDim, time, vfields,<br>
> cfields)<br>
>   File<br>
> "/software/meteo/xenial/x86_64<wbr>/petsc/master/debug_gcc/..//<br>
> bin/petsc_gen_xdmf.py",<br>
> line 193, in write<br>
>     self.writeSpaceGridHeader(fp, numCells, numCorners, cellDim, spaceDim)<br>
>   File<br>
> "/software/meteo/xenial/x86_64<wbr>/petsc/master/debug_gcc/..//<br>
> bin/petsc_gen_xdmf.py",<br>
> line 75, in writeSpaceGridHeader<br>
>     ''' % (self.cellMap[cellDim][numCorn<wbr>ers], numCells, "XYZ" if<br>
> spaceDim > 2 else "XY"))<br>
> KeyError: 6<br>
><br>
><br>
> Also, if I try to export a vector directly to vtk, visit and paraview<br>
> fail to open it.<br>
><br>
> My question is:<br>
> Is this a general limitation of these output formats, that I can not mix<br>
> faces with 3 and 4 vertices or is it a limitation of the<br>
> petsc_gen_xdmf.py or the VTK Viewer.<br>
><br>
<br>
petsc_gen_xdmf. Take a look here<br>
<br>
<br>
<a href="https://bitbucket.org/petsc/petsc/src/1731673c3fe570066779d46b51a4aee7a45775ed/bin/petsc_gen_xdmf.py?at=master&fileviewer=file-view-default#petsc_gen_xdmf.py-9" rel="noreferrer" target="_blank">https://bitbucket.org/petsc/pe<wbr>tsc/src/1731673c3fe570066779d4<wbr>6b51a4aee7a45775ed/bin/petsc_<wbr>gen_xdmf.py?at=master&<wbr>fileviewer=file-view-default#<wbr>petsc_gen_xdmf.py-9</a><br>
<br>
This is what fails. You need to add something like<br>
<br>
   6: "Wedge"<br>
<br>
in the dictionary. See <a href="http://www.xdmf.org/index.php/XDMF_Model_and_Format" rel="noreferrer" target="_blank">http://www.xdmf.org/index.php/<wbr>XDMF_Model_and_Format</a><br>
<br>
<br>
> I'd also welcome any thoughts on the prism mesh in general.<br>
> Is it that uncommon to use and do you foresee other complications with it?<br>
><br>
<br>
You need an element that works with prisms, but it seems you already have<br>
one. I know<br>
there is good work from here: <a href="https://arxiv.org/abs/1411.2940" rel="noreferrer" target="_blank">https://arxiv.org/abs/1411.294<wbr>0</a><br>
<br>
<br>
> I fear I cannot change the discretization of the host model but maybe it<br>
> makes sense to use a different grid for my radiative transfer code?<br>
><br>
<br>
I do not really do RT, but would be happy to try and think about it.<br>
<br>
   Thanks,<br>
<br>
      Matt<br>
<br>
<br>
> Many thanks,<br>
><br>
><br>
> Fabian<br>
><br>
<br>
</div></div></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Dr Adrian Croucher<br>
Senior Research Fellow<br>
Department of Engineering Science<br>
University of Auckland, New Zealand<br>
email: <a href="mailto:a.croucher@auckland.ac.nz" target="_blank">a.croucher@auckland.ac.nz</a><br>
tel: <a href="tel:%2B64%20%280%299%20923%204611" value="+6499234611" target="_blank">+64 (0)9 923 4611</a><br>
<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><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/~mk51/" target="_blank">http://www.caam.rice.edu/~mk51/</a><br></div></div></div>
</div></div>