Actual source code: ex49.c
petsc-3.13.6 2020-09-29
1: static char help[] = "Test basic DMProduct operations.\n\n";
3: #include <petscdm.h>
4: #include <petscdmproduct.h>
6: int main(int argc,char **argv)
7: {
9: DM dm;
10: PetscInt dim;
12: PetscInitialize(&argc,&argv,(char*)0,help);if (ierr) return ierr;
13: dim = 1;
14: PetscOptionsGetInt(NULL,NULL,"-dim",&dim,NULL);
15: DMCreate(PETSC_COMM_WORLD,&dm);
16: DMSetType(dm,DMPRODUCT);
17: DMSetDimension(dm,dim);
18: DMSetFromOptions(dm);
19: DMSetUp(dm);
20: DMDestroy(&dm);
21: PetscFinalize();
22: return ierr;
23: }
25: /*TEST
27: test:
28: suffix: basic_1
30: TEST*/