afterIteration.hh

Go to the documentation of this file.
1 
7 #ifndef afteriterations_hh
8 #define afteriterations_hh
9 
10 #include "compositions.hh"
11 #include "toolbox/sequence.hh"
12 
13 namespace concepts {
14 
15  // ********************************************************* AfterIteration **
16 
26  template<class F>
27  class AfterIteration : public Operator<F> {
28  public:
30  typedef F type;
31 
39  const uint afterIter = 0);
40  virtual ~AfterIteration() {}
41 
42  virtual void operator()(const Function<F>& fncY, Function<F>& fncX);
43 
44  const Vector<F>& solution();
45  const Vector<F>& solution(uint i);
46  const Vector<F>& residual();
47  const Vector<F>& residual(uint i);
48  protected:
49  virtual std::ostream& info(std::ostream& os) const;
50  private:
54  uint afterIter_;
56  uint cnt_;
61  };
62 
63 } // namespace concepts
64 
65 #endif // afteriterations_hh
virtual std::ostream & info(std::ostream &os) const
Operator< F > & A_
Matrix A and the solver for A.
Sequence< Vector< F > > residual_
Residual vector after each solving.
uint afterIter_
Number of after iterations.
const Vector< F > & solution()
Abstract class for a function.
Definition: basis.hh:21
virtual void operator()(const Function< F > &fncY, Function< F > &fncX)
const Vector< F > & residual()
Sequence< Vector< F > > solution_
Solution vector after each solving.
F type
Type of data, e.g. matrix entries.
AfterIteration(Operator< F > &A, Operator< F > &solver, const uint afterIter=0)
Constructor.
Abstract class for an operator.
Definition: ARPACK.hh:16
Sequence with operations, output operator, and method of the particular element types.
Definition: sequence.hh:39
Solver with after iterations.
const Vector< F > & solution(uint i)
const Vector< F > & residual(uint i)
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich