[petsc-dev] Lagging the numerical factorization for one of the fields of fieldsplit preconditioner

Shri abhyshr at mcs.anl.gov
Tue Mar 15 22:33:43 CDT 2011


> > The system i'm trying to solve is of the form
> > 0 = A*y + g(x)
> > 0 = f(x,y)
> > which has the jacobian
> >
> >  | A dg_dx |
> >  | df_dy df_dx |
> >
> > I'm using the schur preconditioner which needs factorization of A
> > and (df_dx - df_dy*inv(A)*dg_dx).
> 
> df_dx - df_dy*inv(A)*dg_dx is never formed (and hence never factored)
> it is dense and way to expensive to ever form. Now approx
> inverse(df_dx) may be used as a preconditioner for the Schur
> complement and this means df_dx would be factored.
> 
> Please send me the output from running with -snes_view so I can see
> exactly what Schur complement preconditioner you are forming.

See the attached file.
> 
> In affect I think you are correct we want A to not be factored each
> time because A is a constant matrix that does not change. Is this
> correct?

Yes, A is constant.


> 
> Do you form the big-assed matrix
> >  | A     dg_dx |
> >  | df_dy df_dx |
> 
> explicitly as one big matrix? 

Yes.

> And each time-step you changes values in
> the dg_dx, df_dy and df_dx parts with MatSetValues?

Yes,that's correct.


> 
> 
> One fix may be to make PCSetUp() smarter and know the matrix has not
> changed and hence it doesn't have to be refactored (instead of only
> relying on the flag passed to KSPSetOperators()).
> 
> Barry
> 
> 
> 
> > Since,A is constant
> > it needs to be factorized only once while (df_dx -
> > df_dy*inv(A)*dg_dx) is not constant and needs to be refactorized.
> >
> >> This will be
> >> tricky because we don't have a mechanism to pass this information
> >> down
> >> into PCFIELDSPLIT. Tell me exactly what you want to do that it
> >> cannot
> >> currently do and I'll what we can do about it.
> >
> > Currently,the factorization is done for 'both or none'.I wanted the
> > factorization to be done for 'either,both,or none'.
> > I was thinking about having an option say
> > -fieldsplit_xxx_lag_preconditioner <niterations> which
> > will delay the refactorization for field xxx by niterations and if
> > niterations
> > is set to -1 then it will not update the factorization.
> >
> > Thanks,
> > Shri
> >
> >>
> >> Barry
> >>
> >>
> >>
> >> On Mar 14, 2011, at 4:41 PM, Shri wrote:
> >>
> >>>
> >>>           | A B | |dx| |fx|
> >>> Jacobian = =
> >>>           | C D | |dy| |fy|
> >>>
> >>> While solving this linear system with a fieldsplit precondioner,is
> >>> there a way to lag the numerical factorization of the A matrix.
> >>> The
> >>> A matrix in my application is constant and is about 3-4 times
> >>> bigger
> >>> than the D matrix. The log summary shows that about 90% of the
> >>> time
> >>> is spent in the numerical factorization phase. So i would like to
> >>> do
> >>> the numerical factorization for A matrix just once and not have it
> >>> factorized for all the snes iterations.
> >>> Speaking on the same note, should snes lag_preconditioner
> >>> functionality be moved to ksp or maybe a
> >>> -fieldsplit_xxx_lag_preconditioner option?
> >>>
> >>> Thanks,
> >>> Shri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snes_view_output.rtf
Type: application/rtf
Size: 8030 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20110315/bd1e76dd/attachment.rtf>


More information about the petsc-dev mailing list