[petsc-users] Uninterpolated DMPlex mesh with several depth levels all pointing to nodes only

Matthew Knepley knepley at gmail.com
Tue Mar 6 07:24:45 CST 2018


On Tue, Mar 6, 2018 at 7:23 AM, Emiel van de Ven <emiel.van.de.ven at gmail.com
> wrote:

> Hi All,
>
> When I load a mesh from gmsh into a DM object, and not interpolate it, in
> 3D I only get the nodes and the tetrahedral elements. However, I'd also
> like to retain the faces that I've put under a physical group that contain
> the boundary conditions.
>
> As I understand it, in the function DMPlexCreateGmsh, the faces are
> labeled by looking for the join of the nodes they contain, which only
> exists if the mesh is interpolated.
>
> Is there a way to have faces that point to nodes, and tetrahedrals that
> also directly point to nodes in the same mesh? I was able to hack it in by
> changing DMPlexCreateGmsh, but then I run into trouble during the
> distribution, as that is cell based I believe.
>

Having partial interpolation is usually a bad thing. Lots of algorithms
stop working.


> The reason I don't want to interpolate the mesh is because the mesh can be
> very large, while the boundary conditions only apply to a very small
> portion, so it would be a waste fully interpolating the mesh.
>

Understandable, but this may be premature optimization. If you have a
matrix, it will usually dwarf the size of the mesh. However,
it is not wrong to want to economize.

I might do this:

  1) Make the whole interpolated mesh

  2) Create a boundary submesh

      This will retain all the boundary faces, edges, vertices, and the
adjacent cells. It also has a mapping back to all the components in the
main mesh.
      Use this to carry out your BC operations

  3) Then optionally DMPlexUninterpolate() your main mesh.

       The cell and vertex numbers stay the same under this operation.

If you never ever want to create the whole mesh, you would be forced to do
something complicated
with DMLabel, like map the local face number to the constrained cells with
one label and the BC type
with another label. The label are redistributed with the mesh, so this
would be scalable and automatic,
just more complicated.

In the final analysis, I would first measure the memory taken by a fully
interpolated mesh, and make sure
any complication is worth it. Usually there are reasons to want faces and
edges, and the cost is manageable.

  Thanks,

    Matt


> Thanks,
> Emiel
>



-- 
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/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180306/c3af8327/attachment.html>


More information about the petsc-users mailing list