Actual source code: ex49.c

  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: {
  8:   DM             dm;
  9:   PetscInt       dim;

 11:   PetscInitialize(&argc,&argv,(char*)0,help);
 12:   dim = 1;
 13:   PetscOptionsGetInt(NULL,NULL,"-dim",&dim,NULL);
 14:   DMCreate(PETSC_COMM_WORLD,&dm);
 15:   DMSetType(dm,DMPRODUCT);
 16:   DMSetDimension(dm,dim);
 17:   DMSetFromOptions(dm);
 18:   DMSetUp(dm);
 19:   DMDestroy(&dm);
 20:   PetscFinalize();
 21:   return 0;
 22: }

 24: /*TEST

 26:    test:
 27:       suffix: basic_1

 29: TEST*/