#include <ml_nox_fineinterface.H>
Public Member Functions  
Ml_Nox_Fineinterface ()  
Constructor.  
virtual  ~Ml_Nox_Fineinterface () 
virtual Constructor  
virtual bool  computeF (const Epetra_Vector &x, Epetra_Vector &F, const FillType fillFlag)=0 
Compute and return F (derived from NOX::EpetraNew::Interface::Required).  
virtual bool  computeJacobian (const Epetra_Vector &x)=0 
Compute the current Jacobian (derived from NOX::EpetraNew::Interface::Jacobian).  
virtual bool  computePreconditioner (const Epetra_Vector &x, NOX::Parameter::List *precParams=0)=0 
Compute the current Preconditioner (derived from NOX::EpetraNew::Interface::Preconditioner).  
virtual Epetra_CrsMatrix *  getJacobian ()=0 
Return the Jacobian from the application.  
virtual const Epetra_CrsGraph *  getGraph ()=0 
Return the Graph of the fine level problem from the application.  
virtual const Epetra_CrsGraph *  getModifiedGraph ()=0 
virtual const Epetra_Vector *  getSolution ()=0 
Return the current solution from the application.  
virtual const Epetra_Map &  getMap ()=0 
Return the Map of the current solution from the application.  
virtual bool  isnewJacobian () 
Query whether the current Jacobian matches the current solution vector.  
virtual int  getnumJacobian () 
Query how often the Jacobian has been recomputed.  
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 void  ApplyAllConstraints (Epetra_Vector &gradient, int level) 
virtual bool  getBlockInfo (int *nblocks, int **blocks, int **block_pde)=0 
Compute and return the block node information from the application.  
double  getsumtime () 
Query the summed time spent in this interface.  
void  resetsumtime () 
Reset the summed time spent in this interface to a certain value.  
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.  
int  OutLevel () 
Public Attributes  
bool  isnewJacobian_ 
Flag to indicate, that the Jacobian has been evaluated by the application.  
int  numJacobian_ 
count number of evaluated Jacobians  
int  printlevel_ 
Printlevel.  
double  t_ 
t_ should be used for time measurement of time spent in this class  
int  ncalls_computeF_ 
ncalls_computeF_ is used to count the number of calls to computeF 
ML_NOX::Ml_Nox_Fineinterface is a pure virtual class that serves as an interface between the ML_Nox_Preconditioner and any application. It implements all three NOX interfaces NOX::EpetraNew::Interface::Required, NOX::EpetraNew::Interface::Jacobian and NOX::EpetraNew::Interface::Preconditioner. 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 ML_Nox_Preconditioner.
To make use of the full functionality of this class it requires ML to be configured with the following options:
withml_nox
enableepetra
enableepetraext
enablenox
enablenoxepetra
enableprerelease
enableaztecoo
enableamesos

Constructor. Constructor 

virtual Constructor virtual Constructor 

Compute and return F (derived from NOX::EpetraNew::Interface::Required). Compute and return F (derived from NOX::EpetraNew::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.


Compute the current Jacobian (derived from NOX::EpetraNew::Interface::Jacobian). Compute the current Jacobian (derived from NOX::EpetraNew::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


Compute the current Preconditioner (derived from NOX::EpetraNew::Interface::Preconditioner). FIXME: just found out that this interface is never used by ML_Nox_Preconditioner, as ML_Nox_Preconditioner implements it's own NOX::EpetraNew::Interface::Preconditioner. delete this? 

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 ML_Nox_Preconditioner will use a default Nullspace of correct size (given by dim_nullsp) 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!


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 nonconstant block sizes. It is used only in the case of the VBMETIS aggregation scheme. If on exit blocks and block_pde are NULL, the ML_Nox_Preconditioner will assume a constant vblock size and will use METIS instead of the VBMETIS aggregation scheme.


Return the Graph of the fine level problem from the application. Return the Graph of the fine level problem from the application. The ML_Nox_Preconditioner uses this method to get the graph of the fine level problem from the application. 

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


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

Query the number of calls to the computeF method of this class. Query the number of calls to the computeF method of this class. This is for performance analysis. 

Query how often the Jacobian has been recomputed. Query how often the Jacobian has been recomputed. 

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

Query the summed time spent in this interface. Query the summed time spent in this interface. This is for performance analysis. 

Query whether the current Jacobian matches the current solution vector. Query whether the current Jacobian matches the current solution vector. 

Reset the summed time spent in this interface to a certain value. Reset the summed time spent in this interface to a certain value. This is for performance analysis. 

Reset the number of calls to the computeF method of this class. Reset the number of calls to the computeF method of this class. This is for performance analysis. 

Flag to indicate, that the Jacobian has been evaluated by the application. Flag to indicate, that the Jacobian has been evaluated by the application. the ML_NOX::Ml_Nox_Fineinterface should set this to true, whenever the evaluated Jacobian matches the F in the computeF. It should be set to false if there is either no Jacobian evaluated or it does not match the F from the computeF function 

ncalls_computeF_ is used to count the number of calls to computeF ncalls_computeF_ is used to count the number of calls to computeF 

count number of evaluated Jacobians The user's ML_NOX::Ml_Nox_Fineinterface derived class should use this to count the number of Jacobian evaluations for statistical and debugpurpose 

Printlevel. The user's ML_NOX::Ml_Nox_Fineinterface derived class should set a printlevel value between 0 and 10 

t_ should be used for time measurement of time spent in this class t_ should be used for time measurement. The methods getsumtime and resetsumtime will be used to query this value for performance measurement 