#include <ml_nox_preconditioner.H>
Inheritance diagram for ML_NOX::ML_Nox_Preconditioner:
Public Member Functions | |
| ML_Nox_Preconditioner (ML_NOX::Ml_Nox_Fineinterface &interface, const Epetra_Comm &comm) | |
| Constructs an ML_Nox_Preconditioner class with default values. | |
| ML_Nox_Preconditioner (ML_NOX::Ml_Nox_Fineinterface &interface, Teuchos::ParameterList &mlparams, const Epetra_Comm &comm) | |
| Constructs an ML_Nox_Preconditioner class with parameter list. | |
| ~ML_Nox_Preconditioner () | |
| Destroys the preconditioner. | |
| bool | SetNonlinearMethod (bool islinPrec, int maxlevel, bool ismatrixfree, bool ismatfreelev0, bool fixdiagonal) |
| Set the type of nonlinear method to be used. | |
| bool | SetCoarsenType (string coarsentype, int maxlevel, int maxcoarsesize, int nnodeperagg) |
| Set type of coarsening algorithm to be used. | |
| bool | SetSmoothers (string finesmoothertype, string smoothertype, string coarsesolve) |
| Set type of smoother. | |
| bool | SetNonlinearSolvers (bool usenlnCG_fine, bool usenlnCG, bool usenlnCG_coarse, bool useBroyden, int nitersCG_fine, int nitersCG, int nitersCG_coarse) |
| Set type of nonlinear solver for each level. | |
| bool | SetSmootherSweeps (int nsmooth_fine, int nsmooth, int nsmooth_coarse) |
| Set number of sweeps of smoother. | |
| bool | SetPrintLevel (int printlevel) |
| Set the ML print level. | |
| bool | SetRecomputeOffset (int offset) |
| Set the offset for recomputing this preconditioner. | |
| bool | SetRecomputeOffset (int offset, int recomputestep, double adaptrecompute, int adaptns) |
| Set the offset for recomputing this preconditioner. | |
| bool | SetDimensions (int spatialDimension, int numPDE, int dimNS) |
| Set dimensions for the PDE and the Nullspace. | |
| bool | SetConvergenceCriteria (double FAS_normF, double FAS_nupdate) |
| Set convergence criteria for nonlinear preconditioner. | |
| bool | SetFAScycle (int prefsmooth, int presmooth, int coarsesmooth, int postsmooth, int postfsmooth, int maxcycle) |
| Set cycle for nonlinear preconditioner. | |
| bool | SetFiniteDifferencing (bool centered, double alpha, double beta) |
| Set finite differencing method. | |
| bool | set_nox_solver (NOX::Solver::Manager *noxsolver) |
| Register the outer Nox iterative method with the nonlinear preconditioner. | |
| const char * | Label () const |
| Returns the label of this class. | |
| const Epetra_Comm & | Comm () const |
| get Comm of this class | |
| const Epetra_Map & | OperatorDomainMap () const |
| Get fine level OperatorDomainMap. | |
| const Epetra_Map & | OperatorRangeMap () const |
| Get fine level OperatorRangeMap. | |
| bool | isinit () const |
| Check initialization flag of the instant of this class. | |
| bool | setinit (bool flag) |
| Set the initialization flag of the instant of this class. | |
| int | getoffset () |
| Get the offset to recompute this preconditioner. | |
| virtual bool | computePreconditioner (const Epetra_Vector &x, NOX::Parameter::List *precParams=0) |
| Construct the preconditioner. | |
| int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| ApplyInverse the preconditioner. | |
| int | solve () |
| Apply the nonlinear multigrid FAS-solver. | |
| int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| Apply the preconditioner, not implemented. | |
| int | SetUseTranspose (bool UseTranspose) |
| SetUseTranspose, not implemented. | |
| double | NormInf () const |
| NormInf, not implemented. | |
| bool | UseTranspose () const |
| UseTranspose, not implemented. | |
| bool | HasNormInf () const |
| HasNormInf, not implemented. | |
Class ML_NOX::ML_Nox_Preconditioner defines an algebraic nonlinear preconditioner or solver that is based on a full approximation scheme (FAS) approach and is implemented making use of NOX' nonlinear solver capabilities. It operates on Epetra objects and implements an Epetra_Operator to be easily used as a preconditioner to some outer nonlinear iteration. It also implements the NOX::EpetraNew::Interface::Preconditioner from NOX so it can serve as it's own interface (see NOX documentation for details). In this class several methods and options can be chosen, which are described in the parameter set functions
To make use of the full functionality of this class it requires ML to be configured with the following options:
--with-ml_nox --enable-epetra --enable-epetraext --enable-nox --enable-nox-epetra --enable-prerelease --enable-aztecoo --enable-amesos
|
||||||||||||
|
Constructs an ML_Nox_Preconditioner class with default values. Constructs a ML_Nox_Preconditioner class and sets a set of default values. This constructor does NOT actually create the Multilevel hierarchy and the methods, this is done by a call to computePreconditioner.
|
|
||||||||||||||||
|
Constructs an ML_Nox_Preconditioner class with parameter list.
Constructs a ML_Nox_Preconditioner class and sets a set of default values. This constructor does NOT actually create the Multilevel hierarchy and the methods, this is done by a call to computePreconditioner. Teuchos parameters recognized and there default values: Teuchos::ParameterList mlparams; mlparams.set("nlnML output",6); // Level of output to be generated (0-10), 6 recommended mlparams.set("nlnML max levels",10); // Max # of levels to produce mlparams.set("nlnML coarse: max size",128); // Size of coarse grid where to stop coarsening mlparams.set("nlnML is linear preconditioner",false); // Act as linear preconditioner, else run FAS-cycle as nonlinear preconditioner mlparams.set("nlnML is matrixfree",true); // Finite difference for Jacobian mlparams.set("nlnML finite difference fine level",true); // Finite difference for Jacobian on fine level only mlparams.set("nlnML finite difference alpha",1.0e-07); // Finite differencing perturbation parameter mlparams.set("nlnML finite difference beta",1.0e-06); // ---"--- mlparams.set("nlnML finite difference centered",false); // Finite differnencing scheme, true=centered, false=forward mlparams.set("nlnML absolute residual tolerance",1.0e-05); // Internal absolute residual tolerance for FAS-cycle mlparams.set("nlnML max cycles",250); // Max. # FAS-cycles before giving up mlparams.set("nlnML adaptive recompute",0.0); // Recompute preconditioner when outer residual is above this tolerance mlparams.set("nlnML offset recompute",0); // Recompute preconditioner every offset outer iterations mlparams.set("nlnML additional adaptive nullspace",0); // # additional adaptive nullspace candidates to compute mlparams.set("nlnML PDE equations",3); // # PDE equations (degrees of freedom per node) mlparams.set("nlnML null space: dimension",3); // nullspace dimension mlparams.set("nlnML spatial dimension",3); // spatial dimension of problem mlparams.set("nlnML coarse: type","Uncoupled"); // aggregation scheme: Uncoupled METIS VBMETIS mlparams.set("nlnML nodes per aggregate",27); // # nodes per aggregate for aggregation schemes "METIS" / "VBMETIS" mlparams.set("nlnML use nlncg on fine level",true); // use nonlinear CG as smoother on fine level, else use Newton-Krylov mlparams.set("nlnML use nlncg on medium level",true); // use nonlinear CG as smoother, else use Newton-Krylov mlparams.set("nlnML use nlncg on coarsest level",true); // use nonlinear CG as smoother on coarsest level, else use Newton-Krylov mlparams.set("nlnML max iterations newton-krylov fine level",5); // # iterations LINEAR CG in Newton-Krylov smoother fine level mlparams.set("nlnML max iterations newton-krylov medium level" ,5); // # iterations LINEAR CG in Newton-Krylov smoother mlparams.set("nlnML max iterations newton-krylov coarsest level",5); // # iterations LINEAR CG in Newton-Krylov smoother coarsest level mlparams.set("nlnML linear smoother type fine level","SGS"); // type of linear fine smoother : SGS BSGS Jacobi MLS Bcheby AmesosKLU mlparams.set("nlnML linear smoother type medium level","SGS"); // type of linear smoother : SGS BSGS Jacobi MLS Bcheby AmesosKLU mlparams.set("nlnML linear smoother type coarsest level","AmesosKLU"); // type of linear coarse smoother: SGS BSGS Jacobi MLS Bcheby AmesosKLU mlparams.set("nlnML linear smoother sweeps fine level",2); // # of linear smoother sweeps/polynomial order for linear fine smoother mlparams.set("nlnML linear smoother sweeps medium level",2); // # of linear smoother sweeps/polynomial order for linear smoother mlparams.set("nlnML linear smoother sweeps coarsest level",1); // # of linear smoother sweeps/polynomial order for linear coarse smoother mlparams.set("nlnML nonlinear presmoothing sweeps fine level",0); // # nonlinear presmoothing sweeps in FAS-cycle fine level mlparams.set("nlnML nonlinear presmoothing sweeps medium level",0); // # nonlinear presmoothing sweeps in FAS-cycle mlparams.set("nlnML nonlinear smoothing sweeps coarse level",3); // # nonlinear sweeps in FAS-cycle coarsest level mlparams.set("nlnML nonlinear postsmoothing sweeps medium level",3); // # nonlinear postsmoothing sweeps in FAS-cycle mlparams.set("nlnML nonlinear postsmoothing sweeps fine level",3); // # nonlinear postsmoothing sweeps in FAS-cycle fine level
|
|
|
Destroys the preconditioner. Destroys the ML_Nox_Preconditioner. |
|
||||||||||||
|
Apply the preconditioner, not implemented. Derived from Epetra_Operator, not implemented. Implements Epetra_Operator. |
|
||||||||||||
|
ApplyInverse the preconditioner. ApplyInverse the preconditioner. Method is derived from Epetra_Operator.
Implements Epetra_Operator. |
|
|
get Comm of this class Derived from Epetra_Operator, returns ref to the Epetra_Comm of this class Implements Epetra_Operator. |
|
||||||||||||
|
Construct the preconditioner. Construct the preconditioner. This is derived from the NOX::EpetraNew::Interface::Preconditioner class. Nox will use this to (re)compute the preconditioner.
|
|
|
Get the offset to recompute this preconditioner. Get the offset to recompute this preconditioner. |
|
|
HasNormInf, not implemented. Derived from Epetra_Operator, always returns false. Implements Epetra_Operator. |
|
|
Check initialization flag of the instant of this class. check the init-flag of this instant, if false, ApplyInverse will throw an error. |
|
|
Returns the label of this class. Returns the label of this class. Implements Epetra_Operator. |
|
|
NormInf, not implemented. Derived from Epetra_Operator, not implemented. Implements Epetra_Operator. |
|
|
Get fine level OperatorDomainMap. Derived from Epetra_Operator, get fine level OperatorDomainMap. Implements Epetra_Operator. |
|
|
Get fine level OperatorRangeMap. Derived from Epetra_Operator, get fine level OperatorRangeMap. Implements Epetra_Operator. |
|
|
Register the outer Nox iterative method with the nonlinear preconditioner. Register the outer Nox iterative method with the nonlinear preconditioner. This is necessary, because the outer NOX iterative method will provide the nonlinear preconditioner with current solution and residual. Necessary only in the islinearPrec==false case and when used as a preconditioner. If used as stand-alone solver, this is not necessary.
|
|
||||||||||||||||||||
|
Set type of coarsening algorithm to be used. Set type of coarsening algorithm to be used. Currently, this class recognizes the ML-coarsening schemes Uncoupled, METIS and VBMETIS.
|
|
||||||||||||
|
Set convergence criteria for nonlinear preconditioner. Set convergence criteria for nonlinear preconditioner. Takes effect for islinPrec==false only.
|
|
||||||||||||||||
|
Set dimensions for the PDE and the Nullspace. Set dimensions for the PDE and the Nullspace.
|
|
||||||||||||||||||||||||||||
|
Set cycle for nonlinear preconditioner. Set cycle for nonlinear preconditioner. Takes effect for islinPrec==false only.
|
|
||||||||||||||||
|
Set finite differencing method. Set finite differencing method. Takes effect for ismatrixfree==true only.
|
|
|
Set the initialization flag of the instant of this class. Set the init-flag of this instant. |
|
||||||||||||||||||||||||
|
Set the type of nonlinear method to be used. Set the type of nonlinear method to be used on each level of the hierarchy
|
|
||||||||||||||||||||||||||||||||
|
Set type of nonlinear solver for each level. Set type of nonlinear solver for each level and number of LINEAR CG-iterations allowed inside Newton's method.
|
|
|
Set the ML print level. Set the ML print level between 0 and 10.
|
|
||||||||||||||||||||
|
Set the offset for recomputing this preconditioner. Set the offset for recomputing this preconditioner. Every offset times, the preconditioner is applied it will recreate itself and will use the fine level interface to obtain either a new fine level Jacobian or to compute a Finite Differencing - Jacobian. Optionally, the MG hierarchy and Jacobian can be recomputed after the recomputestep iteration
|
|
|
Set the offset for recomputing this preconditioner. Set the offset for recomputing this preconditioner. Every offset times, the preconditioner is applied it will recreate itself and will use the fine level interface to obtain either a new fine level Jacobian or to compute a Finite Differencing - Jacobian.
|
|
||||||||||||||||
|
Set type of smoother. Set type of smoother. Currently, this class recognizes the ML-smoothers Jacobi, SGS and AmesosKLU.
|
|
||||||||||||||||
|
Set number of sweeps of smoother. Set number of sweeps of smoother.
|
|
|
SetUseTranspose, not implemented. Derived from Epetra_Operator, not implemented. Implements Epetra_Operator. |
|
|
Apply the nonlinear multigrid FAS-solver. Apply the nonlinear multigrid FAS-solver. This preconditioner can act as a stand-alone FAS-Solver. Will throw an error, if islinearPrec==true; |
|
|
UseTranspose, not implemented. Derived from Epetra_Operator, not implemented. Implements Epetra_Operator. |
1.3.9.1