FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ > Class Template Referenceabstract

UMFPACK Saddle-Point Mean solver class. More...

#include <umfpack.hpp>

Inheritance diagram for FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >:
FEAT::Solver::SolverBase< LAFEM::TupleVector< LAFEM::DenseVectorBlocked< DT_, IT_, dim_ >, LAFEM::DenseVector< DT_, IT_ > > >

Public Types

typedef SolverBase< VectorTypeBaseClass
 our base class More...
 
typedef LAFEM::SaddlePointMatrix< MatrixTypeA, MatrixTypeB, MatrixTypeDMatrixType
 
typedef LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, dim_ > MatrixTypeA
 compatible matrix type More...
 
typedef LAFEM::SparseMatrixBCSR< DT_, IT_, dim_, 1 > MatrixTypeB
 
typedef LAFEM::SparseMatrixBCSR< DT_, IT_, 1, dim_ > MatrixTypeD
 
typedef LAFEM::SparseMatrixCSR< double, IndexUmfMatrixType
 
typedef LAFEM::DenseVector< double, IndexUmfVectorType
 
typedef LAFEM::TupleVector< VectorTypeV, VectorTypePVectorType
 
typedef LAFEM::DenseVector< DT_, IT_ > VectorTypeP
 
typedef LAFEM::DenseVectorBlocked< DT_, IT_, dim_ > VectorTypeV
 compatible vector type More...
 

Public Member Functions

 SaddleUmfpackMean (const MatrixType &system_matrix, const LAFEM::MeanFilter< DT_, IT_ > &mean_filter)
 Constructor. More...
 
 SaddleUmfpackMean (const MatrixType &system_matrix, const VectorTypeP &weight_vector)
 Constructor. More...
 
virtual Status apply (LAFEM::TupleVector< LAFEM::DenseVectorBlocked< DT_, IT_, dim_ >, LAFEM::DenseVector< DT_, IT_ > > &vec_cor, const LAFEM::TupleVector< LAFEM::DenseVectorBlocked< DT_, IT_, dim_ >, LAFEM::DenseVector< DT_, IT_ > > &vec_def)=0
 Solver application method. More...
 
virtual Status apply (VectorType &vec_sol, const VectorType &vec_rhs) override
 Solves a linear system with the factorized system matrix. More...
 
virtual void done ()
 Finalization method. More...
 
virtual void done_numeric () override
 Numeric finalization method. More...
 
virtual void done_symbolic () override
 Symbolic finalization method. More...
 
virtual void init ()
 Initialization method. More...
 
virtual void init_numeric () override
 Numeric initialization method. More...
 
virtual void init_symbolic () override
 Symbolic initialization method. More...
 
virtual String name () const override
 Returns the name of the solver. More...
 

Private Attributes

UmfMatrixType _solver_matrix
 our extended system matrix More...
 
const MatrixType_system_matrix
 system matrix More...
 
Umfpack _umfpack
 our internal Umfpack solver object More...
 
UmfVectorType _vec_b
 
UmfVectorType _vec_x
 two temporary extended vectors More...
 
const VectorTypeP_weight_vector
 weight vector from mean filter More...
 

Detailed Description

template<typename DT_, typename IT_, int dim_>
class FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >

UMFPACK Saddle-Point Mean solver class.

This class implements a variant of the Umfpack solver, which is capable of solving linear systems on SaddlePointMatrix objects including the integral mean constraint or any other constraint that can be expressed as a scalar Lagrange multiplier to the second solution component (usually the pressure) of the original system.

This class can be used to solve (Navier-)Stokes systems with full Dirichlet boundary conditions for the velocity, which in turn requires a MeanFilter constraint for the pressure to make the system regular. In this case, the sub-matrix blocks A and B are required to be filtered by the corresponding UnitFilterBlocked by the caller, whereas the MeanFilter is passed to this solver class.

This class offers two constructors:

  • A CTOR which takes a SaddlePointMatrix and a MeanFilter for the second component as input
  • A CTOR which takes a SaddlePointMatrix and a DenseVector representing the Lagrange multiplier as input.
Author
Peter Zajac

Definition at line 276 of file umfpack.hpp.

Member Typedef Documentation

◆ BaseClass

template<typename DT_ , typename IT_ , int dim_>
typedef SolverBase<VectorType> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::BaseClass

our base class

Definition at line 295 of file umfpack.hpp.

◆ MatrixType

template<typename DT_ , typename IT_ , int dim_>
typedef LAFEM::SaddlePointMatrix<MatrixTypeA, MatrixTypeB, MatrixTypeD> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::MatrixType

Definition at line 284 of file umfpack.hpp.

◆ MatrixTypeA

template<typename DT_ , typename IT_ , int dim_>
typedef LAFEM::SparseMatrixBCSR<DT_, IT_, dim_, dim_> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::MatrixTypeA

compatible matrix type

Definition at line 281 of file umfpack.hpp.

◆ MatrixTypeB

template<typename DT_ , typename IT_ , int dim_>
typedef LAFEM::SparseMatrixBCSR<DT_, IT_, dim_, 1> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::MatrixTypeB

Definition at line 282 of file umfpack.hpp.

◆ MatrixTypeD

template<typename DT_ , typename IT_ , int dim_>
typedef LAFEM::SparseMatrixBCSR<DT_, IT_, 1, dim_> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::MatrixTypeD

Definition at line 283 of file umfpack.hpp.

◆ UmfMatrixType

template<typename DT_ , typename IT_ , int dim_>
typedef LAFEM::SparseMatrixCSR<double, Index> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::UmfMatrixType

Definition at line 291 of file umfpack.hpp.

◆ UmfVectorType

template<typename DT_ , typename IT_ , int dim_>
typedef LAFEM::DenseVector<double, Index> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::UmfVectorType

Definition at line 292 of file umfpack.hpp.

◆ VectorType

template<typename DT_ , typename IT_ , int dim_>
typedef LAFEM::TupleVector<VectorTypeV, VectorTypeP> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::VectorType

Definition at line 289 of file umfpack.hpp.

◆ VectorTypeP

template<typename DT_ , typename IT_ , int dim_>
typedef LAFEM::DenseVector<DT_, IT_> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::VectorTypeP

Definition at line 288 of file umfpack.hpp.

◆ VectorTypeV

template<typename DT_ , typename IT_ , int dim_>
typedef LAFEM::DenseVectorBlocked<DT_, IT_, dim_> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::VectorTypeV

compatible vector type

Definition at line 287 of file umfpack.hpp.

Constructor & Destructor Documentation

◆ SaddleUmfpackMean() [1/2]

template<typename DT_ , typename IT_ , int dim_>
FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::SaddleUmfpackMean ( const MatrixType system_matrix,
const VectorTypeP weight_vector 
)
inlineexplicit

Constructor.

Parameters
[in]system_matrixA reference to the system matrix to be factorized.
[in]weight_vectorThe weight vector to be used as a Lagrange multiplier.

Definition at line 319 of file umfpack.hpp.

◆ SaddleUmfpackMean() [2/2]

template<typename DT_ , typename IT_ , int dim_>
FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::SaddleUmfpackMean ( const MatrixType system_matrix,
const LAFEM::MeanFilter< DT_, IT_ > &  mean_filter 
)
inlineexplicit

Constructor.

Parameters
[in]system_matrixA reference to the system matrix to be factorized.
[in]mean_filterA reference to the pressure mean filter containing the weight vector.

Definition at line 336 of file umfpack.hpp.

Member Function Documentation

◆ apply() [1/2]

virtual Status FEAT::Solver::SolverBase< LAFEM::TupleVector< LAFEM::DenseVectorBlocked< DT_, IT_, dim_ >, LAFEM::DenseVector< DT_, IT_ > > >::apply ( LAFEM::TupleVector< LAFEM::DenseVectorBlocked< DT_, IT_, dim_ >, LAFEM::DenseVector< DT_, IT_ > > &  vec_cor,
const LAFEM::TupleVector< LAFEM::DenseVectorBlocked< DT_, IT_, dim_ >, LAFEM::DenseVector< DT_, IT_ > > &  vec_def 
)
pure virtualinherited

Solver application method.

This method applies the solver represented by this object onto a given defect vector and returns the corresponding correction vector.

Note
Solvers which derive from the IterativeSolver base class also provide a correct() method which corrects an initial solution instead of starting with the null vector.
Parameters
[out]vec_corThe vector that shall receive the solution of the linear system. It is assumed to be allocated, but its numerical contents may be undefined upon calling this method.
[in]vec_defThe vector that represents the right-hand-side of the linear system to be solved.
Attention
vec_cor and vec_def must not refer to the same vector object!
Returns
A Status code that represents the status of the solution step.

◆ apply() [2/2]

template<typename DT_ , typename IT_ , int dim_>
virtual Status FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::apply ( VectorType vec_sol,
const VectorType vec_rhs 
)
inlineoverridevirtual

Solves a linear system with the factorized system matrix.

Parameters
[in,out]vec_solA reference to the solution vector. The vector must be allocated to the correct length, but its initial contents are ignored.
[in]vec_rhsA reference to the right-hand-side of the linear system.

Definition at line 551 of file umfpack.hpp.

References FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_umfpack, FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_vec_x, FEAT::Solver::Umfpack::apply(), FEAT::LAFEM::DenseVector< DT_, IT_ >::elements(), and FEAT::LAFEM::TupleVector< First_, Rest_ >::size().

◆ done()

virtual void FEAT::Solver::SolverBase< LAFEM::TupleVector< LAFEM::DenseVectorBlocked< DT_, IT_, dim_ >, LAFEM::DenseVector< DT_, IT_ > > >::done ( )
inlinevirtualinherited

Finalization method.

This function performs both the symbolic and numeric finalization, i.e. it simply performs

this->done_numeric();
this->done_symbolic();

Definition at line 283 of file base.hpp.

◆ done_numeric()

template<typename DT_ , typename IT_ , int dim_>
virtual void FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::done_numeric ( )
inlineoverridevirtual

◆ done_symbolic()

◆ init()

virtual void FEAT::Solver::SolverBase< LAFEM::TupleVector< LAFEM::DenseVectorBlocked< DT_, IT_, dim_ >, LAFEM::DenseVector< DT_, IT_ > > >::init ( )
inlinevirtualinherited

Initialization method.

This function performs both the symbolic and numeric initialization, i.e. it simply performs

this->init_symbolic();
this->init_numeric();

Definition at line 268 of file base.hpp.

◆ init_numeric()

template<typename DT_ , typename IT_ , int dim_>
virtual void FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::init_numeric ( )
inlineoverridevirtual

◆ init_symbolic()

template<typename DT_ , typename IT_ , int dim_>
virtual void FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::init_symbolic ( )
inlineoverridevirtual

Symbolic initialization method.

This method is called to perform symbolic initialization of the solver.

Reimplemented from FEAT::Solver::SolverBase< LAFEM::TupleVector< LAFEM::DenseVectorBlocked< DT_, IT_, dim_ >, LAFEM::DenseVector< DT_, IT_ > > >.

Definition at line 349 of file umfpack.hpp.

References FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_solver_matrix, FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_system_matrix, FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_umfpack, FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_vec_x, FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_weight_vector, FEAT::LAFEM::SaddlePointMatrix< MatrixA_, MatrixB_, MatrixD_ >::block_a(), FEAT::LAFEM::SaddlePointMatrix< MatrixA_, MatrixB_, MatrixD_ >::block_b(), FEAT::LAFEM::SaddlePointMatrix< MatrixA_, MatrixB_, MatrixD_ >::block_d(), FEAT::LAFEM::SparseMatrixBCSR< DT_, IT_, BlockHeight_, BlockWidth_ >::col_ind(), FEAT::LAFEM::SparseMatrixCSR< DT_, IT_ >::col_ind(), FEAT::LAFEM::SparseMatrixBCSR< DT_, IT_, BlockHeight_, BlockWidth_ >::columns(), FEAT::LAFEM::SparseMatrixCSR< DT_, IT_ >::create_vector_r(), FEAT::Solver::SolverBase< Vector_ >::init_symbolic(), FEAT::Solver::Umfpack::init_symbolic(), FEAT::LAFEM::SparseMatrixBCSR< DT_, IT_, BlockHeight_, BlockWidth_ >::row_ptr(), FEAT::LAFEM::SparseMatrixCSR< DT_, IT_ >::row_ptr(), FEAT::LAFEM::SparseMatrixBCSR< DT_, IT_, BlockHeight_, BlockWidth_ >::rows(), FEAT::LAFEM::Container< DT_, IT_ >::size(), FEAT::LAFEM::SparseMatrixBCSR< DT_, IT_, BlockHeight_, BlockWidth_ >::used_elements(), XASSERT, and XASSERTM.

◆ name()

template<typename DT_ , typename IT_ , int dim_>
virtual String FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::name ( ) const
inlineoverridevirtual

Member Data Documentation

◆ _solver_matrix

template<typename DT_ , typename IT_ , int dim_>
UmfMatrixType FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_solver_matrix
private

◆ _system_matrix

template<typename DT_ , typename IT_ , int dim_>
const MatrixType& FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_system_matrix
private

◆ _umfpack

◆ _vec_b

template<typename DT_ , typename IT_ , int dim_>
UmfVectorType FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_vec_b
private

Definition at line 305 of file umfpack.hpp.

◆ _vec_x

template<typename DT_ , typename IT_ , int dim_>
UmfVectorType FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_vec_x
private

◆ _weight_vector

template<typename DT_ , typename IT_ , int dim_>
const VectorTypeP& FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_weight_vector
private

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