1 static char help[] = "Test basic DMProduct operations.\n\n";
2
3 #include <petscdm.h>
4 #include <petscdmproduct.h>
5
main(int argc,char ** argv)6 int main(int argc, char **argv)
7 {
8 DM dm;
9 PetscInt dim;
10
11 PetscFunctionBeginUser;
12 PetscCall(PetscInitialize(&argc, &argv, NULL, help));
13 dim = 1;
14 PetscCall(PetscOptionsGetInt(NULL, NULL, "-dim", &dim, NULL));
15 PetscCall(DMCreate(PETSC_COMM_WORLD, &dm));
16 PetscCall(DMSetType(dm, DMPRODUCT));
17 PetscCall(DMSetDimension(dm, dim));
18 PetscCall(DMSetFromOptions(dm));
19 PetscCall(DMSetUp(dm));
20 PetscCall(DMDestroy(&dm));
21 PetscCall(PetscFinalize());
22 return 0;
23 }
24
25 /*TEST
26
27 test:
28 suffix: basic_1
29 output_file: output/empty.out
30
31 TEST*/
32