Hi everyone, 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.
1. This example is just a uniform refinement when using the following command. (see attached pdfs for the results). ``` [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 ``` Is this expected for this example? 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? 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: ``` [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 [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range [0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger [0]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind and https://petsc.org/release/faq/ [0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run [0]PETSC ERROR: to get more information on the crash. [0]PETSC ERROR: Run with -malloc_debug to check if memory corruption is causing the crash. Abort(59) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0 ``` Thanks, Zongze Yang
pre_adapt.pdf
Description: Adobe PDF document
post_adapt.pdf
Description: Adobe PDF document
