NLNML::NLNML_Preconditioner Class Reference

NLNML_Preconditioner: a class to define a multilevel nonlinear preconditioner and solver. More...

#include <nlnml_preconditioner.H>

Inheritance diagram for NLNML::NLNML_Preconditioner:

[legend]
Collaboration diagram for NLNML::NLNML_Preconditioner:
[legend]
List of all members.

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_CommComm () const
 get Comm of this class
const Epetra_MapOperatorDomainMap () const
 Get fine level OperatorDomainMap.
const Epetra_MapOperatorRangeMap () 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.

Detailed Description

NLNML_Preconditioner: a class to define a multilevel nonlinear preconditioner and solver.

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:

Note:
an example is given in the directory ml/examples/NonlinML
Author:
Michael Gee, SNL 9214


Constructor & Destructor Documentation

NLNML::NLNML_Preconditioner::NLNML_Preconditioner RefCountPtr< NLNML::NLNML_FineLevelNoxInterface interface,
ParameterList mlparams,
const Epetra_Comm comm
[explicit]
 

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          );

Parameters:
interface (In) : rcptr to an NLNML::NLNML_FineLevelNoxInterface derived class
mlparams (In) : paramter list
comm (In) : the Epetra_Comm to be used

virtual NLNML::NLNML_Preconditioner::~NLNML_Preconditioner  )  [virtual]
 

Destroys the preconditioner.

Destroys the NLNML_Preconditioner.


Member Function Documentation

int NLNML::NLNML_Preconditioner::Apply const Epetra_MultiVector X,
Epetra_MultiVector Y
const [inline, virtual]
 

Apply the preconditioner, not implemented.

Derived from Epetra_Operator, not implemented.

Implements Epetra_Operator.

int NLNML::NLNML_Preconditioner::ApplyInverse const Epetra_MultiVector X,
Epetra_MultiVector Y
const [virtual]
 

ApplyInverse the preconditioner.

ApplyInverse the preconditioner. Method is derived from Epetra_Operator.

Parameters:
X (In) : Epetra_MultiVector matching the fine level map of this preconditioner
Y (Out) : Epetra_MultiVector containing the result on output

Implements Epetra_Operator.

const Epetra_Comm& NLNML::NLNML_Preconditioner::Comm  )  const [inline, virtual]
 

get Comm of this class

Derived from Epetra_Operator, returns ref to the Epetra_Comm of this class

Implements Epetra_Operator.

virtual bool NLNML::NLNML_Preconditioner::computePreconditioner const Epetra_Vector x,
Epetra_Operator M,
Teuchos::ParameterList precParams = 0
[virtual]
 

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.

Parameters:
x (In) : Vector of the current solution
M (In) : this
precParams (In) : ignored

bool NLNML::NLNML_Preconditioner::HasNormInf  )  const [inline, virtual]
 

HasNormInf, not implemented.

Derived from Epetra_Operator, always returns false.

Implements Epetra_Operator.

bool NLNML::NLNML_Preconditioner::isinit  )  const [inline]
 

Check initialization flag.

check the init-flag, if false, ApplyInverse will call computePreconditioner

const char* NLNML::NLNML_Preconditioner::Label  )  const [inline, virtual]
 

Returns the label of this class.

Returns the label of this class.

Implements Epetra_Operator.

double NLNML::NLNML_Preconditioner::NormInf  )  const [inline, virtual]
 

NormInf, not implemented.

Derived from Epetra_Operator, not implemented.

Implements Epetra_Operator.

const Epetra_Map& NLNML::NLNML_Preconditioner::OperatorDomainMap  )  const [inline, virtual]
 

Get fine level OperatorDomainMap.

Derived from Epetra_Operator, get fine level OperatorDomainMap.

Implements Epetra_Operator.

const Epetra_Map& NLNML::NLNML_Preconditioner::OperatorRangeMap  )  const [inline, virtual]
 

Get fine level OperatorRangeMap.

Derived from Epetra_Operator, get fine level OperatorRangeMap.

Implements Epetra_Operator.

void NLNML::NLNML_Preconditioner::SetNoxSolver RefCountPtr< NOX::Solver::Manager >  s  )  [inline]
 

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.

Parameters:
s (In) : rcptr to the NOX::Solver::Manager of the outer Nox iterative method.

int NLNML::NLNML_Preconditioner::SetUseTranspose bool  UseTranspose  )  [inline, virtual]
 

SetUseTranspose, not implemented.

Derived from Epetra_Operator, not implemented.

Implements Epetra_Operator.

int NLNML::NLNML_Preconditioner::solve  )  const
 

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

bool NLNML::NLNML_Preconditioner::UseTranspose  )  const [inline, virtual]
 

UseTranspose, not implemented.

Derived from Epetra_Operator, not implemented.

Implements Epetra_Operator.


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:38:46 2008 for ML by doxygen 1.3.9.1