Commits

Lisandro Dalcin committed 567b690

Update tests

Comments (0)

Files changed (4)

test/IGAInputOutput.c

     PetscInt  dim = 3;
     PetscInt  dof = 1;
     PetscBool b[3] = {PETSC_FALSE, PETSC_FALSE, PETSC_FALSE};
-    PetscInt  N[3] = {16,16,16}; 
+    PetscInt  N[3] = {16,16,16};
     PetscInt  p[3] = { 2, 2, 2};
     PetscInt  C[3] = {-1,-1,-1};
     PetscInt  n0=3, n1=3, n2=3, n3=3;
     ierr = PetscOptionsBegin(PETSC_COMM_WORLD,"","InputOutput Options","IGA");CHKERRQ(ierr);
-    ierr = PetscOptionsInt("-dim","dimension",__FILE__,dim,&dim,NULL);CHKERRQ(ierr);
-    ierr = PetscOptionsInt("-dof","dofs/node",__FILE__,dof,&dof,NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsInt("-iga_dim","dimension",__FILE__,dim,&dim,NULL);CHKERRQ(ierr);
+    ierr = PetscOptionsInt("-iga_dof","dofs/node",__FILE__,dof,&dof,NULL);CHKERRQ(ierr);
     n0 = n1 = n2 = n3 = dim;
     ierr = PetscOptionsBoolArray("-periodic","periodicity",     __FILE__,b,&n0,NULL);CHKERRQ(ierr);
     ierr = PetscOptionsIntArray ("-N","number of elements",     __FILE__,N,&n1,NULL);CHKERRQ(ierr);
   }
   ierr = IGASetFromOptions(iga);CHKERRQ(ierr);
   ierr = IGASetUp(iga);CHKERRQ(ierr);
-  
+
   ierr = IGAWrite(iga,"iga.dat");CHKERRQ(ierr);
   ierr = IGAWrite(iga,"iga.dat");CHKERRQ(ierr); /* just for testing */
 
     ierr = VecDestroy(&vec);CHKERRQ(ierr);
   }
 
-#if PETSC_VERSION_LE(3,2,0)
-  {
-    PetscMPIInt size;
-    ierr = MPI_Comm_size(comm,&size);CHKERRQ(ierr);
-    if (size > 1) {
-      ierr = IGADestroy(&iga);CHKERRQ(ierr);
-      ierr = PetscFinalize();CHKERRQ(ierr);
-      return 0;
-    }
-  }
-#endif
-
   {
     Mat         mat;
     Vec         diag,diag2;

test/Oscillator.c

 #include <petsc.h>
 #include <petscts2.h>
 
-#if PETSC_VERSION_(3,3,0) || PETSC_VERSION_(3,2,0)
+#if PETSC_VERSION_LE(3,3,0)
 #define TSRegister(s,f) TSRegister(s,0,0,f)
 #endif
 

test/Test_SNES_2D.c

   ierr = IGAOptionsAlias("-C","-1","-iga_continuity");CHKERRQ(ierr);
   ierr = IGAOptionsAlias("-L","-1,+1","-iga_limits");CHKERRQ(ierr);
 
-#if PETSC_VERSION_(3,2,0)
-  {
-    PetscBool same = PETSC_FALSE;
-    char      mtype[256] = "";
-    ierr = PetscOptionsGetString(0,"-iga_mat_type",mtype,sizeof(mtype),0);CHKERRQ(ierr);
-    ierr = PetscStrcmp(mtype,MATIS,&same);CHKERRQ(ierr);
-    if (same) {ierr = PetscFinalize();CHKERRQ(ierr); return 0;}
-  }
-#endif
-
   IGA iga;
   ierr = IGACreate(PETSC_COMM_WORLD,&iga);CHKERRQ(ierr);
   ierr = IGASetDim(iga,2);CHKERRQ(ierr);
 	${CLINKER} -o $@ $< ${PETIGA_LIB}
 	${RM} -f $<
 runex2a_1:
-	-@${MPIEXEC} -n 1 ./IGAInputOutput ${OPTS} -dim 1 -periodic
+	-@${MPIEXEC} -n 1 ./IGAInputOutput ${OPTS} -iga_dim 1 -periodic
 runex2a_2:
-	-@${MPIEXEC} -n 2 ./IGAInputOutput ${OPTS} -dim 2 -dof 3 -periodic
+	-@${MPIEXEC} -n 2 ./IGAInputOutput ${OPTS} -iga_dim 2 -iga_dof 3 -periodic
 runex2a_3:
-	-@${MPIEXEC} -n 3 ./IGAInputOutput ${OPTS} -dim 3 -periodic 1,0,1
+	-@${MPIEXEC} -n 3 ./IGAInputOutput ${OPTS} -iga_dim 3 -periodic 1,0,1
 runex2a_4:
-	-@${MPIEXEC} -n 4 ./IGAInputOutput ${OPTS} -dim 2 -N 17,19   -p 3,2
+	-@${MPIEXEC} -n 4 ./IGAInputOutput ${OPTS} -iga_dim 2 -N 17,19   -p 3,2
 runex2a_8:
-	-@${MPIEXEC} -n 8 ./IGAInputOutput ${OPTS} -dim 3 -N 13,11,7 -p 3,2,1
+	-@${MPIEXEC} -n 8 ./IGAInputOutput ${OPTS} -iga_dim 3 -N 13,11,7 -p 3,2,1
 runex2a.rm:
 	-@${RM} -f iga*.dat iga*.dat.info
 IGAInputOutput = IGAInputOutput.PETSc \