|
FEAT 3
Finite Element Analysis Toolbox
|
UMFPACK Saddle-Point Mean solver class. More...
#include <umfpack.hpp>
Public Types | |
| typedef SolverBase< VectorType > | BaseClass |
| our base class More... | |
| typedef LAFEM::SaddlePointMatrix< MatrixTypeA, MatrixTypeB, MatrixTypeD > | MatrixType |
| 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, Index > | UmfMatrixType |
| typedef LAFEM::DenseVector< double, Index > | UmfVectorType |
| typedef LAFEM::TupleVector< VectorTypeV, VectorTypeP > | VectorType |
| 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... | |
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:
Definition at line 276 of file umfpack.hpp.
| typedef SolverBase<VectorType> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::BaseClass |
our base class
Definition at line 295 of file umfpack.hpp.
| typedef LAFEM::SaddlePointMatrix<MatrixTypeA, MatrixTypeB, MatrixTypeD> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::MatrixType |
Definition at line 284 of file umfpack.hpp.
| 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.
| typedef LAFEM::SparseMatrixBCSR<DT_, IT_, dim_, 1> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::MatrixTypeB |
Definition at line 282 of file umfpack.hpp.
| typedef LAFEM::SparseMatrixBCSR<DT_, IT_, 1, dim_> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::MatrixTypeD |
Definition at line 283 of file umfpack.hpp.
| typedef LAFEM::SparseMatrixCSR<double, Index> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::UmfMatrixType |
Definition at line 291 of file umfpack.hpp.
| typedef LAFEM::DenseVector<double, Index> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::UmfVectorType |
Definition at line 292 of file umfpack.hpp.
| typedef LAFEM::TupleVector<VectorTypeV, VectorTypeP> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::VectorType |
Definition at line 289 of file umfpack.hpp.
| typedef LAFEM::DenseVector<DT_, IT_> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::VectorTypeP |
Definition at line 288 of file umfpack.hpp.
| typedef LAFEM::DenseVectorBlocked<DT_, IT_, dim_> FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::VectorTypeV |
compatible vector type
Definition at line 287 of file umfpack.hpp.
|
inlineexplicit |
Constructor.
| [in] | system_matrix | A reference to the system matrix to be factorized. |
| [in] | weight_vector | The weight vector to be used as a Lagrange multiplier. |
Definition at line 319 of file umfpack.hpp.
|
inlineexplicit |
Constructor.
| [in] | system_matrix | A reference to the system matrix to be factorized. |
| [in] | mean_filter | A reference to the pressure mean filter containing the weight vector. |
Definition at line 336 of file umfpack.hpp.
|
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.
correct() method which corrects an initial solution instead of starting with the null vector.| [out] | vec_cor | The 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_def | The vector that represents the right-hand-side of the linear system to be solved. |
|
inlineoverridevirtual |
Solves a linear system with the factorized system matrix.
| [in,out] | vec_sol | A reference to the solution vector. The vector must be allocated to the correct length, but its initial contents are ignored. |
| [in] | vec_rhs | A 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().
|
inlinevirtualinherited |
|
inlineoverridevirtual |
Numeric finalization method.
This method is called to release any data allocated in the numeric initialization step.
Reimplemented from FEAT::Solver::SolverBase< LAFEM::TupleVector< LAFEM::DenseVectorBlocked< DT_, IT_, dim_ >, LAFEM::DenseVector< DT_, IT_ > > >.
Definition at line 534 of file umfpack.hpp.
References FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_umfpack, FEAT::Solver::SolverBase< Vector_ >::done_numeric(), and FEAT::Solver::Umfpack::done_numeric().
|
inlineoverridevirtual |
Symbolic finalization method.
This method is called to release any data allocated in the symbolic initialization step.
Reimplemented from FEAT::Solver::SolverBase< LAFEM::TupleVector< LAFEM::DenseVectorBlocked< DT_, IT_, dim_ >, LAFEM::DenseVector< DT_, IT_ > > >.
Definition at line 449 of file umfpack.hpp.
References FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_solver_matrix, FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_umfpack, FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::_vec_x, FEAT::LAFEM::Container< DT_, IT_ >::clear(), FEAT::Solver::SolverBase< Vector_ >::done_symbolic(), and FEAT::Solver::Umfpack::done_symbolic().
|
inlinevirtualinherited |
|
inlineoverridevirtual |
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::TupleVector< LAFEM::DenseVectorBlocked< DT_, IT_, dim_ >, LAFEM::DenseVector< DT_, IT_ > > >.
Definition at line 459 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_ >::_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_ >::columns(), FEAT::LAFEM::DenseVector< DT_, IT_ >::elements(), FEAT::Solver::SolverBase< Vector_ >::init_numeric(), FEAT::Solver::Umfpack::init_numeric(), 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::SparseMatrixCSR< DT_, IT_ >::val(), and FEAT::LAFEM::SparseMatrixBCSR< DT_, IT_, BlockHeight_, BlockWidth_ >::val().
|
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.
|
inlineoverridevirtual |
Returns the name of the solver.
Definition at line 344 of file umfpack.hpp.
|
private |
our extended system matrix
Definition at line 303 of file umfpack.hpp.
Referenced by FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::done_symbolic(), FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::init_numeric(), and FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::init_symbolic().
|
private |
system matrix
Definition at line 299 of file umfpack.hpp.
Referenced by FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::init_numeric(), and FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::init_symbolic().
|
private |
our internal Umfpack solver object
Definition at line 307 of file umfpack.hpp.
Referenced by FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::apply(), FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::done_numeric(), FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::done_symbolic(), FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::init_numeric(), and FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::init_symbolic().
|
private |
Definition at line 305 of file umfpack.hpp.
|
private |
two temporary extended vectors
Definition at line 305 of file umfpack.hpp.
Referenced by FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::apply(), FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::done_symbolic(), and FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::init_symbolic().
|
private |
weight vector from mean filter
Definition at line 301 of file umfpack.hpp.
Referenced by FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::init_numeric(), and FEAT::Solver::SaddleUmfpackMean< DT_, IT_, dim_ >::init_symbolic().