[Trilinos-Users] Aztec, DD-prec and reuse

Mike Heroux maherou at sandia.gov
Wed Jan 4 09:31:28 MST 2006


Simone,

One general comment:  

You might consider using Ifpack for preconditioners for AztecOO.  Ifpack has
a much cleaner design and provides far more preconditioning capabilities.
In contrast, the interface to AztecOO's native preconditioners is and will
always be clumsy for advanced use cases.  This is because we have to live
within the constraints of the underlying Aztec capabilities which are not
object-oriented and quite fragile under changes.

Regarding AZ_reuse:  

Sorry to mislead you.  You should set options[AZ_pre_calc] = AZ_reuse
*after* the first call to Iterate, but before the second.  You should not
set options[AZ_pre_calc] = AZ_reuse *at all* if using the
Construct/DestroyPreconditioner() methods, since this setting is handled for
you.

The AZ_reuse option is meaningful *only* for internal preconditioners.  If
you provide your own preconditioner that implements the Epetra_Operator
interface and register it with your instance of AztecOO using the
SetPreconditioner() method, then your preconditioner will always be reused
as long as it remains registered.

Regarding A, P and M:

What is P ? Is it another AztecOO instance meant to precondition A ?  If you
can be as concrete as possible, it will help me to understand the situation.
Sorry for being so slow...

Mike

> > It is possible to reuse a native AztecOO preconditioner (e.g., the 
> > preconditioner obtained by setting options[AZ_precond] = 
> AZ_dom_decomp 
> > and options[AZ_subdomain_solve] = AZ_ilut) in one of two ways:
> > 
> > (1) By setting options[AZ_pre_calc] = AZ_reuse prior to calling the
> > Iterate() method the first time.  The actual preconditioner will be 
> > constructed when the Iterate() method tries to use the 
> preconditioner 
> > for the first time.
> 
> Setting reuse before calling Iterate gives the following 
> error at the first time I solve:
> Error:  Did not find previous factorization (requested
>         by setting options[AZ_pre_calc] to AZ_reuse).
>         To find this factorization, the following
>         parameters must match the previous factorization:
> (...)
> 
> 
> > (2) You can also explicitly construct and destroy AztecOO's native 
> > preconditioners by use the AztecOO's ConstructPreconditioner() and
> > DestroyPreconditioner() methods.  ConstructPreconditioner() 
> creates a 
> > persistent copy of an AztecOO  native internal preconditioner that 
> > remains viable until DestroyPreconditioner() is called or 
> the AztecOO 
> > object is destroyed.  The exact type of preconditioner that is 
> > constructed is determined by the same options[AZ_precond] 
> etc. as above.
> 
> Same error as above.
> 
> I went through the source code of ztec and I have the 
> impression that reuse works only with external 
> preconditioners, setted via SetPrecMatrix() Am I wrong?
> 


> >>+++++++++++++++++++++++++++++
> >>
> >>In a later stage, I would like to build M starting from P 
> and use M as 
> >>a preconditioner to A, via something like:
> >>
> >>  Epetra_Operator* M = P->GetPrecOperator()
> >>  A->SetPrecOperator(M);
> >>or
> >>  Epetra_RowMat* M =P->GetPrecMatrix();
> >>  A->SetPrecMatrix(M);
> >>
> >>Do you think that this is feasible?
> >>
> >>+++++++++++++++++++++++++++++
> >>
> > 
> > 
> > I am not quite sure what you mean here.  Since P is an 
> > Epetra_CrsMatrix, there is no GetPrecOperator() or GetPrecMatrix() 
> > methods.  If you want to reuse a preconditioner from a 
> previous call 
> > to Iterate(), you can use one of the two ways listed above.
> > 
> > Mike
> 
> What I mean here is:
> I have A, P and M, suvh that:
> P is a preconditioner for A
> M is a preconditioner for P that comes from AZ_dom_decomp
> 
> I would like to build M from P (using 
> ConstructPreconditioner) but use M as a preconditioner for A
> 
> Thank yo
> Simone
> 
> 





More information about the Trilinos-Users mailing list