ML  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
List of all members
ML_Epetra::EdgeMatrixFreePreconditioner Class Reference

#include <ml_EdgeMatrixFreePreconditioner.h>

Inheritance diagram for ML_Epetra::EdgeMatrixFreePreconditioner:
Inheritance graph
[legend]
Collaboration diagram for ML_Epetra::EdgeMatrixFreePreconditioner:
Collaboration graph
[legend]

Public Member Functions

 EdgeMatrixFreePreconditioner (Teuchos::RCP< const Epetra_Operator > Operator, Teuchos::RCP< const Epetra_Vector > Diagonal, Teuchos::RCP< const Epetra_CrsMatrix > D0_Matrix, Teuchos::RCP< const Epetra_CrsMatrix > D0_Clean_Matrix, Teuchos::RCP< const Epetra_CrsMatrix > TMT_Matrix, Teuchos::ArrayRCP< int > BCedges, const Teuchos::ParameterList &List, const bool ComputePrec=true)
 Constructs an EdgeMatrixFreePreconditioner.
 
 ~EdgeMatrixFreePreconditioner ()
 Destructor.
 
int ComputePreconditioner (const bool CheckFiltering=false)
 Computes the multilevel hierarchy. More...
 
int ReComputePreconditioner ()
 Recomputes the preconditioner.
 
int Apply (const Epetra_MultiVector &, Epetra_MultiVector &) const
 Apply the inverse of the preconditioner to an Epetra_MultiVector (NOT AVAILABLE)
 
int ApplyInverse (const Epetra_MultiVector &B, Epetra_MultiVector &X) const
 Apply the preconditioner to RHS B to get result X (X is also initial guess)
 
void Print (int whichHierarchy=-2)
 Print the individual operators in the multigrid hierarchy.
 
int DestroyPreconditioner ()
 Destroys all structures allocated in ComputePreconditioner() if the preconditioner has been computed.
 
int SetUseTranspose (bool)
 Sets use transpose (not implemented).
 
double NormInf () const
 Returns the infinity norm (not implemented).
 
bool UseTranspose () const
 Returns the current UseTranspose setting.
 
bool HasNormInf () const
 Returns true if the this object can provide an approximate Inf-norm, false otherwise.
 
const Epetra_CommComm () const
 Returns a pointer to the Epetra_Comm communicator associated with this operator.
 
const Epetra_MapOperatorDomainMap () const
 Returns the Epetra_Map object associated with the domain of this operator.
 
const Epetra_MapOperatorRangeMap () const
 Returns the Epetra_Map object associated with the range of this operator.
 
void Complexities (double &complexity, double &fineNnz)
 Return operator complexity and #nonzeros in fine grid matrix.
 

Detailed Description

Matrix-Free preconditioning class for edge Maxwell Problems.

Member Function Documentation

int ML_Epetra::EdgeMatrixFreePreconditioner::ComputePreconditioner ( const bool  CheckFiltering = false)

Computes the multilevel hierarchy.

Computes the multilevel hierarchy. This function retrives the user's defines parameters (as specified in the input ParameterList), or takes default values otherwise, and creates the ML objects for aggregation and hierarchy. Allocated data can be freed used DestroyPreconditioner(), or by the destructor,

In a Newton-type procedure, several linear systems have to be solved, Often, these systems are not too different. In this case, it might be convenient to keep the already computed preconditioner (with hierarchy, coarse solver, smoothers), and use it to precondition the next linear system. ML offers a way to determine whether the already available preconditioner is "good enough" for the next linear system. The user should proceed as follows:

  • define "reuse: enable" == true
  • solve the first linear system. ML tries to estimate the rate of convergence, and record it;
  • change the values of the linear system matrix (but NOT its structure)
  • compute the new preconditioner as ComputePreconditioner(true) It is supposed that the pointer to the Epetra_RowMatrix remains constant. Currently, it is not possible to modify this pointer (other than creating a new preconditioner) Computes the preconditioner

The documentation for this class was generated from the following file: