Commits

Lisandro Dalcin committed 7954d75

Fix demos after changes in petsc-dev to TSSolve()

  • Participants
  • Parent commits 7edfa41

Comments (0)

Files changed (3)

File demo/NavierStokesKorteweg2D.c

   PetscReal t=0; Vec U;
   ierr = IGACreateVec(iga,&U);CHKERRQ(ierr);
   ierr = FormInitialCondition(iga,t,U,&user);CHKERRQ(ierr);
+#if PETSC_VERSION_LE(3,3,0)
   ierr = TSSolve(ts,U,PETSC_NULL);CHKERRQ(ierr);
+#else
+  ierr = TSSolve(ts,U);CHKERRQ(ierr);
+#endif
 
   ierr = VecDestroy(&U);CHKERRQ(ierr);
   ierr = TSDestroy(&ts);CHKERRQ(ierr);

File demo/Richards.c

   ierr = TSAlphaSetRadius(ts,0.5);CHKERRQ(ierr);
   ierr = TSSetFromOptions(ts);CHKERRQ(ierr);
 
-  PetscReal t; 
   Vec       U;
   ierr = IGACreateVec(iga,&U);CHKERRQ(ierr);
   ierr = FormInitialCondition(iga,U,&user);CHKERRQ(ierr);
-  ierr = TSSolve(ts,U,&t);CHKERRQ(ierr);
+#if PETSC_VERSION_LE(3,3,0)
+  ierr = TSSolve(ts,U,PETSC_NULL);CHKERRQ(ierr);
+#else
+  ierr = TSSolve(ts,U);CHKERRQ(ierr);
+#endif
 
   ierr = VecDestroy(&U);CHKERRQ(ierr);
   ierr = TSDestroy(&ts);CHKERRQ(ierr);

File demo/makefile

 	  HyperElasticity \
 	  PhaseFieldCrystal2D \
           BoundaryIntegral \
-          Richards	
+          Richards
 
 ALL: ${TARGETS}
 clean::