Actual source code: ex4.c

petsc-3.12.1 2019-10-22
Report Typos and Errors

  2: static char help[] = "Tests ISToGeneral().\n\n";

  4:  #include <petscis.h>

  6: int main(int argc,char **argv)
  7: {
  9:   PetscInt       step = 2;
 10:   IS             is;

 12:   PetscInitialize(&argc,&argv,(char*)0,help);if (ierr) return ierr;

 14:   PetscOptionsGetInt(NULL,NULL,"-step",&step,NULL);
 15:   ISCreateStride(PETSC_COMM_SELF,10,0,step,&is);

 17:   ISToGeneral(is);

 19:   ISDestroy(&is);

 21:   PetscFinalize();
 22:   return ierr;
 23: }

 25: /*TEST

 27:    test:
 28:      output_file: output/ex1_1.out

 30: TEST*/