Actual source code: ex4.c

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

  3: #include <petscis.h>

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

 10:   PetscFunctionBeginUser;
 11:   PetscCall(PetscInitialize(&argc, &argv, NULL, help));

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

 16:   PetscCall(ISToGeneral(is));

 18:   PetscCall(ISDestroy(&is));

 20:   PetscCall(PetscFinalize());
 21:   return 0;
 22: }

 24: /*TEST

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

 29: TEST*/