xref: /petsc/src/dm/impls/plex/tests/ex30.c (revision 6dd63270497ad23dcf16ae500a87ff2b2a0b7474)
1 const char help[] = "Test memory allocation in DMPlex refinement.\n\n";
2 
3 #include <petsc.h>
4 
5 int main(int argc, char **argv)
6 {
7   DM dm;
8 
9   PetscFunctionBeginUser;
10   PetscCall(PetscInitialize(&argc, &argv, NULL, help));
11   PetscCall(DMCreate(PETSC_COMM_WORLD, &dm));
12   PetscCall(PetscObjectSetName((PetscObject)dm, "BaryDM"));
13   PetscCall(DMSetType(dm, DMPLEX));
14   PetscCall(DMSetFromOptions(dm));
15   PetscCall(DMViewFromOptions(dm, NULL, "-dm_view"));
16   //PetscCall(DMPlexSetRefinementUniform(dm, PETSC_TRUE));
17   //PetscCall(DMRefine(dm, comm, &rdm));
18   //PetscCall(DMPlexConvertOldOrientations_Internal(dm));
19   PetscCall(PetscObjectSetName((PetscObject)dm, "RefinedDM"));
20   PetscCall(PetscObjectSetOptionsPrefix((PetscObject)dm, "ref_"));
21   PetscCall(DMSetFromOptions(dm));
22   PetscCall(DMViewFromOptions(dm, NULL, "-dm_view"));
23   PetscCall(DMDestroy(&dm));
24   PetscCall(PetscFinalize());
25   return 0;
26 }
27 
28 /*TEST
29 
30   test:
31     requires: datafilespath hdf5 double !complex !defined(PETSC_USE_64BIT_INDICES)
32     args: -dm_plex_filename ${DATAFILESPATH}/meshes/hdf5-petsc/petsc-v3.16.0/v1.0.0/barycentricallyrefinedcube.h5 -dm_view ascii::ASCII_INFO_DETAIL -ref_dm_refine 1 -ref_dm_view ascii::ASCII_INFO_DETAIL
33 
34 TEST*/
35