FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Solver::UmfpackMean Class Referenceabstract

UMFPACK Mean solver class. More...

#include <umfpack.hpp>

Inheritance diagram for FEAT::Solver::UmfpackMean:
FEAT::Solver::SolverBase< LAFEM::DenseVector< double, Index > >

Public Types

typedef SolverBase< VectorTypeBaseClass
 our base class More...
 
typedef LAFEM::SparseMatrixCSR< double, IndexMatrixType
 compatible matrix type More...
 
typedef LAFEM::DenseVector< double, IndexVectorType
 compatible vector type More...
 

Public Member Functions

 UmfpackMean (const MatrixType &system_matrix, const LAFEM::MeanFilter< double, Index > &mean_filter)
 Constructor. More...
 
 UmfpackMean (const MatrixType &system_matrix, const VectorType &weight_vector)
 Constructor. More...
 
virtual Status apply (LAFEM::DenseVector< double, Index > &vec_cor, const LAFEM::DenseVector< double, Index > &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

MatrixType _solver_matrix
 our extended system matrix More...
 
const MatrixType_system_matrix
 system matrix More...
 
Umfpack _umfpack
 our internal Umfpack solver object More...
 
VectorType _vec_b
 
VectorType _vec_x
 two temporary extended vectors More...
 
const VectorType_weight_vector
 weight vector More...
 

Detailed Description

UMFPACK Mean solver class.

This class implements a variant of the Umfpack solver, which is capable of solving linear systems including the integral mean constraint or any other constraint that can be expressed as a scalar Lagrange multiplier to the original system matrix.

As Umfpack is a direct solver, it cannot directly utilize the MeanFilter class, which is used by iterative solvers to enforce the integral mean constraint. Therefore, this class implements an algorithm, which extends the original system matrix by a Lagrange multiplier vector and applied the Umfpack solver onto this extended linear system.

This class offers two constructors:

  • A CTOR which takes a SparseMatrixCSR and a MeanFilter as input
  • A CTOR which takes a SparseMatrixCSR and a DenseVector representing the Lagrange multiplier as input.
Author
Peter Zajac

Definition at line 140 of file umfpack.hpp.

Member Typedef Documentation

◆ BaseClass

our base class

Definition at line 150 of file umfpack.hpp.

◆ MatrixType

compatible matrix type

Definition at line 145 of file umfpack.hpp.

◆ VectorType

compatible vector type

Definition at line 147 of file umfpack.hpp.

Constructor & Destructor Documentation

◆ UmfpackMean() [1/2]

FEAT::Solver::UmfpackMean::UmfpackMean ( const MatrixType system_matrix,
const VectorType weight_vector 
)
explicit

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.

◆ UmfpackMean() [2/2]

FEAT::Solver::UmfpackMean::UmfpackMean ( const MatrixType system_matrix,
const LAFEM::MeanFilter< double, Index > &  mean_filter 
)
inlineexplicit

Constructor.

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

Definition at line 185 of file umfpack.hpp.

Member Function Documentation

◆ apply() [1/2]

virtual Status FEAT::Solver::SolverBase< LAFEM::DenseVector< double, Index > >::apply ( LAFEM::DenseVector< double, Index > &  vec_cor,
const LAFEM::DenseVector< double, Index > &  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]

virtual Status FEAT::Solver::UmfpackMean::apply ( VectorType vec_sol,
const VectorType vec_rhs 
)
overridevirtual

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.

◆ done()

virtual void FEAT::Solver::SolverBase< LAFEM::DenseVector< double, Index > >::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()

virtual void FEAT::Solver::UmfpackMean::done_numeric ( )
overridevirtual

Numeric finalization method.

This method is called to release any data allocated in the numeric initialization step.

Reimplemented from FEAT::Solver::SolverBase< LAFEM::DenseVector< double, Index > >.

◆ done_symbolic()

virtual void FEAT::Solver::UmfpackMean::done_symbolic ( )
overridevirtual

Symbolic finalization method.

This method is called to release any data allocated in the symbolic initialization step.

Reimplemented from FEAT::Solver::SolverBase< LAFEM::DenseVector< double, Index > >.

◆ init()

virtual void FEAT::Solver::SolverBase< LAFEM::DenseVector< double, Index > >::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()

virtual void FEAT::Solver::UmfpackMean::init_numeric ( )
overridevirtual

Numeric initialization method.

This method is called to perform numeric initialization of the solver.
Before this function can be called, the symbolic initialization must be performed.

Reimplemented from FEAT::Solver::SolverBase< LAFEM::DenseVector< double, Index > >.

◆ init_symbolic()

virtual void FEAT::Solver::UmfpackMean::init_symbolic ( )
overridevirtual

Symbolic initialization method.

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

Reimplemented from FEAT::Solver::SolverBase< LAFEM::DenseVector< double, Index > >.

◆ name()

virtual String FEAT::Solver::UmfpackMean::name ( ) const
inlineoverridevirtual

Returns the name of the solver.

Implements FEAT::Solver::SolverBase< LAFEM::DenseVector< double, Index > >.

Definition at line 193 of file umfpack.hpp.

Member Data Documentation

◆ _solver_matrix

MatrixType FEAT::Solver::UmfpackMean::_solver_matrix
private

our extended system matrix

Definition at line 158 of file umfpack.hpp.

◆ _system_matrix

const MatrixType& FEAT::Solver::UmfpackMean::_system_matrix
private

system matrix

Definition at line 154 of file umfpack.hpp.

◆ _umfpack

Umfpack FEAT::Solver::UmfpackMean::_umfpack
private

our internal Umfpack solver object

Definition at line 162 of file umfpack.hpp.

◆ _vec_b

VectorType FEAT::Solver::UmfpackMean::_vec_b
private

Definition at line 160 of file umfpack.hpp.

◆ _vec_x

VectorType FEAT::Solver::UmfpackMean::_vec_x
private

two temporary extended vectors

Definition at line 160 of file umfpack.hpp.

◆ _weight_vector

const VectorType& FEAT::Solver::UmfpackMean::_weight_vector
private

weight vector

Definition at line 156 of file umfpack.hpp.


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