#include <ml_RefMaxwell.h>
Public Member Functions | |
RefMaxwellPreconditioner (const Epetra_CrsMatrix &SM_Matrix, const Epetra_CrsMatrix &D0_Clean_Matrix, const Epetra_CrsMatrix &Ms_Matrix, const Epetra_CrsMatrix &M0inv_Matrix, const Epetra_CrsMatrix &M1_Matrix, const Teuchos::ParameterList &List, const bool ComputePrec=true) | |
Constructs a RefMaxwellPreconditioner. | |
Destructor | |
~RefMaxwellPreconditioner () | |
Destructor. | |
int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) 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 w/ RHS B and get result X. | |
int | ComputePreconditioner (const bool CheckFiltering=false) |
Computes the multilevel hierarchy. | |
int | ReComputePreconditioner () |
Recomputes the preconditioner. | |
void | Print (const char *whichHierarchy="11") |
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 UseTranspose) |
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_Comm & | Comm () const |
Returns a pointer to the Epetra_Comm communicator associated with this operator. | |
const Epetra_Map & | OperatorDomainMap () const |
Returns the Epetra_Map object associated with the domain of this operator. | |
const Epetra_Map & | OperatorRangeMap () const |
Returns the Epetra_Map object associated with the range of this operator. | |
Private Member Functions | |
int | SetEdgeSmoother (Teuchos::ParameterList &List_) |
Sets the Edge Smoother (if needed). | |
int | ApplyInverse_Implicit_212 (const Epetra_MultiVector &B, Epetra_MultiVector &X) const |
Implicitly applies in the inverse in a 2-1-2 format. | |
int | ApplyInverse_Implicit_Additive (const Epetra_MultiVector &B, Epetra_MultiVector &X) const |
Implicitly applies in the inverse in an additive format. | |
int | ApplyInverse_Implicit_121 (const Epetra_MultiVector &B, Epetra_MultiVector &X) const |
Implicitly applies in the inverse in an 1-2-1 format. | |
Private Attributes | |
const Epetra_CrsMatrix * | SM_Matrix_ |
Matrix: S+M1(sigma). | |
Epetra_CrsMatrix * | D0_Matrix_ |
Matrix: T or D0 w/ dirichlet nodes and edges zero'd. | |
const Epetra_CrsMatrix * | D0_Clean_Matrix_ |
Matrix: D0 w/ nothing zero'd. | |
const Epetra_CrsMatrix * | Ms_Matrix_ |
Matrix: M1(sigma). | |
const Epetra_CrsMatrix * | M0inv_Matrix_ |
Matrix: M0^{-1}. | |
Epetra_CrsMatrix * | M1_Matrix_ |
Matrix: M1(1). | |
Epetra_CrsMatrix * | TMT_Matrix_ |
Matrix: D0' M1(sigma) D0. | |
Epetra_CrsMatrix * | TMT_Agg_Matrix_ |
Matrix: D0' M1(1) D0. | |
EpetraExt::CrsMatrix_SolverMap | SM_Matrix_Trans_ |
Structure for compatibility between Epetra and ML column maps. | |
EpetraExt::CrsMatrix_SolverMap | D0_Matrix_Trans_ |
Structure for compatibility between Epetra and ML column maps. | |
EpetraExt::CrsMatrix_SolverMap | D0_Clean_Matrix_Trans_ |
Structure for compatibility between Epetra and ML column maps. | |
EpetraExt::CrsMatrix_SolverMap | Ms_Matrix_Trans_ |
Structure for compatibility between Epetra and ML column maps. | |
EpetraExt::CrsMatrix_SolverMap | M0inv_Matrix_Trans_ |
Structure for compatibility between Epetra and ML column maps. | |
EpetraExt::CrsMatrix_SolverMap | M1_Matrix_Trans_ |
Structure for compatibility between Epetra and ML column maps. | |
EpetraExt::CrsMatrix_SolverMap | TMT_Matrix_Trans_ |
Structure for compatibility between Epetra and ML column maps. | |
EpetraExt::CrsMatrix_SolverMap | TMT_Agg_Matrix_Trans_ |
Structure for compatibility between Epetra and ML column maps. | |
int * | BCrows |
Dirichelt Edges. | |
int | numBCrows |
bool | HasOnlyDirichletNodes |
Epetra_Vector * | Diagonal_ |
Vector: Diagonal of reformulated operator. | |
ML_RefMaxwell_11_Operator * | Operator11_ |
(1,1) Block Operator | |
ML_Preconditioner * | EdgePC |
(1,1) Block Preconditioner | |
MultiLevelPreconditioner * | NodePC |
(2,2) Block Preconditioner | |
MultiLevelPreconditioner * | PreEdgeSmoother |
Outer Edge Smoother(s). | |
MultiLevelPreconditioner * | PostEdgeSmoother |
string | mode |
Solver mode. | |
bool | aggregate_with_sigma |
Aggregation info. | |
bool | lump_m1 |
Mass lumping. | |
bool | use_local_nodal_solver |
MultiLevelPreconditioner * | LocalNodalSolver |
const Epetra_CrsMatrix * | NodesToLocalNodes |
Epetra_CrsMatrix * | LocalNodalMatrix |
const Epetra_Map * | DomainMap_ |
Domain Map. | |
const Epetra_Map * | RangeMap_ |
Range Map. | |
const Epetra_Map * | NodeMap_ |
Node Map. | |
const Epetra_Comm * | Comm_ |
Epetra communicator object. | |
bool | verbose_ |
Verbosity flag. | |
bool | very_verbose_ |
Extreme Verbosity flag. | |
bool | print_hierarchy |
Print hierarchy flag. | |
int | NumApplications_ |
Number of applications. | |
double | ApplicationTime_ |
CPU time for all applications of the preconditioner. | |
bool | FirstApplication_ |
double | FirstApplicationTime_ |
int | NumConstructions_ |
Number of construction phases. | |
double | ConstructionTime_ |
CPU time for construction of the preconditioner. |
Detail on this preconditioner can be found in Bochev, Hu, Siefert and Tuminaro, 2007.
ML_Epetra::RefMaxwellPreconditioner::RefMaxwellPreconditioner | ( | const Epetra_CrsMatrix & | SM_Matrix, | |
const Epetra_CrsMatrix & | D0_Clean_Matrix, | |||
const Epetra_CrsMatrix & | Ms_Matrix, | |||
const Epetra_CrsMatrix & | M0inv_Matrix, | |||
const Epetra_CrsMatrix & | M1_Matrix, | |||
const Teuchos::ParameterList & | List, | |||
const bool | ComputePrec = true | |||
) |
ML_Epetra::RefMaxwellPreconditioner::~RefMaxwellPreconditioner | ( | ) |
int ML_Epetra::RefMaxwellPreconditioner::Apply | ( | const Epetra_MultiVector & | X, | |
Epetra_MultiVector & | Y | |||
) | const [inline] |
int ML_Epetra::RefMaxwellPreconditioner::ApplyInverse | ( | const Epetra_MultiVector & | B, | |
Epetra_MultiVector & | X | |||
) | const |
int ML_Epetra::RefMaxwellPreconditioner::ApplyInverse_Implicit_121 | ( | const Epetra_MultiVector & | B, | |
Epetra_MultiVector & | X | |||
) | const [private] |
int ML_Epetra::RefMaxwellPreconditioner::ApplyInverse_Implicit_212 | ( | const Epetra_MultiVector & | B, | |
Epetra_MultiVector & | X | |||
) | const [private] |
int ML_Epetra::RefMaxwellPreconditioner::ApplyInverse_Implicit_Additive | ( | const Epetra_MultiVector & | B, | |
Epetra_MultiVector & | X | |||
) | const [private] |
const Epetra_Comm& ML_Epetra::RefMaxwellPreconditioner::Comm | ( | ) | const [inline] |
int ML_Epetra::RefMaxwellPreconditioner::ComputePreconditioner | ( | const bool | CheckFiltering = false |
) |
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:
"adaptive: enable"
== true
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 int ML_Epetra::RefMaxwellPreconditioner::DestroyPreconditioner | ( | ) |
bool ML_Epetra::RefMaxwellPreconditioner::HasNormInf | ( | ) | const [inline] |
double ML_Epetra::RefMaxwellPreconditioner::NormInf | ( | ) | const [inline] |
const Epetra_Map& ML_Epetra::RefMaxwellPreconditioner::OperatorDomainMap | ( | ) | const [inline] |
const Epetra_Map& ML_Epetra::RefMaxwellPreconditioner::OperatorRangeMap | ( | ) | const [inline] |
void ML_Epetra::RefMaxwellPreconditioner::Print | ( | const char * | whichHierarchy = "11" |
) |
int ML_Epetra::RefMaxwellPreconditioner::ReComputePreconditioner | ( | ) | [inline] |
int ML_Epetra::RefMaxwellPreconditioner::SetEdgeSmoother | ( | Teuchos::ParameterList & | List_ | ) | [private] |
int ML_Epetra::RefMaxwellPreconditioner::SetUseTranspose | ( | bool | UseTranspose | ) | [inline] |
bool ML_Epetra::RefMaxwellPreconditioner::UseTranspose | ( | ) | const [inline] |
bool ML_Epetra::RefMaxwellPreconditioner::aggregate_with_sigma [private] |
double ML_Epetra::RefMaxwellPreconditioner::ApplicationTime_ [private] |
int* ML_Epetra::RefMaxwellPreconditioner::BCrows [private] |
const Epetra_Comm* ML_Epetra::RefMaxwellPreconditioner::Comm_ [private] |
double ML_Epetra::RefMaxwellPreconditioner::ConstructionTime_ [private] |
const Epetra_CrsMatrix* ML_Epetra::RefMaxwellPreconditioner::D0_Clean_Matrix_ [private] |
EpetraExt::CrsMatrix_SolverMap ML_Epetra::RefMaxwellPreconditioner::D0_Clean_Matrix_Trans_ [private] |
Epetra_CrsMatrix* ML_Epetra::RefMaxwellPreconditioner::D0_Matrix_ [private] |
EpetraExt::CrsMatrix_SolverMap ML_Epetra::RefMaxwellPreconditioner::D0_Matrix_Trans_ [private] |
Epetra_Vector* ML_Epetra::RefMaxwellPreconditioner::Diagonal_ [private] |
const Epetra_Map* ML_Epetra::RefMaxwellPreconditioner::DomainMap_ [private] |
ML_Preconditioner* ML_Epetra::RefMaxwellPreconditioner::EdgePC [private] |
bool ML_Epetra::RefMaxwellPreconditioner::FirstApplication_ [private] |
double ML_Epetra::RefMaxwellPreconditioner::FirstApplicationTime_ [private] |
bool ML_Epetra::RefMaxwellPreconditioner::HasOnlyDirichletNodes [private] |
Epetra_CrsMatrix* ML_Epetra::RefMaxwellPreconditioner::LocalNodalMatrix [private] |
bool ML_Epetra::RefMaxwellPreconditioner::lump_m1 [private] |
const Epetra_CrsMatrix* ML_Epetra::RefMaxwellPreconditioner::M0inv_Matrix_ [private] |
EpetraExt::CrsMatrix_SolverMap ML_Epetra::RefMaxwellPreconditioner::M0inv_Matrix_Trans_ [private] |
Epetra_CrsMatrix* ML_Epetra::RefMaxwellPreconditioner::M1_Matrix_ [private] |
EpetraExt::CrsMatrix_SolverMap ML_Epetra::RefMaxwellPreconditioner::M1_Matrix_Trans_ [private] |
string ML_Epetra::RefMaxwellPreconditioner::mode [private] |
const Epetra_CrsMatrix* ML_Epetra::RefMaxwellPreconditioner::Ms_Matrix_ [private] |
EpetraExt::CrsMatrix_SolverMap ML_Epetra::RefMaxwellPreconditioner::Ms_Matrix_Trans_ [private] |
const Epetra_Map* ML_Epetra::RefMaxwellPreconditioner::NodeMap_ [private] |
const Epetra_CrsMatrix* ML_Epetra::RefMaxwellPreconditioner::NodesToLocalNodes [private] |
int ML_Epetra::RefMaxwellPreconditioner::NumApplications_ [private] |
int ML_Epetra::RefMaxwellPreconditioner::numBCrows [private] |
int ML_Epetra::RefMaxwellPreconditioner::NumConstructions_ [private] |
bool ML_Epetra::RefMaxwellPreconditioner::print_hierarchy [private] |
const Epetra_Map* ML_Epetra::RefMaxwellPreconditioner::RangeMap_ [private] |
const Epetra_CrsMatrix* ML_Epetra::RefMaxwellPreconditioner::SM_Matrix_ [private] |
EpetraExt::CrsMatrix_SolverMap ML_Epetra::RefMaxwellPreconditioner::SM_Matrix_Trans_ [private] |
Epetra_CrsMatrix* ML_Epetra::RefMaxwellPreconditioner::TMT_Agg_Matrix_ [private] |
EpetraExt::CrsMatrix_SolverMap ML_Epetra::RefMaxwellPreconditioner::TMT_Agg_Matrix_Trans_ [private] |
Epetra_CrsMatrix* ML_Epetra::RefMaxwellPreconditioner::TMT_Matrix_ [private] |
EpetraExt::CrsMatrix_SolverMap ML_Epetra::RefMaxwellPreconditioner::TMT_Matrix_Trans_ [private] |
bool ML_Epetra::RefMaxwellPreconditioner::use_local_nodal_solver [private] |
bool ML_Epetra::RefMaxwellPreconditioner::verbose_ [private] |
bool ML_Epetra::RefMaxwellPreconditioner::very_verbose_ [private] |