|
IFEM
90A354
|
Class implementing a Schur-complement preconditioner for 2-block systems. More...
#include <PETScSchurPC.h>

Public Member Functions | |
| PETScSchurPC (PC &pc_init, const std::vector< Mat > &blocks, const LinSolParams::BlockParams ¶ms, const ProcessAdm &adm) | |
| The constructor sets up the preconditioner. More... | |
| ~PETScSchurPC () | |
| The destructor frees the PETSc structures. | |
Static Public Member Functions | |
| static PetscErrorCode | Apply_Schur (Mat A, Vec x, Vec y) |
| PETSc compatible function applying the Schur complement matrix. More... | |
| static PetscErrorCode | Apply_Outer (PC pc, Vec x, Vec y) |
| PETSc compatible function applying the Schur complement preconditioner. More... | |
| static PetscErrorCode | Destroy (PC pc) |
| Destroy a Schur preconditioner. More... | |
Protected Attributes | |
| KSP | inner_ksp |
| The KSP for the approximation of inner matrix inverse. | |
| KSP | outer_ksp |
| The KSP for the approximated Schur complement. | |
| Mat | outer_mat |
| Matrix shell describing the Schur complement. | |
| Vec | tmp |
| Temporary vector. | |
| const std::vector< Mat > * | m_blocks |
| Matrix blocks in system. | |
Class implementing a Schur-complement preconditioner for 2-block systems.
| PETScSchurPC::PETScSchurPC | ( | PC & | pc_init, |
| const std::vector< Mat > & | blocks, | ||
| const LinSolParams::BlockParams & | params, | ||
| const ProcessAdm & | adm | ||
| ) |
The constructor sets up the preconditioner.
| pc_init | The PETSc PC to set up |
| blocks | The matrix blocks |
| params | Linear solver parameters |
| adm | Processes administrator |
References Apply_Outer(), Apply_Schur(), Destroy(), SettingMap::getDoubleValue(), SettingMap::getIntValue(), SettingMap::getStringValue(), inner_ksp, outer_ksp, outer_mat, and tmp.
|
static |
PETSc compatible function applying the Schur complement preconditioner.
| pc | Shell preconditioner to apply |
| x | Vector to apply preconditioner to |
| y | Result of preconditioner evaluation |
References outer_ksp.
Referenced by PETScSchurPC().
|
static |
PETSc compatible function applying the Schur complement matrix.
| A | Shell matrix to apply |
| x | Vector to apply matrix to |
| y | Result of matrix-vector product |
References inner_ksp, m_blocks, and tmp.
Referenced by PETScSchurPC().
|
static |
Destroy a Schur preconditioner.
| pc | Preconditioner to destroy |
Referenced by PETScSchurPC().