NLNML::NLNML_FineLevelNoxInterface Class Reference

Ml_Nox_Fineinterface: a virtual class used by NLNML_Preconditioner. More...

#include <nlnml_finelevelnoxinterface.H>

List of all members.

Public Member Functions

 NLNML_FineLevelNoxInterface ()
 Constructor.
virtual ~NLNML_FineLevelNoxInterface ()
 virtual Destructor
virtual bool computeF (const Epetra_Vector &x, Epetra_Vector &F, const FillType fillFlag)=0
 Compute and return F (derived from NOX::Epetra::Interface::Required).
virtual bool computeJacobian (const Epetra_Vector &x, Epetra_Operator &Jac)=0
 Compute the current Jacobian (derived from NOX::Epetra::Interface::Jacobian).
virtual Epetra_CrsMatrixgetJacobian ()=0
 Return the Jacobian from the application.
virtual const Epetra_CrsGraphgetGraph ()=0
 Return the Graph of the fine level problem from the application.
virtual const Epetra_CrsGraphgetModifiedGraph ()=0
 Return the modified Graph of the fine level problem from the application.
virtual const Epetra_VectorgetSolution ()=0
 Return the current solution from the application.
virtual const Epetra_MapgetMap ()=0
 Return the Map of the current solution from the application.
virtual double * Get_Nullspace (const int nummyrows, const int numpde, const int dim_nullsp)=0
 Compute and return the Nullspace of the problem from the application.
virtual bool getBlockInfo (int *nblocks, vector< int > &blocks, vector< int > &block_pde)=0
 Compute and return the block node information from the application.
virtual void ApplyAllConstraints (Epetra_Vector &gradient, int level)
 Dummy routine to apply constraints.
virtual bool isnewJacobian ()
 Query whether the current Jacobian matches the current solution vector.
virtual int getnumJacobian ()
 Query how often the Jacobian has been recomputed.
double getsumtime ()
 Query the summed time spent in this interface.
void resetsumtime ()
 Reset the summed time spent in this interface.
int getnumcallscomputeF ()
 Query the number of calls to the computeF method of this class.
bool setnumcallscomputeF (int ncalls)
 Reset the number of calls to the computeF method of this class to a certain value.
int OutLevel ()
 Returns the level of output to be generated [ 0 - 10 ].

Protected Attributes

bool isnewJacobian_
int numJacobian_
int printlevel_
double t_
int ncalls_computeF_


Detailed Description

Ml_Nox_Fineinterface: a virtual class used by NLNML_Preconditioner.

NLNML::NLNML_FineLevelNoxInterface is a pure virtual class that serves as an interface between the NLNML_Preconditioner and any application. It implements NOX interfaces NOX::Epetra::Interface::Required and NOX::EpetraNew::Interface::Jacobian. Besides serving as an interface for the nonlinear iteration, it also serves as an interface to do finite differencing of Jacobians and as the fine level interface all coarser level interfaces refer to. It therefore plays a major role in using the NLNML_Preconditioner.

To make use of the full functionality of this class it requires ML to be configured with the following options:

Author:
Michael Gee, SNL 1414


Member Function Documentation

virtual void NLNML::NLNML_FineLevelNoxInterface::ApplyAllConstraints Epetra_Vector gradient,
int  level
[inline, virtual]
 

Dummy routine to apply constraints.

If the underlying application needs to apply constraints to the gradient computed by the preconditioner this method has to be implemented.

virtual bool NLNML::NLNML_FineLevelNoxInterface::computeF const Epetra_Vector x,
Epetra_Vector F,
const FillType  fillFlag
[pure virtual]
 

Compute and return F (derived from NOX::Epetra::Interface::Required).

Compute and return F (derived from NOX::Epetra::Interface::Required). This method is called by the nonlinear preconditioner. It supplies a solution vector x and needs a residual vector F computed by this funtion on output.

Parameters:
x (In) : current solution vector
F (Out) : residual vector matching x
fillFlag (In) : flag indicating for what purpose this routine was called, see NOX documentation of NOX::Epetra::Interface::Required

virtual bool NLNML::NLNML_FineLevelNoxInterface::computeJacobian const Epetra_Vector x,
Epetra_Operator Jac
[pure virtual]
 

Compute the current Jacobian (derived from NOX::Epetra::Interface::Jacobian).

Compute the current Jacobian (derived from NOX::Epetra::Interface::Jacobian). This method is called by the nonlinear preconditioner. It supplies a solution vector x and wants a Jacobian computed matching this solution vector on output. getJacobian will be used to obtain the Jacobian

See also:
getJacobian
Parameters:
x (In) : current solution vector
Jac (In) : the Jacobian to be computed

virtual double* NLNML::NLNML_FineLevelNoxInterface::Get_Nullspace const int  nummyrows,
const int  numpde,
const int  dim_nullsp
[pure virtual]
 

Compute and return the Nullspace of the problem from the application.

Compute and return the Nullspace of the problem from the application. This method is called by the nonlinear preconditioner to obtain the Nullspace of the problem from the application. If the application returns NULL on exit, the NLNML_Preconditioner will use a default Nullspace of correct size (supplied in parameter list) and will assume constant number of dofs per node (constant block size). This will lead to errors in the aggregation process if the problem is NOT of constant block size!

Parameters:
nummyrows (In) : dimension of the nullspace vectors
numpde (In) : number of PDEs (normally dofs per node)
dim_nullsp (In) : dimension of the nullspace

virtual bool NLNML::NLNML_FineLevelNoxInterface::getBlockInfo int *  nblocks,
vector< int > &  blocks,
vector< int > &  block_pde
[pure virtual]
 

Compute and return the block node information from the application.

Compute and return the block node information from the application. This method is called by the nonlinear preconditioner to obtain information about non-constant block sizes. It is used only in the case of the VBMETIS aggregation scheme. If on exit blocks and block_pde are NULL, the NLNML_Preconditioner will assume a constant vblock size and will use METIS instead of the VBMETIS aggregation scheme.

Parameters:
nblocks (Out) : on exit, number of variable sized nodal blocks
blocks (Out) : on exit, allocated vector of length NumMyRows containing the block indize of each row in C-style numbering (starting with 0)
block_pde (Out) : on exit, allocated vector of length NumMyRows containing the number of PDE a certain row belongs to.

virtual const Epetra_CrsGraph* NLNML::NLNML_FineLevelNoxInterface::getGraph  )  [pure virtual]
 

Return the Graph of the fine level problem from the application.

Return the Graph of the fine level problem from the application. The NLNML_Preconditioner uses this method to get the graph of the fine level problem from the application to do finite differencing

virtual Epetra_CrsMatrix* NLNML::NLNML_FineLevelNoxInterface::getJacobian  )  [pure virtual]
 

Return the Jacobian from the application.

Return the Jacobian from the application. The NLNML_Preconditioner uses this method to get the jacobian from the application. It will never be used in the matrixfree case.

See also:
NLNML_Preconditioner

virtual const Epetra_Map& NLNML::NLNML_FineLevelNoxInterface::getMap  )  [pure virtual]
 

Return the Map of the current solution from the application.

Return the Map of the current solution from the application. The NLNML_Preconditioner uses this method to get the map of the current solution vector of the fine level problem from the application.

virtual const Epetra_CrsGraph* NLNML::NLNML_FineLevelNoxInterface::getModifiedGraph  )  [pure virtual]
 

Return the modified Graph of the fine level problem from the application.

Return a graph that has sufficient modifications to reflect constraints that will be applied to the solution and residual. See Sandia report for more details

virtual const Epetra_Vector* NLNML::NLNML_FineLevelNoxInterface::getSolution  )  [pure virtual]
 

Return the current solution from the application.

Return the current solution from the application. The NLNML_Preconditioner uses this method to get the current solution vector of the fine level problem from the application.


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