4 #ifndef DUNE_ISTL_SOLVER_HH 5 #define DUNE_ISTL_SOLVER_HH 78 template<
class X,
class Y>
118 enum { iterationSpacing = 5 , normSpacing = 16 };
123 s << std::setw(iterationSpacing) <<
" Iter";
124 s << std::setw(normSpacing) <<
"Defect";
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;
136 s << std::setw(iterationSpacing) << iter <<
" ";
137 s << std::setw(normSpacing) << norm <<
" ";
138 s << std::setw(normSpacing) << rate << std::endl;
142 template <
typename CountType,
typename DataType>
144 const CountType& iter,
145 const DataType& norm)
const 147 s << std::setw(iterationSpacing) << iter <<
" ";
148 s << std::setw(normSpacing) << norm << std::endl;
void clear()
Resets all data.
Definition: solver.hh:40
void printHeader(std::ostream &s) const
helper function for printing header of solver output
Definition: solver.hh:121
double elapsed
Elapsed time in seconds.
Definition: solver.hh:62
void printOutput(std::ostream &s, const CountType &iter, const DataType &norm) const
helper function for printing solver output
Definition: solver.hh:143
virtual ~InverseOperator()
Destructor.
Definition: solver.hh:114
int iterations
Number of iterations.
Definition: solver.hh:50
InverseOperatorResult()
Default constructor.
Definition: solver.hh:34
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
double reduction
Reduction achieved: .
Definition: solver.hh:53
Statistics about the application of an inverse operator.
Definition: solver.hh:31
Abstract base class for all solvers.
Definition: solver.hh:79
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
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
Definition: basearray.hh:19
double conv_rate
Convergence rate (average reduction per step)
Definition: solver.hh:59