It can be a huge performance penalty if new nonzeros are allocated by PETSc and this performance penalty occurs "silently". @roystgnr recently had to track down this performance penalty and his tracking may have been a lot quicker if he got new nonzero errors.
Design
Toggle MooseApp::errorOnJacobianNonzeroReallocation to true. This will implicitly make new nonzeros an error for all of our modules and applications. Modules and apps which rely on being able to allocate new nonzeros on the fly (this is impossible to avoid currently for contact on a displaced mesh until we can do matrices with "on-the-fly" sparsity, see https://gitlab.com/petsc/petsc/-/issues/852) will need to override this app virtual.
Reason
It can be a huge performance penalty if new nonzeros are allocated by PETSc and this performance penalty occurs "silently". @roystgnr recently had to track down this performance penalty and his tracking may have been a lot quicker if he got new nonzero errors.
Design
Toggle
MooseApp::errorOnJacobianNonzeroReallocation
totrue
. This will implicitly make new nonzeros an error for all of our modules and applications. Modules and apps which rely on being able to allocate new nonzeros on the fly (this is impossible to avoid currently for contact on a displaced mesh until we can do matrices with "on-the-fly" sparsity, see https://gitlab.com/petsc/petsc/-/issues/852) will need to override this app virtual.Impact
Less frequent silent performance penalties