[petsc-users] interpolate HDF5 mesh

Yann JOBIC yann.jobic at univ-amu.fr
Thu Dec 20 08:33:04 CST 2018


Dear Petsc Users,

When i'm using DMPlexCreateBoxMesh, my code works fine. However, when i 
load the "exact" same mesh from an HDF5 file, it's not working anymore 
(Nonlinear solve did not converge due to DIVERGED_FNORM_NAN iterations 0).

The mesh view when i use DMPlexCreateBoxMesh looks like (i labeled my 
boudary nodes):

/* generated with DMPlexCreateBoxMesh */
DM Object: Mesh 1 MPI processes
   type: plex
Mesh in 3 dimensions:
   0-cells: 216
   1-cells: 540
   2-cells: 450
   3-cells: 125
Labels:
   Faces: 6 strata with value/size (2 (121), 4 (121), 3 (121), 6 (121), 
5 (121), 7 (121))
   boundary: 1 strata with value/size (1 (602))
   depth: 4 strata with value/size (0 (216), 1 (540), 2 (450), 3 (125))
   Face Sets: 6 strata with value/size (6 (25), 5 (25), 3 (25), 4 (25), 
1 (25), 2 (25))
   marker: 1 strata with value/size (1 (450))

And when i use DMPlexCreateFromFile, or DMLoad, i have :

/* generated with H5 file */
fin label DM
DM Object: Mesh 1 MPI processes
   type: plex
Mesh in 3 dimensions:
   0-cells: 216
   1-cells: 540
   2-cells: 450
   3-cells: 125
Labels:
   Faces: 6 strata with value/size (2 (121), 4 (121), 6 (121), 7 (121), 
5 (121), 3 (121))
   boundary: 1 strata with value/size (1 (602))
   depth: 4 strata with value/size (0 (216), 1 (540), 2 (450), 3 (125))

It looks like my DM is not interpolated. Am i wrong ?

It's strange, because when i use DMPlexCreateFromFile, i put PETSC_TRUE 
for interpolation.

Even after loading the mesh, i used DMPlexInterpolate, which return a 
new DM (not null).

Do you know what's happening here ?
Maybe my DIVERGED_FNORM_NAN comes from another part of the code ? 
(however only the mesh is changing)

Thanks,

Yann


More information about the petsc-users mailing list