4 #ifndef DUNE_ISTL_SOLVER_HH
5 #define DUNE_ISTL_SOLVER_HH
78 template<
class X,
class Y>
125 s << std::setw(
normSpacing) <<
"Rate" << std::endl;
129 template <
class DataType>
132 const DataType& norm,
133 const DataType& norm_old)
const
135 const DataType rate = norm/norm_old;
142 template <
class DataType>
145 const DataType& norm)
const
void clear()
Resets all data.
Definition: solver.hh:40
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
X::field_type field_type
The field type of the operator.
Definition: solver.hh:88
Abstract base class for all solvers.
Definition: solver.hh:79
double reduction
Reduction achieved: .
Definition: solver.hh:53
Definition: solver.hh:118
InverseOperatorResult()
Default constructor.
Definition: solver.hh:34
X domain_type
Type of the domain of the operator to be inverted.
Definition: solver.hh:82
bool converged
True if convergence criterion has been met.
Definition: solver.hh:56
virtual ~InverseOperator()
Destructor.
Definition: solver.hh:114
Definition: solver.hh:118
virtual void apply(X &x, Y &b, InverseOperatorResult &res)=0
Apply inverse operator,.
int iterations
Number of iterations.
Definition: solver.hh:50
Statistics about the application of an inverse operator.
Definition: solver.hh:31
double elapsed
Elapsed time in seconds.
Definition: solver.hh:62
void printOutput(std::ostream &s, const double iter, const DataType &norm) const
helper function for printing solver output
Definition: solver.hh:143
double conv_rate
Convergence rate (average reduction per step)
Definition: solver.hh:59
Y range_type
Type of the range of the operator to be inverted.
Definition: solver.hh:85
void printHeader(std::ostream &s) const
helper function for printing header of solver output
Definition: solver.hh:121