#include <nlnml_preconditioner.H>
Inheritance diagram for NLNML::NLNML_Preconditioner:
Public Member Functions | |
| NLNML_Preconditioner (RefCountPtr< NLNML::NLNML_FineLevelNoxInterface > interface, ParameterList &mlparams, const Epetra_Comm &comm) | |
| Constructs an NLNML_Preconditioner class with given parameters. | |
| virtual | ~NLNML_Preconditioner () |
| Destroys the preconditioner. | |
| void | SetNoxSolver (RefCountPtr< NOX::Solver::Manager > s) |
| 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. | |
| int | OutLevel () const |
| Returns the level of output to be generated to stdout ( 0 - 10 ). | |
| bool | isinit () const |
| Check initialization flag. | |
| bool | setinit (bool flag) |
| Set the initialization flag. | |
| int | getoffset () const |
| Get the offset to recompute this preconditioner. | |
| virtual bool | computePreconditioner (const Epetra_Vector &x, Epetra_Operator &M, Teuchos::ParameterList *precParams=0) |
| Construct the preconditioner. | |
| int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| ApplyInverse the preconditioner. | |
| int | solve () const |
| 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 NLNML::NLNML_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 NLNML_Preconditioner class with given parameters. Constructs a NLNML_Preconditioner class and sets parameters from a parameter list This constructor does NOT actually create the Multilevel hierarchy and the methods, this is done by a call to computePreconditioner. The complete list of parameters is: Teuchos::ParameterList mlparams; mlparams.set("nlnML output", 6 ); // ML-output-level (0-10) mlparams.set("nlnML max levels", 10 ); // max. # levels (minimum = 2 !) mlparams.set("nlnML coarse: max size", 5000 ); // the size ML stops generating coarser levels mlparams.set("nlnML is linear preconditioner", false ); // linear or nonlinear preconditioner mlparams.set("nlnML apply constraints", true ); // make application apply constraints mlparams.set("nlnML is matrixfree", true ); // create Jacobian yourself or ask application for it mlparams.set("nlnML finite difference fine level", true ); // create jacobian on fine grid only mlparams.set("nlnML finite difference alpha", 1.0e-08 ); // finite differencing perturbation value mlparams.set("nlnML finite difference beta", 1.0e-07 ); // finite differencing perturbation value mlparams.set("nlnML finite difference centered", false ); // use centered or forward finite differencing mlparams.set("nlnML Jacobian fix diagonal", true ); // check Jacobian for zero diagonal entries and fix them mlparams.set("nlnML absolute residual tolerance", 1.0e-06 ); // internal tolerance for nonlinear preconditioner mlparams.set("nlnML max cycles", 500 ); // max # cycles before we give up mlparams.set("nlnML adaptive recompute", 0.0 ); // recompute if residual is larger then this value mlparams.set("nlnML offset recompute", 0 ); // every offset this preconditioner is recomputed mlparams.set("nlnML additional adaptive nullspace", 0 ); // compute adaptive nullspace (additional kernel vectors) mlparams.set("nlnML PDE equations", 1 ); // dof per node mlparams.set("nlnML null space: dimension", 1 ); // dimension of nullspace mlparams.set("nlnML spatial dimension", 1 ); // spatial dimension of problem: 1, 2, 3 mlparams.set("nlnML coarse: type", "Uncoupled"); // Uncoupled METIS VBMETIS mlparams.set("nlnML nodes per aggregate", 3 ); // # nodes per agg for coarsening METIS and VBMETIS mlparams.set("nlnML use nlncg on fine level", true ); // use nlnCG or mod. Newton's method mlparams.set("nlnML use nlncg on medium level", true ); mlparams.set("nlnML use nlncg on coarsest level", false ); mlparams.set("nlnML max iterations newton-krylov fine level", 0 ); // # iterations of lin. CG in mod. Newton's method mlparams.set("nlnML max iterations newton-krylov medium level" , 0 ); mlparams.set("nlnML max iterations newton-krylov coarsest level", 5 ); mlparams.set("nlnML linear smoother type fine level", "MLS" ); // SGS BSGS Jacobi MLS Bcheby AmesosKLU mlparams.set("nlnML linear smoother type medium level", "SGS" ); mlparams.set("nlnML linear smoother type coarsest level", "AmesosKLU"); mlparams.set("nlnML linear smoother sweeps fine level", -3 ); // number of sweeps or polynomial order mlparams.set("nlnML linear smoother sweeps medium level", 3 ); mlparams.set("nlnML linear smoother sweeps coarsest level", 1 ); mlparams.set("nlnML nonlinear presmoothing sweeps fine level", 1 ); // # nonlinear presmoothing sweeps in FAS-cycle fine level mlparams.set("nlnML nonlinear presmoothing sweeps medium level", 0 ); mlparams.set("nlnML nonlinear smoothing sweeps coarse level", 3 ); mlparams.set("nlnML nonlinear postsmoothing sweeps medium level", 2 ); mlparams.set("nlnML nonlinear postsmoothing sweeps fine level", 3 );
|
|
|
Destroys the preconditioner. Destroys the NLNML_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::Epetra::Interface::Preconditioner class. Nox will use this to (re)compute the preconditioner.
|
|
|
HasNormInf, not implemented. Derived from Epetra_Operator, always returns false. Implements Epetra_Operator. |
|
|
Check initialization flag. check the init-flag, if false, ApplyInverse will call computePreconditioner |
|
|
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 nonlinear preconditioner case and when used as a preconditioner. If used as stand-alone solver, this is not necessary.
|
|
|
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 the preconditioner is set up as a linear preconditioner |
|
|
UseTranspose, not implemented. Derived from Epetra_Operator, not implemented. Implements Epetra_Operator. |
1.3.9.1