// the petsc function we call wants to
// generate the vector itself, so destroy
// the old one first
+#if DEAL_II_PETSC_VERSION_DEV()
+ ierr = VecDestroy (&vector);
+#else
ierr = VecDestroy (vector);
+#endif
AssertThrow (ierr == 0, ExcPETScError(ierr));
}
#endif
AssertThrow (ierr == 0, ExcPETScError(ierr));
+#if DEAL_II_PETSC_VERSION_DEV()
+ ierr = VecScatterDestroy (&ctx);
+#else
ierr = VecScatterDestroy (ctx);
+#endif
AssertThrow (ierr == 0, ExcPETScError(ierr));
#endif
// so let's go the slow way:
int ierr;
+#if DEAL_II_PETSC_VERSION_DEV()
+ ierr = VecDestroy (&vector);
+#else
ierr = VecDestroy (vector);
+#endif
+
AssertThrow (ierr == 0, ExcPETScError(ierr));
create_vector (n, local_sz);
// so let's go the slow way:
if (attained_ownership)
{
+#if DEAL_II_PETSC_VERSION_DEV()
+ int ierr = VecDestroy (&vector);
+#else
int ierr = VecDestroy (vector);
+#endif
AssertThrow (ierr == 0, ExcPETScError(ierr));
}
{
if (attained_ownership)
{
+#if DEAL_II_PETSC_VERSION_DEV()
+ const int ierr = VecDestroy (&vector);
+#else
const int ierr = VecDestroy (vector);
+#endif
AssertThrow (ierr == 0, ExcPETScError(ierr));
}
}
Assert (size() == v.size(),
ExcDimensionMismatch(size(), v.size()));
- PetscTruth flag;
+#if DEAL_II_PETSC_VERSION_DEV()
+ PetscBool
+#else
+ PetscTruth
+#endif
+ flag;
const int ierr = VecEqual (vector, v.vector, &flag);
AssertThrow (ierr == 0, ExcPETScError(ierr));
Assert (size() == v.size(),
ExcDimensionMismatch(size(), v.size()));
- PetscTruth flag;
+#if DEAL_II_PETSC_VERSION_DEV()
+ PetscBool
+#else
+ PetscTruth
+#endif
+ flag;
const int ierr = VecEqual (vector, v.vector, &flag);
AssertThrow (ierr == 0, ExcPETScError(ierr));