Dune Core Modules (unstable)
preconditioners.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
99 DUNE_THROW(InvalidStateException, "User-supplied solver category does not match that of the given inverse operator");
183 SeqSSOR (const std::shared_ptr<const AssembledLinearOperator<M,X,Y>>& A, const ParameterTree& configuration)
201 : SeqSSOR(A, configuration.get<int>("iterations",1), configuration.get<real_field_type>("relaxation",1.0))
303 SeqSOR (const std::shared_ptr<const AssembledLinearOperator<M,X,Y>>& A, const ParameterTree& configuration)
321 : SeqSOR(A, configuration.get<int>("iterations",1), configuration.get<real_field_type>("relaxation",1.0))
454 SeqJac (const std::shared_ptr<const AssembledLinearOperator<M,X,Y>>& A, const ParameterTree& configuration)
472 : SeqJac(A, configuration.get<int>("iterations",1), configuration.get<real_field_type>("relaxation",1.0))
612 SeqDILU(const std::shared_ptr<const AssembledLinearOperator<M, X, Y>> &A, const ParameterTree &configuration)
745 SeqILU (const std::shared_ptr<const AssembledLinearOperator<M,X,Y>>& A, const ParameterTree& configuration)
952 DUNE_REGISTER_PRECONDITIONER("richardson", [](auto opTraits, const auto& op, const ParameterTree& config){
1003 SeqILDL (const std::shared_ptr<const AssembledLinearOperator<M,X,Y>>& A, const ParameterTree& configuration)
1059 for( auto row = decomposition_.begin(), rowend = decomposition_.end(); row != rowend; ++row, ++i )
A linear operator exporting itself in matrix form.
Definition: operators.hh:110
Default exception if a function was called while the object is not in a valid state for that function...
Definition: exceptions.hh:281
Turns an InverseOperator into a Preconditioner.
Definition: preconditioners.hh:76
O::range_type range_type
The range type of the preconditioner.
Definition: preconditioners.hh:81
O::domain_type domain_type
The domain type of the preconditioner.
Definition: preconditioners.hh:79
SolverCategory::Category category() const override
Category of the preconditioner (see SolverCategory::Category)
Definition: preconditioners.hh:116
range_type::field_type field_type
The field type of the preconditioner.
Definition: preconditioners.hh:83
FieldTraits< scalar_field_type >::real_type real_field_type
real scalar type underlying the field_type
Definition: preconditioners.hh:87
Simd::Scalar< field_type > scalar_field_type
scalar type underlying the field_type
Definition: preconditioners.hh:85
void post(domain_type &) override
Clean up.
Definition: preconditioners.hh:112
InverseOperator2Preconditioner(InverseOperator &inverse_operator)
Construct the preconditioner from the solver.
Definition: preconditioners.hh:95
O InverseOperator
type of the wrapped inverse operator
Definition: preconditioners.hh:89
void pre(domain_type &, range_type &) override
Prepare the preconditioner.
Definition: preconditioners.hh:102
void apply(domain_type &v, const range_type &d) override
Apply one step of the preconditioner to the system A(v)=d.
Definition: preconditioners.hh:105
Base class for matrix free definition of preconditioners.
Definition: preconditioner.hh:33
Y range_type
The range type of the preconditioner.
Definition: preconditioner.hh:38
X domain_type
The domain type of the preconditioner.
Definition: preconditioner.hh:36
X::field_type field_type
The field type of the preconditioner.
Definition: preconditioner.hh:40
X::field_type field_type
The field type of the preconditioner.
Definition: preconditioners.hh:885
Y range_type
The range type of the preconditioner.
Definition: preconditioners.hh:883
void pre(X &x, Y &b) override
Prepare the preconditioner.
Definition: preconditioners.hh:920
Richardson(real_field_type w=1.0)
Constructor.
Definition: preconditioners.hh:896
void apply(X &v, const Y &d) override
Apply the precondioner.
Definition: preconditioners.hh:928
FieldTraits< scalar_field_type >::real_type real_field_type
real scalar type underlying the field_type
Definition: preconditioners.hh:889
Simd::Scalar< field_type > scalar_field_type
scalar type underlying the field_type
Definition: preconditioners.hh:887
Richardson(const ParameterTree &configuration)
Constructor.
Definition: preconditioners.hh:911
X domain_type
The domain type of the preconditioner.
Definition: preconditioners.hh:881
SolverCategory::Category category() const override
Category of the preconditioner (see SolverCategory::Category)
Definition: preconditioners.hh:943
const bool wNotIdentity_
true if w != 1.0
Definition: preconditioners.hh:681
const real_field_type _w
The relaxation factor to use.
Definition: preconditioners.hh:679
SeqDILU(const std::shared_ptr< const AssembledLinearOperator< M, X, Y > > &A, const ParameterTree &configuration)
Constructor.
Definition: preconditioners.hh:612
Simd::Scalar< field_type > scalar_field_type
scalar type underlying the field_type
Definition: preconditioners.hh:579
typename FieldTraits< scalar_field_type >::real_type real_field_type
real scalar type underlying the field_type
Definition: preconditioners.hh:581
void apply(X &v, const Y &d) override
Apply the preconditioner.
Definition: preconditioners.hh:648
M matrix_type
The matrix type the preconditioner is for.
Definition: preconditioners.hh:567
typename matrix_type::block_type block_type
block type of matrix
Definition: preconditioners.hh:569
SeqDILU(const M &A, real_field_type w)
Constructor.
Definition: preconditioners.hh:589
void pre(X &x, Y &b) override
Prepare the preconditioner.
Definition: preconditioners.hh:639
SeqDILU(const M &A, const ParameterTree &config)
Constructor.
Definition: preconditioners.hh:629
SolverCategory::Category category() const override
Category of the preconditioner (see SolverCategory::Category)
Definition: preconditioners.hh:669
SeqILDL(const matrix_type &A, const ParameterTree &config)
Constructor.
Definition: preconditioners.hh:1019
SeqILDL(const matrix_type &A, real_field_type relax=real_field_type(1))
constructor
Definition: preconditioners.hh:1031
X domain_type
domain type of the preconditioner
Definition: preconditioners.hh:981
Y range_type
range type of the preconditioner
Definition: preconditioners.hh:983
std::remove_const_t< M > matrix_type
type of matrix the preconditioner is for
Definition: preconditioners.hh:979
void apply(X &v, const Y &d) override
Apply one step of the preconditioner to the system A(v)=d.
Definition: preconditioners.hh:1075
FieldTraits< scalar_field_type >::real_type real_field_type
real scalar type underlying the field_type
Definition: preconditioners.hh:989
SeqILDL(const std::shared_ptr< const AssembledLinearOperator< M, X, Y > > &A, const ParameterTree &configuration)
Constructor.
Definition: preconditioners.hh:1003
void pre(X &x, Y &b) override
Prepare the preconditioner.
Definition: preconditioners.hh:1071
Simd::Scalar< field_type > scalar_field_type
scalar type underlying the field_type
Definition: preconditioners.hh:987
X::field_type field_type
field type of the preconditioner
Definition: preconditioners.hh:985
SolverCategory::Category category() const override
Category of the preconditioner (see SolverCategory::Category)
Definition: preconditioners.hh:1086
SeqILU(const M &A, int n, real_field_type w, const bool resort=false)
Constructor.
Definition: preconditioners.hh:777
ILU::CRS< block_type, typename M::allocator_type > CRS
type of ILU storage
Definition: preconditioners.hh:717
Y range_type
The range type of the preconditioner.
Definition: preconditioners.hh:706
CRS lower_
The ILU(n) decomposition of the matrix. As storage a CRS structure is used.
Definition: preconditioners.hh:857
const bool wNotIdentity_
true if w != 1.0
Definition: preconditioners.hh:864
SeqILU(const M &A, const ParameterTree &config)
Constructor.
Definition: preconditioners.hh:763
void pre(X &x, Y &b) override
Prepare the preconditioner.
Definition: preconditioners.hh:813
std::remove_const< M >::type matrix_type
The matrix type the preconditioner is for.
Definition: preconditioners.hh:700
matrix_type::block_type block_type
block type of matrix
Definition: preconditioners.hh:702
FieldTraits< scalar_field_type >::real_type real_field_type
real scalar type underlying the field_type
Definition: preconditioners.hh:714
X::field_type field_type
The field type of the preconditioner.
Definition: preconditioners.hh:709
SeqILU(const M &A, real_field_type w, const bool resort=false)
Constructor.
Definition: preconditioners.hh:726
void apply(X &v, const Y &d) override
Apply the preconditioner.
Definition: preconditioners.hh:821
SolverCategory::Category category() const override
Category of the preconditioner (see SolverCategory::Category)
Definition: preconditioners.hh:847
const real_field_type w_
The relaxation factor to use.
Definition: preconditioners.hh:862
SeqILU(const std::shared_ptr< const AssembledLinearOperator< M, X, Y > > &A, const ParameterTree &configuration)
Constructor.
Definition: preconditioners.hh:745
X domain_type
The domain type of the preconditioner.
Definition: preconditioners.hh:704
Simd::Scalar< field_type > scalar_field_type
scalar type underlying the field_type
Definition: preconditioners.hh:712
std::unique_ptr< matrix_type > ILU_
The ILU(n) decomposition of the matrix. As storage a BCRSMatrix is used.
Definition: preconditioners.hh:854
SeqJac(const M &A, const ParameterTree &configuration)
Constructor.
Definition: preconditioners.hh:471
M matrix_type
The matrix type the preconditioner is for.
Definition: preconditioners.hh:416
Simd::Scalar< field_type > scalar_field_type
scalar type underlying the field_type
Definition: preconditioners.hh:424
SeqJac(const std::shared_ptr< const AssembledLinearOperator< M, X, Y > > &A, const ParameterTree &configuration)
Constructor.
Definition: preconditioners.hh:454
void apply(X &v, const Y &d) override
Apply the preconditioner.
Definition: preconditioners.hh:488
X::field_type field_type
The field type of the preconditioner.
Definition: preconditioners.hh:422
void pre(X &x, Y &b) override
Prepare the preconditioner.
Definition: preconditioners.hh:480
X domain_type
The domain type of the preconditioner.
Definition: preconditioners.hh:418
SolverCategory::Category category() const override
Category of the preconditioner (see SolverCategory::Category)
Definition: preconditioners.hh:504
FieldTraits< scalar_field_type >::real_type real_field_type
real scalar type underlying the field_type
Definition: preconditioners.hh:426
SeqJac(const M &A, int n, real_field_type w)
Constructor.
Definition: preconditioners.hh:435
Y range_type
The range type of the preconditioner.
Definition: preconditioners.hh:420
SeqSOR(const std::shared_ptr< const AssembledLinearOperator< M, X, Y > > &A, const ParameterTree &configuration)
Constructor.
Definition: preconditioners.hh:303
M matrix_type
The matrix type the preconditioner is for.
Definition: preconditioners.hh:265
FieldTraits< scalar_field_type >::real_type real_field_type
real scalar type underlying the field_type
Definition: preconditioners.hh:275
void apply(X &v, const Y &d)
Apply the preconditioner in a special direction.
Definition: preconditioners.hh:351
X domain_type
The domain type of the preconditioner.
Definition: preconditioners.hh:267
Simd::Scalar< field_type > scalar_field_type
scalar type underlying the field_type
Definition: preconditioners.hh:273
void apply(X &v, const Y &d) override
Apply the preconditioner.
Definition: preconditioners.hh:337
void pre(X &x, Y &b) override
Prepare the preconditioner.
Definition: preconditioners.hh:329
Y range_type
The range type of the preconditioner.
Definition: preconditioners.hh:269
SeqSOR(const M &A, const ParameterTree &configuration)
Constructor.
Definition: preconditioners.hh:320
SolverCategory::Category category() const override
Category of the preconditioner (see SolverCategory::Category)
Definition: preconditioners.hh:372
X::field_type field_type
The field type of the preconditioner.
Definition: preconditioners.hh:271
SeqSOR(const M &A, int n, real_field_type w)
Constructor.
Definition: preconditioners.hh:284
void pre(X &x, Y &b) override
Prepare the preconditioner.
Definition: preconditioners.hh:209
SeqSSOR(const std::shared_ptr< const AssembledLinearOperator< M, X, Y > > &A, const ParameterTree &configuration)
Constructor.
Definition: preconditioners.hh:183
SeqSSOR(const M &A, const ParameterTree &configuration)
Constructor.
Definition: preconditioners.hh:200
SolverCategory::Category category() const override
Category of the preconditioner (see SolverCategory::Category)
Definition: preconditioners.hh:234
X::field_type field_type
The field type of the preconditioner.
Definition: preconditioners.hh:151
Simd::Scalar< field_type > scalar_field_type
scalar type underlying the field_type
Definition: preconditioners.hh:153
X domain_type
The domain type of the preconditioner.
Definition: preconditioners.hh:147
M matrix_type
The matrix type the preconditioner is for.
Definition: preconditioners.hh:145
void apply(X &v, const Y &d) override
Apply the preconditioner.
Definition: preconditioners.hh:217
Y range_type
The range type of the preconditioner.
Definition: preconditioners.hh:149
FieldTraits< scalar_field_type >::real_type real_field_type
real scalar type underlying the field_type
Definition: preconditioners.hh:155
SeqSSOR(const M &A, int n, real_field_type w)
Constructor.
Definition: preconditioners.hh:164
The diagonal incomplete LU factorization kernels.
typename Overloads::ScalarType< std::decay_t< V > >::type Scalar
Element type of some SIMD type.
Definition: interface.hh:235
Simple iterative methods like Jacobi, Gauss-Seidel, SOR, SSOR, etc. in a generic way.
Incomplete LDL decomposition.
The incomplete LU factorization kernels.
Some handy generic functions for ISTL matrices.
void bildl_decompose(Matrix &A)
compute ILDL decomposition of a symmetric matrix A
Definition: ildl.hh:90
constexpr auto get(std::integer_sequence< T, II... >, std::integral_constant< std::size_t, pos >={})
Return the entry at position pos of the given sequence.
Definition: integersequence.hh:22
A hierarchical structure of string parameters.
Include file for users of the SIMD abstraction layer.
Define general, extensible interface for inverse operators.
static void check(const Matrix &mat)
Check whether the a matrix has diagonal values on blocklevel recursion levels.
Definition: matrixutils.hh:53
Statistics about the application of an inverse operator.
Definition: solver.hh:50
@ sequential
Category for sequential solvers.
Definition: solvercategory.hh:25
static Category category(const OP &op, decltype(op.category()) *=nullptr)
Helperfunction to extract the solver category either from an enum, or from the newly introduced virtu...
Definition: solvercategory.hh:34
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 21, 23:30, 2024)