// set symmetric flag, if so requested
if (is_symmetric == true)
{
+#if (PETSC_VERSION_MAJOR <= 2)
const int ierr
= MatSetOption (matrix, MAT_SYMMETRIC);
+#else
+ const int ierr
+ = MatSetOption (matrix, MAT_SYMMETRIC, PETSC_TRUE);
+#endif
+
AssertThrow (ierr == 0, ExcPETScError(ierr));
}
}
// set symmetric flag, if so requested
if (is_symmetric == true)
{
+#if (PETSC_VERSION_MAJOR <= 2)
const int ierr
= MatSetOption (matrix, MAT_SYMMETRIC);
+#else
+ const int ierr
+ = MatSetOption (matrix, MAT_SYMMETRIC, PETSC_TRUE);
+#endif
+
AssertThrow (ierr == 0, ExcPETScError(ierr));
}
}
// further entries, so PETSc can
// internally optimize some data
// structures.
- MatSetOption (matrix, MAT_NO_NEW_NONZERO_LOCATIONS);
+#if (PETSC_VERSION_MAJOR <= 2)
+ const int ierr =
+ MatSetOption (matrix, MAT_NO_NEW_NONZERO_LOCATIONS);
+#else
+ const int ierr =
+ MatSetOption (matrix, MAT_NEW_NONZERO_LOCATIONS, PETSC_FALSE);
+#endif
+
+ AssertThrow (ierr == 0, ExcPETScError(ierr));
}
}