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