Dune Core Modules (2.3.1)
solvers.hh
Go to the documentation of this file.
90 dune_static_assert(static_cast<int>(L::category) == static_cast<int>(SolverCategory::sequential),
247 dune_static_assert(static_cast<int>(L::category) == static_cast<int>(SolverCategory::sequential),
380 dune_static_assert( static_cast<int>(L::category) == static_cast<int>(SolverCategory::sequential),
549 dune_static_assert(static_cast<int>(L::category) == static_cast<int>(P::category), "L and P must be of the same category!");
550 dune_static_assert(static_cast<int>(L::category) == static_cast<int>(SolverCategory::sequential), "L must be sequential!");
818 dune_static_assert( static_cast<int>(L::category) == static_cast<int>(SolverCategory::sequential),
858 std::cout << "=== rate=" << res.conv_rate << ", T=" << res.elapsed << ", TIT=" << res.elapsed << ", IT=0" << std::endl;
873 field_type alpha, // recurrence coefficients as computed in the Lanczos alg making up the matrix T
918 dummy = z; // remember z_old for the computation of the search direction p in the next iteration
954 // recompute c, s -> current Givens rotation \TODO use BLAS-routine drotg instead for greater robustness
979 // update residual - not necessary if in the preconditioned case we are content with the residual norm of the
985 real_type defnew = std::abs(beta0*xi[i%2]); // the last entry the QR-transformed least squares RHS is the new residual norm
1076 RestartedGMResSolver (L& op, P& prec, double reduction, int restart, int maxit, int verbose, bool recalc_defect = false) :
1084 dune_static_assert( static_cast<int>(L::category) == static_cast<int>(SolverCategory::sequential),
1096 RestartedGMResSolver (L& op, S& sp, P& prec, double reduction, int restart, int maxit, int verbose, bool recalc_defect = false) :
X domain_type
The domain type of the operator to be inverted.
Definition: solvers.hh:531
BiCGSTABSolver(L &op, P &prec, double reduction, int maxit, int verbose)
Set up solver.
Definition: solvers.hh:545
FieldTraits< field_type >::real_type real_type
The real type of the field type (is the same of using real numbers, but differs for std::complex)
Definition: solvers.hh:537
X range_type
The range type of the operator to be inverted.
Definition: solvers.hh:533
virtual void apply(X &x, X &b, InverseOperatorResult &res)
Apply inverse operator.
Definition: solvers.hh:573
X::field_type field_type
The field type of the operator to be inverted.
Definition: solvers.hh:535
virtual void apply(X &x, X &b, double reduction, InverseOperatorResult &res)
Apply inverse operator with given reduction factor.
Definition: solvers.hh:772
BiCGSTABSolver(L &op, S &sp, P &prec, double reduction, int maxit, int verbose)
Set up solver.
Definition: solvers.hh:558
X range_type
The range type of the operator to be inverted.
Definition: solvers.hh:365
X domain_type
The domain type of the operator to be inverted.
Definition: solvers.hh:363
virtual void apply(X &x, X &b, InverseOperatorResult &res)
Apply inverse operator.
Definition: solvers.hh:403
virtual void apply(X &x, X &b, double reduction, InverseOperatorResult &res)
Apply inverse operator with given reduction factor.
Definition: solvers.hh:506
CGSolver(L &op, S &sp, P &prec, double reduction, int maxit, int verbose)
Set up conjugate gradient solver.
Definition: solvers.hh:389
CGSolver(L &op, P &prec, double reduction, int maxit, int verbose)
Set up conjugate gradient solver.
Definition: solvers.hh:375
X::field_type field_type
The field type of the operator to be inverted.
Definition: solvers.hh:367
Generalized preconditioned conjugate gradient solver.
Definition: solvers.hh:1365
GeneralizedPCGSolver(L &op, S &sp, P &prec, double reduction, int maxit, int verbose, int restart=10)
Set up nonlinear preconditioned conjugate gradient solver.
Definition: solvers.hh:1401
virtual void apply(X &x, X &b, double reduction, InverseOperatorResult &res)
Apply inverse operator with given reduction factor.
Definition: solvers.hh:1557
virtual void apply(X &x, X &b, InverseOperatorResult &res)
Apply inverse operator.
Definition: solvers.hh:1416
X::field_type field_type
The field type of the operator to be inverted.
Definition: solvers.hh:1372
X range_type
The range type of the operator to be inverted.
Definition: solvers.hh:1370
X domain_type
The domain type of the operator to be inverted.
Definition: solvers.hh:1368
GeneralizedPCGSolver(L &op, P &prec, double reduction, int maxit, int verbose, int restart=10)
Set up nonlinear preconditioned conjugate gradient solver.
Definition: solvers.hh:1382
X domain_type
The domain type of the operator that we do the inverse for.
Definition: solvers.hh:229
virtual void apply(X &x, X &b, InverseOperatorResult &res)
Apply inverse operator.
Definition: solvers.hh:271
GradientSolver(L &op, P &prec, double reduction, int maxit, int verbose)
Set up solver.
Definition: solvers.hh:241
X range_type
The range type of the operator that we do the inverse for.
Definition: solvers.hh:231
X::field_type field_type
The field type of the operator that we do the inverse for.
Definition: solvers.hh:233
GradientSolver(L &op, S &sp, P &prec, double reduction, int maxit, int verbose)
Set up solver.
Definition: solvers.hh:256
virtual void apply(X &x, X &b, double reduction, InverseOperatorResult &res)
Apply inverse operator with given reduction factor.
Definition: solvers.hh:339
void printHeader(std::ostream &s) const
helper function for printing header of solver output
Definition: solver.hh:121
void printOutput(std::ostream &s, const double iter, const DataType &norm, const DataType &norm_old) const
helper function for printing solver output
Definition: solver.hh:130
virtual void applyscaleadd(field_type alpha, const X &x, Y &y) const =0
apply operator to x, scale and add:
virtual void apply(const X &x, Y &y) const =0
apply operator to x: The input vector is consistent and the output must also be consistent on the in...
X range_type
The range type of the operator that we do the inverse for.
Definition: solvers.hh:60
LoopSolver(L &op, S &sp, P &prec, double reduction, int maxit, int verbose)
Set up loop solver.
Definition: solvers.hh:115
X domain_type
The domain type of the operator that we do the inverse for.
Definition: solvers.hh:58
virtual void apply(X &x, X &b, InverseOperatorResult &res)
Apply inverse operator,.
Definition: solvers.hh:127
virtual void apply(X &x, X &b, double reduction, InverseOperatorResult &res)
apply inverse operator, with given convergence criteria.
Definition: solvers.hh:205
LoopSolver(L &op, P &prec, double reduction, int maxit, int verbose)
Set up Loop solver.
Definition: solvers.hh:84
X::field_type field_type
The field type of the operator that we do the inverse for.
Definition: solvers.hh:62
MINRESSolver(L &op, P &prec, double reduction, int maxit, int verbose)
Set up MINRES solver.
Definition: solvers.hh:813
virtual void apply(X &x, X &b, InverseOperatorResult &res)
Apply inverse operator.
Definition: solvers.hh:841
X::field_type field_type
The field type of the operator to be inverted.
Definition: solvers.hh:803
MINRESSolver(L &op, S &sp, P &prec, double reduction, int maxit, int verbose)
Set up MINRES solver.
Definition: solvers.hh:827
FieldTraits< field_type >::real_type real_type
The real type of the field type (is the same of using real numbers, but differs for std::complex)
Definition: solvers.hh:805
X range_type
The range type of the operator to be inverted.
Definition: solvers.hh:801
virtual void apply(X &x, X &b, double reduction, InverseOperatorResult &res)
Apply inverse operator with given reduction factor.
Definition: solvers.hh:1025
X domain_type
The domain type of the operator to be inverted.
Definition: solvers.hh:799
virtual void apply(X &v, const Y &d)=0
Apply one step of the preconditioner to the system A(v)=d.
implements the Generalized Minimal Residual (GMRes) method
Definition: solvers.hh:1055
F basis_type
The field type of the basis vectors.
Definition: solvers.hh:1066
Y range_type
The range type of the operator to be inverted.
Definition: solvers.hh:1060
RestartedGMResSolver(L &op, P &prec, double reduction, int restart, int maxit, int verbose, bool recalc_defect=false)
Set up solver.
Definition: solvers.hh:1076
virtual void apply(X &x, Y &b, double reduction, InverseOperatorResult &res)
Apply inverse operator.
Definition: solvers.hh:1119
RestartedGMResSolver(L &op, S &sp, P &prec, double reduction, int restart, int maxit, int verbose, bool recalc_defect=false)
Set up solver.
Definition: solvers.hh:1096
X::field_type field_type
The field type of the operator to be inverted.
Definition: solvers.hh:1062
virtual void apply(X &x, X &b, InverseOperatorResult &res)
Apply inverse operator,.
Definition: solvers.hh:1109
FieldTraits< field_type >::real_type real_type
The real type of the field type (is the same of using real numbers, but differs for std::complex)
Definition: solvers.hh:1064
X domain_type
The domain type of the operator to be inverted.
Definition: solvers.hh:1058
Base class for scalar product and norm computation.
Definition: scalarproducts.hh:43
double elapsed() const
Get elapsed user-time from last reset until now/last stop in seconds.
Definition: timer.hh:86
Type traits to determine the type of reals (when working with complex numbers)
#define dune_static_assert(COND, MSG)
Helper template so that compilation fails if condition is not true.
Definition: static_assert.hh:79
STL namespace.
Define general, extensible interface for operators. The available implementation wraps a matrix.
Define base class for scalar product and norm.
Define general, extensible interface for inverse operators.
Fallback implementation of the C++0x static_assert feature.
Statistics about the application of an inverse operator.
Definition: solver.hh:32
double conv_rate
Convergence rate (average reduction per step)
Definition: solver.hh:59
bool converged
True if convergence criterion has been met.
Definition: solver.hh:56
@ sequential
Category for sequential solvers.
Definition: solvercategory.hh:22
A simple timing class.
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 12, 23:30, 2024)