|
Teko Version of the Day
|
Sparse matrix-vector multiplication for augmented Lagrangian-based preconditioners. More...
#include <Teko_ALOperator.hpp>

Public Member Functions | |
| ALOperator (const std::vector< std::vector< GO > > &vars, const Teuchos::RCP< Tpetra::Operator< ST, LO, GO, NT > > &content, LinearOp pressureMassMatrix, double gamma=0.05, const std::string &label="<ANYM>") | |
| ALOperator (const std::vector< std::vector< GO > > &vars, const Teuchos::RCP< Tpetra::Operator< ST, LO, GO, NT > > &content, double gamma=0.05, const std::string &label="<ANYM>") | |
| void | setPressureMassMatrix (LinearOp pressureMassMatrix) |
| const LinearOp & | getPressureMassMatrix () const |
| void | setGamma (double gamma) |
| const double & | getGamma () const |
| void | augmentRHS (const Tpetra::MultiVector< ST, LO, GO, NT > &b, Tpetra::MultiVector< ST, LO, GO, NT > &bAugmented) |
| int | getNumberOfBlockRows () const |
| virtual void | RebuildOps () |
| const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > | GetBlock (int i, int j) const |
Public Member Functions inherited from Teko::TpetraHelpers::BlockedTpetraOperator | |
| BlockedTpetraOperator (const std::vector< std::vector< GO > > &vars, const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > &content, const std::string &label="<ANYM>") | |
| virtual void | SetContent (const std::vector< std::vector< GO > > &vars, const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > &content) |
| void | Reorder (const BlockReorderManager &brm) |
| void | RemoveReording () |
| Remove any reordering on this object. | |
| virtual void | WriteBlocks (const std::string &prefix) const |
| bool | testAgainstFullOperator (int count, ST tol) const |
| Helps perform sanity checks. | |
Public Member Functions inherited from Teko::TpetraHelpers::TpetraOperatorWrapper | |
| const RCP< const Thyra::LinearOpBase< ST > > | getThyraOp () const |
| Return the thyra operator associated with this wrapper. | |
| const RCP< const MappingStrategy > | getMapStrategy () const |
| Get the mapping strategy for this wrapper (translate between Thyra and Tpetra) | |
| virtual int | GetBlockRowCount () |
| Get the number of block rows in this operator. | |
| virtual int | GetBlockColCount () |
| Get the number of block columns in this operator. | |
| Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > | GetBlock (int i, int j) const |
| Grab the i,j block. | |
Protected Member Functions | |
| void | checkDim (const std::vector< std::vector< GO > > &vars) |
| void | BuildALOperator () |
Protected Attributes | |
| Teuchos::RCP< Thyra::LinearOpBase< ST > > | alOperator_ |
| Teuchos::RCP< Thyra::LinearOpBase< ST > > | alOperatorRhs_ |
| LinearOp | pressureMassMatrix_ |
| double | gamma_ |
| int | dim_ |
| int | numBlockRows_ |
Sparse matrix-vector multiplication for augmented Lagrangian-based preconditioners.
This class implements sparse matrix-vector multiplication for augmented Lagrangian-based preconditioners. Details can be found in the following papers:
[1] M. Benzi and M. A. Olshanskii, An Augmented Lagrangian-Based Approach to the Oseen Problem, SIAM J. Scientific Computing, 28 (2006), pp. 2095-2113.
[2] Benzi, M. A. Olshanskii and Z. Wang, Modified Augmented Lagrangian Preconditioners for the Incompressible Navier-Stokes Equations, International Journal for Numerical Methods in Fluids, 66 (2011), pp. 486-508.
Suppose we are solving the following linear system:
![$
\left[ \begin{array}{cc}
A & B^T \\
B & -C
\end{array} \right]
\left[ \begin{array}{c}
u \\
p
\end{array} \right]
=
\left[ \begin{array}{c}
f \\
g
\end{array} \right].
$](form_25.png)
The equivalent augmented Lagrangian formulation is:
![$
\left[ \begin{array}{cc}
A + \gamma B^T W^{-1} B & B^T - \gamma B^T W^{-1} C \\
B & -C
\end{array} \right]
\left[ \begin{array}{c}
u \\
p
\end{array} \right]
=
\left[ \begin{array}{c}
f + \gamma B^T W^{-1} g \\
g
\end{array} \right]
$](form_26.png)
or

Here 

This class implements the matrix vector product with 
Definition at line 79 of file Teko_ALOperator.hpp.
| Teko::NS::ALOperator::ALOperator | ( | const std::vector< std::vector< GO > > & | vars, |
| const Teuchos::RCP< Tpetra::Operator< ST, LO, GO, NT > > & | content, | ||
| LinearOp | pressureMassMatrix, | ||
| double | gamma = 0.05, |
||
| const std::string & | label = "<ANYM>" |
||
| ) |
Build an augmented Lagrangian operator based on a vector of vector of global IDs.
| [in] | vars | Vector of vectors of global ids specifying how the operator is to be blocked. |
| [in] | content | Operator to be blocked |
| [in] | pressureMassMatrix | Pressure mass matrix |
| [in] | gamma | Augmentation parameter |
| [in] | label | Label for name the operator |
Definition at line 40 of file Teko_ALOperator.cpp.
| Teko::NS::ALOperator::ALOperator | ( | const std::vector< std::vector< GO > > & | vars, |
| const Teuchos::RCP< Tpetra::Operator< ST, LO, GO, NT > > & | content, | ||
| double | gamma = 0.05, |
||
| const std::string & | label = "<ANYM>" |
||
| ) |
Build a modified augmented Lagrangian operator based on a vector of vector of global IDs.
| [in] | vars | Vector of vectors of global ids specifying how the operator is to be blocked. |
| [in] | content | Operator to be blocked |
| [in] | gamma | Augmentation parameter |
| [in] | label | Name of the operator |
Definition at line 50 of file Teko_ALOperator.cpp.
| void Teko::NS::ALOperator::setPressureMassMatrix | ( | LinearOp | pressureMassMatrix | ) |
Set the pressure mass matrix.
Definition at line 60 of file Teko_ALOperator.cpp.
|
inline |
Returns pressure mass matrix that can be used to construct preconditioner.
Definition at line 123 of file Teko_ALOperator.hpp.
| void Teko::NS::ALOperator::setGamma | ( | double | gamma | ) |
Set gamma.
Definition at line 64 of file Teko_ALOperator.cpp.
|
inline |
Returns augmentation parameter gamma.
Definition at line 129 of file Teko_ALOperator.hpp.
| void Teko::NS::ALOperator::augmentRHS | ( | const Tpetra::MultiVector< ST, LO, GO, NT > & | b, |
| Tpetra::MultiVector< ST, LO, GO, NT > & | bAugmented | ||
| ) |
Build augmented RHS.
| [in] | b | Right-hand side. |
| [out] | bAugmented | Augmented right-hand side. |
Definition at line 179 of file Teko_ALOperator.cpp.
|
inline |
Returns number of block rows.
Definition at line 142 of file Teko_ALOperator.hpp.
|
inlinevirtual |
Force a rebuild of the blocked operator from the stored content operator.
Reimplemented from Teko::TpetraHelpers::BlockedTpetraOperator.
Definition at line 145 of file Teko_ALOperator.hpp.
| const Teuchos::RCP< const Tpetra::Operator< ST, LO, GO, NT > > Teko::NS::ALOperator::GetBlock | ( | int | i, |
| int | j | ||
| ) | const |
Get the (i,j) block of the original (non-augmented) operator.
Definition at line 69 of file Teko_ALOperator.cpp.
|
protected |
Check dimension. Only implemented for 2D and 3D problems.
Definition at line 78 of file Teko_ALOperator.cpp.
|
protected |
Build AL operator.
Definition at line 83 of file Teko_ALOperator.cpp.
|
protected |
AL operator.
Definition at line 152 of file Teko_ALOperator.hpp.
|
protected |
Operator for augmenting the right-hand side.
Definition at line 155 of file Teko_ALOperator.hpp.
|
protected |
Pressure mass matrix and inverse pressure mass matrix.
Definition at line 158 of file Teko_ALOperator.hpp.
|
protected |
Augmentation parameter.
Definition at line 162 of file Teko_ALOperator.hpp.
|
protected |
Dimension of the problem.
Definition at line 165 of file Teko_ALOperator.hpp.
|
protected |
Number of block rows.
Definition at line 168 of file Teko_ALOperator.hpp.