<div dir="ltr"><div>Hi everyone,</div><div><br></div><div>I am learning how to use the `DMAdaptLabel` for `DMPlex`, and found the example `src/dm/impls/plex/tests/ex20.c` which label one cell to refine. </div><div><br></div><div>1. This example is just a uniform refinement when using the following command. (see attached pdfs for the results).</div><div>```</div><div>[real-int32-gcc] z2yang@ws5:~/opt/firedrake/real-int32-gcc/petsc/src/dm/impls/plex/tests$ ./ex20 -dm_plex_box_faces 3,3 -dm_coord_space 0 -pre_adapt_dm_view ascii::ascii_info -post_adapt_dm_view draw:tikz:figure2.tex<br></div><div>```</div><div> Is this expected for this example?</div><div><br></div><div>2. I found there is a function named `DMAdaptLabel_Plex`, and `DMAdaptLabel` did not call that function when the type of the dm is `DMPlex`. Is the function `DMAdaptLabel_Plex` still in use?</div><div><br></div><div>3. `DMAdaptLabel` seems to lack some useful information when I use the wrong adaptor. For example, if I set `-dm_adaptor mmg`, then the process will give a segment fault because the `metric` passed to `DMAdaptMetric_Mmg_Plex` is NULL, see the output below:</div><div>```</div><div>[real-int32-gcc] z2yang@ws5:~/opt/firedrake/real-int32-gcc/petsc/src/dm/impls/plex/tests$ ./ex20 -dm_plex_box_faces 3,3 -dm_coord_space 0 -pre_adapt_dm_view draw:tikz:figure1.tex -post_adapt_dm_view draw:tikz:figure2.tex -dm_adaptor mmg<br>[0]PETSC ERROR: ------------------------------------------------------------------------<br>[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range<br>[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger<br>[0]PETSC ERROR: or see <a href="https://petsc.org/release/faq/#valgrind">https://petsc.org/release/faq/#valgrind</a> and <a href="https://petsc.org/release/faq/">https://petsc.org/release/faq/</a><br>[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run<br>[0]PETSC ERROR: to get more information on the crash.<br>[0]PETSC ERROR: Run with -malloc_debug to check if memory corruption is causing the crash.<br>Abort(59) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0<br></div><div>```</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr">Thanks,</div><div dir="ltr">Zongze Yang</div></div></div></div></div>