<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Mar 6, 2018 at 7:23 AM, Emiel van de Ven <span dir="ltr"><<a href="mailto:emiel.van.de.ven@gmail.com" target="_blank">emiel.van.de.ven@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi All,<br><br></div><div>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.<br><br></div><div>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. <br><br>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.<br></div></div></blockquote><div><br></div><div>Having partial interpolation is usually a bad thing. Lots of algorithms stop working.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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.<br></div></div></blockquote><div><br></div><div>Understandable, but this may be premature optimization. If you have a matrix, it will usually dwarf the size of the mesh. However,</div><div>it is not wrong to want to economize.</div><div><br></div><div>I might do this:</div><div><br></div><div> 1) Make the whole interpolated mesh</div><div><br></div><div> 2) Create a boundary submesh</div><div><br></div><div> 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.</div><div> Use this to carry out your BC operations</div><div><br></div><div> 3) Then optionally DMPlexUninterpolate() your main mesh.</div><div><br></div><div> The cell and vertex numbers stay the same under this operation.</div><div><br></div><div>If you never ever want to create the whole mesh, you would be forced to do something complicated</div><div>with DMLabel, like map the local face number to the constrained cells with one label and the BC type</div><div>with another label. The label are redistributed with the mesh, so this would be scalable and automatic,</div><div>just more complicated.</div><div><br></div><div>In the final analysis, I would first measure the memory taken by a fully interpolated mesh, and make sure</div><div>any complication is worth it. Usually there are reasons to want faces and edges, and the cost is manageable.</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"><div dir="ltr"><div></div><div>Thanks,<br></div><div>Emiel<br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="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/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div>