[petsc-dev] MatNest updates; object state

Matthew Knepley knepley at gmail.com
Thu Nov 15 13:43:13 CST 2018


On Thu, Nov 15, 2018 at 2:03 PM Jed Brown via petsc-dev <
petsc-dev at mcs.anl.gov> wrote:

> A user can currently get a sub-matrix of a MatNest and modify it without
> it updating the MatNest's state.  This may require a manual call to
> PetscObjectStateIncrease so that the PC knows that it needs to rebuild,
> but this is ugly/complicated/error-prone.  Some possible options off the
> top of my head:
>
> 1. Insist that the user call MatNestSetSubMats() after any modification.
>
> 2. Make MatNestRestoreSubMats and MatNest{Get,Restore}SubMatsRead so
> that mutable access is controlled.
>

I like 2. the best. Its the most like other PETSc interfaces and most
explicit. I don't
think its really any overhead from what we do now.

   Matt


> 3. Add a hook to PetscObjectStateGet that can traverse child objects in
> case its own state counter is stale.  This is the most automatic, but
> I'm concerned about its potential complexity.
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20181115/64868950/attachment.html>


More information about the petsc-dev mailing list