IFEM  90A354
Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
ISTL::BlockPreconditioner Class Reference

#include <ISTLSolParams.h>

Inheritance diagram for ISTL::BlockPreconditioner:
Inheritance graph
[legend]
Collaboration diagram for ISTL::BlockPreconditioner:
Collaboration graph
[legend]

Public Member Functions

Dune::SolverCategory::Category category () const
 The category the preconditioner is part of.
 
 BlockPreconditioner (const ISTL::Mat &A, const DomainDecomposition &dd_, const std::string &schurType)
 Constructor. More...
 
 ~BlockPreconditioner () override
 Destructor.
 
void pre (ISTL::Vec &x, ISTL::Vec &b) override
 Preprocess preconditioner.
 
void apply (ISTL::Vec &v, const ISTL::Vec &d) override
 Applies the preconditioner. More...
 
void post (ISTL::Vec &x) override
 Post-process function.
 
std::unique_ptr< ISTL::Preconditioner > & getBlockPre (size_t block)
 Obtain reference to a block preconditioner.
 
ISTL::Mat & getBlock (size_t block)
 Obtain reference to a block matrix.
 
ISTL::Operator & getBlockOp (size_t block)
 Obtain matrix adaptor for a block matrix.
 

Static Protected Member Functions

static void extractBlock (ISTL::Mat &B, const ISTL::Mat &A, const std::set< int > &eqs_row, const std::set< int > &eqs_col, const std::map< int, int > &eqs_col_g2l)
 Build block from block equations.
 
static void subtractMatrices (ISTL::Mat &A, const ISTL::Mat &B, const ISTL::Mat &C)
 Find A = B - C.
 

Protected Attributes

std::vector< std::unique_ptr< ISTL::Preconditioner > > blockPre
 The preconditioners.
 
std::vector< std::unique_ptr< ISTL::Operator > > blockOp
 The matrix adaptors for the blocks.
 
std::vector< ISTL::Mat > blocks
 Matrix blocks.
 
const DomainDecompositiondd
 Domain decomposition.
 

Detailed Description

This implements a Schur-decomposition based preconditioner for the block system [A B] [C D]

The preconditioner is [Apre B] [ P] Here Apre is some preconditioner for A and P some preconditioner for S = D - C*diag(A)^-1*B. The B block may be dropped. !

Constructor & Destructor Documentation

◆ BlockPreconditioner()

ISTL::BlockPreconditioner::BlockPreconditioner ( const ISTL::Mat &  A,
const DomainDecomposition dd_,
const std::string &  schurType 
)

Constructor.

Parameters
[in]AThe system matrix
[in]dd_Domain decomposition
[in]schurTypeType of schur decomposition to use

References blockOp, blockPre, blocks, dd, extractBlock(), DomainDecomposition::getBlockEqs(), DomainDecomposition::getG2LEQ(), DomainDecomposition::getNoBlocks(), and subtractMatrices().

Member Function Documentation

◆ apply()

void ISTL::BlockPreconditioner::apply ( ISTL::Vec &  v,
const ISTL::Vec &  d 
)
override

Applies the preconditioner.

Parameters
[out]vThe resulting vector
[in]dThe vector to apply the preconditioner to

References blockPre, blocks, dd, DomainDecomposition::getBlockEqs(), and DomainDecomposition::getNoBlocks().


The documentation for this class was generated from the following files: