<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 13, 2017 at 4:30 AM, Santos Teixeira  Frederico <span dir="ltr"><<a href="mailto:fsantost@student.ethz.ch" target="_blank">fsantost@student.ethz.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Hi folks,
<div><br>
</div>
<div>In the example SNES/62.c, when I use "-simplex 1" and "-refinement_limit 0.05", it seems the refined DMPlex does not carry all the labels from the original DM.</div></div></div></blockquote><div><br></div><div>This is correct. Here is the problem. When you use -refinement_limit (instead of -dm_refine), I call Triangle/TetGen to do</div><div>the refinement. They do not tell me how they changed the mesh to get there, so I have no way of propagating the labels.</div><div>There is a special name ("marker") that I was using for the boundary, which I automatically mark after generation.</div><div><br></div><div>We could choose to also mark boundary faces, but it seems redundant. If you want them marked, you can call</div><div>DMPlexMarkBoundaryFaces() on the new mesh. Does this seem reasonable?</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><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
<div>You can see that if you place, in the function CreateMesh, one DMViewFromOptions right after the DMPlexCreateBoxMesh and another DMViewFromOptions after DMRefine. The first output is</div>
<div><br>
</div>
<div>
<div>DM Object: DM_0x84000000_0 1 MPI processes</div>
<div>  type: plex</div>
<div>DM_0x84000000_0 in 2 dimensions:</div>
<div>  0-cells: 9</div>
<div>  1-cells: 16</div>
<div>  2-cells: 8</div>
<div>Labels:</div>
<div>  Face Sets: 4 strata with value/size (1 (2), 4 (2), 2 (2), 3 (2))</div>
<div>  marker: 4 strata with value/size (4 (5), 1 (3), 2 (5), 3 (3))</div>
<div>  depth: 3 strata with value/size (0 (9), 1 (16), 2 (8))</div>
</div>
<div><br>
</div>
<div>which is correct w.r.t. the definition from DMPlexCreateBoxMesh. However, the second output is</div>
<div><br>
</div>
<div>
<div>DM Object: DM_0x84000000_1 1 MPI processes</div>
<div>  type: plex</div>
<div>DM_0x84000000_1 in 2 dimensions:</div>
<div>  0-cells: 145</div>
<div>  1-cells: 400</div>
<div>  2-cells: 256</div>
<div>Labels:</div>
<div>  marker: 4 strata with value/size (4 (3), 1 (57), 2 (3), 3 (1))</div>
<div>  depth: 3 strata with value/size (0 (145), 1 (400), 2 (256))</div>
<div><br>
</div>
<div>Note that the label "Face Sets" disappeared and that the label "marker" does not include all the boundary points.</div>
<div>The full set of options is:</div>
<div><br>
</div>
<div>
<div>-run_type full </div>
<div>-refinement_limit 0.005 </div>
<div>-simplex 1 </div>
<div>-dm_view </div>
<div>-dm_plex_separate_marker </div>
<div>-interpolate 1 </div>
<div>-vel_petscspace_order 2 </div>
<div>-pres_petscspace_order 1 </div>
<div>-ksp_view </div>
<div>-ksp_monitor</div>
<div>-ksp_type fgmres </div>
<div>-ksp_gmres_restart 10 </div>
<div>-ksp_rtol 1.0e-9 </div>
<div>-pc_type fieldsplit </div>
<div>-pc_fieldsplit_type schur </div>
<div>-pc_fieldsplit_schur_<wbr>factorization_type full </div>
<div>-fieldsplit_pressure_ksp_rtol 1e-10 </div>
<div>-fieldsplit_velocity_ksp_type gmres </div>
<div>-fieldsplit_velocity_pc_type lu </div>
<div>-fieldsplit_pressure_pc_type jacobi </div>
<div>-snes_error_if_not_converged </div>
<div>-ksp_error_if_not_converged </div>
<div>-snes_view </div>
<div>-snes_monitor </div>
</div>
<div><br>
</div>
<div>Am I missing anything?</div>
<div><br>
</div>
<div>Regards,</div>
<div> Fred.</div>
</div>
</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>