#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. | |
| string | GetSmootherType () |
| Returns the smoother solver type. | |
| 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. | |
Private Member Functions | |
| void | GetSmoothedP (Operator A, Teuchos::ParameterList &List, MultiVector &NS, Operator &P, MultiVector &NewNS) |
| Returns the smoothed prolongator operator. | |
| void | ResizeArrays (const int MaxLevels) |
Private Attributes | |
| int | MaxLevels_ |
| Maximum number of levels. | |
| Operator | FineMatrix_ |
| Fine-level matrix. | |
| std::vector< Operator > | A_ |
| Contains the hierarchy of operators. | |
| std::vector< Operator > | R_ |
| Contains the hierarchy of restriction operators. | |
| std::vector< Operator > | P_ |
| Contains the hierarchy of prolongator operators. | |
| std::vector< InverseOperator > | S_ |
| Contains the hierarchy of inverse operators. | |
| Teuchos::ParameterList | List_ |
| MultiVector | NullSpace_ |
| Contains the current null space. | |
| bool | IsComputed_ |
true if a hierarchy has been successfully computed. | |
| int | NumPDEEqns_ |
| Number of PDE equations on the finest grid. | |
An instance of this class can be created as follows:
int NumPDEEqns = 1; int MaxLevels = 10; MultiLevelAdaptiveSA Prec(FineMatrix, List, NumPDEEqns, MaxLevels);
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:
Current implementation supposes zero threshold.
| MLAPI::MultiLevelAdaptiveSA::MultiLevelAdaptiveSA | ( | const Operator | FineMatrix, | |
| Teuchos::ParameterList & | List, | |||
| const int | NumPDEEqns, | |||
| const int | MaxLevels = 20 | |||
| ) | [inline] |
| virtual MLAPI::MultiLevelAdaptiveSA::~MultiLevelAdaptiveSA | ( | ) | [inline, virtual] |
| const Operator& MLAPI::MultiLevelAdaptiveSA::A | ( | const int | i | ) | const [inline] |
| Operator& MLAPI::MultiLevelAdaptiveSA::A | ( | const int | i | ) | [inline] |
| void MLAPI::MultiLevelAdaptiveSA::AdaptCompute | ( | const bool | UseDefaultOrSpecified, | |
| int | AdditionalCandidates | |||
| ) | [inline] |
| int MLAPI::MultiLevelAdaptiveSA::Apply | ( | const MultiVector & | b_f, | |
| MultiVector & | x_f | |||
| ) | const [inline, virtual] |
Implements MLAPI::BaseOperator.
| void MLAPI::MultiLevelAdaptiveSA::Compute | ( | ) | [inline] |
| string MLAPI::MultiLevelAdaptiveSA::GetCoarseType | ( | ) | [inline] |
| double MLAPI::MultiLevelAdaptiveSA::GetComplexity | ( | ) | [inline] |
| const Space MLAPI::MultiLevelAdaptiveSA::GetDomainSpace | ( | ) | const [inline] |
| int MLAPI::MultiLevelAdaptiveSA::GetInputNumPDEEqns | ( | ) | [inline] |
| int MLAPI::MultiLevelAdaptiveSA::GetMaxCoarseSize | ( | ) | [inline] |
| int MLAPI::MultiLevelAdaptiveSA::GetMaxLevels | ( | ) | const [inline] |
| double MLAPI::MultiLevelAdaptiveSA::GetMaxReduction | ( | ) | [inline] |
| const MultiVector MLAPI::MultiLevelAdaptiveSA::GetNullSpace | ( | ) | const [inline] |
| int MLAPI::MultiLevelAdaptiveSA::GetNumItersCoarse | ( | ) | [inline] |
| int MLAPI::MultiLevelAdaptiveSA::GetNumItersFine | ( | ) | [inline] |
| int MLAPI::MultiLevelAdaptiveSA::GetNumPDEEqns | ( | ) | [inline] |
| const Space MLAPI::MultiLevelAdaptiveSA::GetOperatorDomainSpace | ( | ) | const [inline, virtual] |
Implements MLAPI::BaseOperator.
| const Space MLAPI::MultiLevelAdaptiveSA::GetOperatorRangeSpace | ( | ) | const [inline, virtual] |
Implements MLAPI::BaseOperator.
| const Space MLAPI::MultiLevelAdaptiveSA::GetRangeSpace | ( | ) | const [inline] |
| void MLAPI::MultiLevelAdaptiveSA::GetSmoothedP | ( | Operator | A, | |
| Teuchos::ParameterList & | List, | |||
| MultiVector & | NS, | |||
| Operator & | P, | |||
| MultiVector & | NewNS | |||
| ) | [inline, private] |
| string MLAPI::MultiLevelAdaptiveSA::GetSmootherType | ( | ) | [inline] |
| bool MLAPI::MultiLevelAdaptiveSA::IncrementNullSpace | ( | ) | [inline] |
| bool MLAPI::MultiLevelAdaptiveSA::IsComputed | ( | ) | const [inline] |
| const Operator& MLAPI::MultiLevelAdaptiveSA::P | ( | const int | i | ) | const [inline] |
| Operator& MLAPI::MultiLevelAdaptiveSA::P | ( | const int | i | ) | [inline] |
| std::ostream& MLAPI::MultiLevelAdaptiveSA::Print | ( | std::ostream & | os, | |
| const bool | verbose = true | |||
| ) | const [inline, virtual] |
Implements MLAPI::BaseObject.
| const Operator& MLAPI::MultiLevelAdaptiveSA::R | ( | const int | i | ) | const [inline] |
| Operator& MLAPI::MultiLevelAdaptiveSA::R | ( | const int | i | ) | [inline] |
| void MLAPI::MultiLevelAdaptiveSA::ResizeArrays | ( | const int | MaxLevels | ) | [inline, private] |
| const InverseOperator& MLAPI::MultiLevelAdaptiveSA::S | ( | const int | i | ) | const [inline] |
| InverseOperator& MLAPI::MultiLevelAdaptiveSA::S | ( | const int | i | ) | [inline] |
| void MLAPI::MultiLevelAdaptiveSA::SetInputNumPDEEqns | ( | const int | n | ) | [inline] |
| void MLAPI::MultiLevelAdaptiveSA::SetList | ( | Teuchos::ParameterList & | List | ) | [inline] |
| void MLAPI::MultiLevelAdaptiveSA::SetMaxLevels | ( | const int | MaxLevels | ) | [inline] |
| void MLAPI::MultiLevelAdaptiveSA::SetNullSpace | ( | MultiVector & | NullSpace | ) | [inline] |
| void MLAPI::MultiLevelAdaptiveSA::SetNumPDEEqns | ( | const int | NumPDEEqns | ) | [inline] |
| void MLAPI::MultiLevelAdaptiveSA::SetupInitialNullSpace | ( | ) | [inline] |
| int MLAPI::MultiLevelAdaptiveSA::SolveMultiLevelSA | ( | const MultiVector & | b_f, | |
| MultiVector & | x_f, | |||
| int | level | |||
| ) | const [inline] |
std::vector<Operator> MLAPI::MultiLevelAdaptiveSA::A_ [private] |
bool MLAPI::MultiLevelAdaptiveSA::IsComputed_ [private] |
Teuchos::ParameterList MLAPI::MultiLevelAdaptiveSA::List_ [private] |
int MLAPI::MultiLevelAdaptiveSA::MaxLevels_ [private] |
int MLAPI::MultiLevelAdaptiveSA::NumPDEEqns_ [private] |
std::vector<Operator> MLAPI::MultiLevelAdaptiveSA::P_ [private] |
std::vector<Operator> MLAPI::MultiLevelAdaptiveSA::R_ [private] |
std::vector<InverseOperator> MLAPI::MultiLevelAdaptiveSA::S_ [private] |