ML
Version of the Day
|
Black-box multilevel adaptive smoothed aggregation preconditioner. More...
#include <MLAPI_MultiLevelAdaptiveSA.h>
Public Member Functions | |
MultiLevelAdaptiveSA (const Operator &FineMatrix, Teuchos::ParameterList &List, const int NumPDEEqns, const int MaxLevels=20) | |
Constructs the hierarchy for given Operator and parameters. | |
virtual | ~MultiLevelAdaptiveSA () |
Destructor. | |
const Space | GetOperatorDomainSpace () const |
Returns a copy of the internally stored domain space. | |
const Space | GetOperatorRangeSpace () const |
Returns a copy of the internally stored range space. | |
const Space | GetDomainSpace () const |
Returns a copy of the internally stored domain space. | |
const Space | GetRangeSpace () const |
Returns a copy of the internally stored range space. | |
Operator & | R (const int i) |
Returns a reference to the restriction operator of level i . | |
const Operator & | R (const int i) const |
Returns a reference to the restriction operator of level i . | |
Operator & | A (const int i) |
Returns a reference to the operator of level i . | |
const Operator & | A (const int i) const |
Returns a reference to the operator of level i . | |
Operator & | P (const int i) |
Returns a reference to the prolongator operator of level i . | |
const Operator & | P (const int i) const |
Returns a reference to the prolongator operator of level i . | |
InverseOperator & | S (const int i) |
Returns a reference to the inverse operator of level i . | |
const InverseOperator & | S (const int i) const |
Returns a reference to the inverse operator of level i . | |
int | GetMaxLevels () const |
Returns the actual number of levels. | |
void | SetMaxLevels (const int MaxLevels) |
Returns the actual number of levels. | |
const MultiVector | GetNullSpace () const |
Gets a reference to the internally stored null space. | |
void | SetNullSpace (MultiVector &NullSpace) |
Sets the null space multi-vector to NullSpace . | |
bool | IsComputed () const |
Returns true if the hierarchy has been successfully computed. | |
void | SetList (Teuchos::ParameterList &List) |
Sets the internally stored list to List . | |
std::string | GetSmootherType () |
Returns the smoother solver type. | |
std::string | GetCoarseType () |
Returns the coarse solver type. | |
void | SetInputNumPDEEqns (const int n) |
Returns the number of PDE equations on the finest level. | |
int | GetInputNumPDEEqns () |
Returns the number of PDE equations on the current level. | |
int | GetNumPDEEqns () |
Sets the number of PDE equations on the current level. | |
void | SetNumPDEEqns (const int NumPDEEqns) |
int | GetMaxCoarseSize () |
Returns the maximum allowed coarse size. | |
double | GetMaxReduction () |
Returns the maximum allowed reduction. | |
int | GetNumItersCoarse () |
Returns the maximum number of applications on the coarser levels. | |
int | GetNumItersFine () |
Returns the maximum number of applications on the finest level. | |
double | GetComplexity () |
Returns the multigrid preconditioner operator complexity. | |
void | Compute () |
Creates an hierarchy using the provided or default null space. | |
void | AdaptCompute (const bool UseDefaultOrSpecified, int AdditionalCandidates) |
Setup the adaptive multilevel hierarchy. | |
void | SetupInitialNullSpace () |
Computes the first component of the null space. | |
bool | IncrementNullSpace () |
Increments the null space dimension by one. | |
int | Apply (const MultiVector &b_f, MultiVector &x_f) const |
Applies the preconditioner to b_f , returns the result in x_f . | |
int | SolveMultiLevelSA (const MultiVector &b_f, MultiVector &x_f, int level) const |
Recursively called core of the multi level preconditioner. | |
std::ostream & | Print (std::ostream &os, const bool verbose=true) const |
Prints basic information about this preconditioner. | |
Public Member Functions inherited from MLAPI::BaseOperator | |
virtual | ~BaseOperator () |
Virtual destructor. | |
Public Member Functions inherited from MLAPI::BaseObject | |
BaseObject () | |
Constructor with empty label. | |
BaseObject (const std::string &Label) | |
Constructor with given Label. | |
virtual | ~BaseObject () |
Destructor. | |
void | SetLabel (const std::string &Label) |
Sets the Label of this object to Label . | |
const std::string & | GetLabel () const |
Returns the Label of this object. | |
Public Member Functions inherited from MLAPI::CompObject | |
CompObject () | |
Constructor, set counter to 0.0. | |
~CompObject () | |
Destructor. | |
double | GetFlops () const |
Returns the internal counter of flops. | |
void | SetFlops (double Flops) const |
Sets internal counter to Flops . | |
void | UpdateFlops (double Flops) const |
Updates internal counter by summing Flops . | |
Public Member Functions inherited from MLAPI::TimeObject | |
TimeObject () | |
Constructor, set counter to 0.0. | |
~TimeObject () | |
Destructor. | |
void | ResetTimer () const |
Resets the internal timer. | |
void | UpdateTime () const |
Updates the internal timer with the time spent since the last call to ResetTimer(). | |
void | UpdateTime (double t) const |
Updates the internal timer with input value t . | |
double | GetTime () const |
Returns the internally stored counter. | |
Additional Inherited Members | |
Protected Attributes inherited from MLAPI::TimeObject | |
Epetra_Time | Time_ |
Object used to track time. | |
double | TotalTime_ |
Internal counter. | |
Black-box multilevel adaptive smoothed aggregation preconditioner.
This class implements an adaptive smoothed aggregation preconditioner. An example of usage is reported in file AdaptiveSA.cpp. We note that the usage of this class is slightly different from that of MultiLevelSA.
An instance of this class can be created as follows:
Important methods of this class:
A(level)
, P(level)
, R(level)
and S(level)
return a reference to the internally stored operators.The general usage is:
store the structure of the aggregates for all phases.
Current implementation supposes zero threshold.