We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93a2181 commit fd629feCopy full SHA for fd629fe
src/numerics/petsc_matrix.C
@@ -473,10 +473,16 @@ void PetscMatrix<T>::update_preallocation_and_zero ()
473
template <typename T>
474
void PetscMatrix<T>::reset_preallocation()
475
{
476
+#if !PETSC_VERSION_LESS_THAN(3,8,0)
477
libmesh_assert (this->initialized());
478
479
auto ierr = MatResetPreallocation(_mat);
480
LIBMESH_CHKERR(ierr);
481
+#else
482
+ libmesh_warning("Your version of PETSc doesn't support resetting of "
483
+ "preallocation, so we will use your most recent sparsity "
484
+ "pattern. This may result in a degradation of performance\n");
485
+#endif
486
}
487
488
0 commit comments