[petsc-dev] flushed member in _p_Mat
alexlindsay239 at gmail.com
Thu Jul 15 12:02:53 CDT 2021
As per https://gitlab.com/petsc/petsc/-/issues/852 we have some fairly
complex functions in MOOSE that sometimes require the matrix to be
"assembled" at an intermediate stage of our Jacobian evaluation in order to
perform multi-body Constraints. In an ideal world I would like to assemble
with FLUSH because as per my post today in petsc-users FINAL may shrink my
allocation before I'm ready for it to.
We cannot currently use FLUSH at intermediate stages, however, because
there is a late call to MatZeroRows which we leverage before applying our
last set of objects (which are Dirichlet boundary conditions). MatZeroRows
checks the `assembled` flag which only gets set during FINAL assembly and
errors out if `assembled` is not true. From my understanding, MatZeroRows
should be a safe operation even if the matrix has just been FLUSHed.
MatZeroRows is just one example; I would guess there are other operations
that could potentially be done with a FLUSHed matrix as opposed to a fully
assembled one. Consequently, I'm wondering if it makes sense to add
something like a `flushed` data member to _p_Mat that would allow for some
less strict checking in operations like MatZeroRows.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the petsc-dev