[petsc-users] Problem with DMRefine and DMLabel

Santos Teixeira Frederico fsantost at student.ethz.ch
Wed Dec 13 03:30:01 CST 2017


Hi folks,

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.

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

DM Object: DM_0x84000000_0 1 MPI processes
  type: plex
DM_0x84000000_0 in 2 dimensions:
  0-cells: 9
  1-cells: 16
  2-cells: 8
Labels:
  Face Sets: 4 strata with value/size (1 (2), 4 (2), 2 (2), 3 (2))
  marker: 4 strata with value/size (4 (5), 1 (3), 2 (5), 3 (3))
  depth: 3 strata with value/size (0 (9), 1 (16), 2 (8))

which is correct w.r.t. the definition from DMPlexCreateBoxMesh. However, the second output is

DM Object: DM_0x84000000_1 1 MPI processes
  type: plex
DM_0x84000000_1 in 2 dimensions:
  0-cells: 145
  1-cells: 400
  2-cells: 256
Labels:
  marker: 4 strata with value/size (4 (3), 1 (57), 2 (3), 3 (1))
  depth: 3 strata with value/size (0 (145), 1 (400), 2 (256))

Note that the label "Face Sets" disappeared and that the label "marker" does not include all the boundary points.
The full set of options is:

-run_type full
-refinement_limit 0.005
-simplex 1
-dm_view
-dm_plex_separate_marker
-interpolate 1
-vel_petscspace_order 2
-pres_petscspace_order 1
-ksp_view
-ksp_monitor
-ksp_type fgmres
-ksp_gmres_restart 10
-ksp_rtol 1.0e-9
-pc_type fieldsplit
-pc_fieldsplit_type schur
-pc_fieldsplit_schur_factorization_type full
-fieldsplit_pressure_ksp_rtol 1e-10
-fieldsplit_velocity_ksp_type gmres
-fieldsplit_velocity_pc_type lu
-fieldsplit_pressure_pc_type jacobi
-snes_error_if_not_converged
-ksp_error_if_not_converged
-snes_view
-snes_monitor

Am I missing anything?

Regards,
 Fred.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20171213/1e22429d/attachment-0001.html>


More information about the petsc-users mailing list