[petsc-dev] [petsc-users] (Fast?) assembly of upper triangle and MatZeroRows

Barry Smith bsmith at mcs.anl.gov
Tue Aug 9 12:13:47 CDT 2011


On Aug 8, 2011, at 5:39 PM, Jed Brown wrote:

> On Mon, Aug 8, 2011 at 17:31, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> It needs a new Mat primitive which zeros the rows and columns while also "remembering" the column values that it zeroed (as another assembled matrix).
> 
> I spoke too soon. If you apply the transformation while evaluating residuals and during assembly, there is no need to have this after-the-fact modification.
> 
> Is there a reason this information should not be held by the DM? In Dohp, I use explicit projections into homogeneous and inhomogeneous spaces. Both are needed, so it's not clear to me that this can cleanly be placed in SNES or KSP without the weird semantics (modification of force vector or matrix, or having MatMult tell us that we didn't solve the equations.
> 
> The concept of Dirichlet values (with homogeneous and inhomogeneous spaces) could be pushed all the way down into Mat and Vec (some of which I did for Dohp, in order to use VecGhost).

   Hence MatZeroRowsColumns()?  but then as you noted the SNES FormJacobian needs access to the right hand side vector which is not great. So what about MatZeroRowsColumns() that "remembers" the removed stuff and then when KSPSolve() starts it "adjusts" the right hand side based on the "memory" using something like MatFixRightHandSideForZeroedRowsColumns()?

   This really belongs in petsc-dev




   Barry







More information about the petsc-dev mailing list