ConicBundle
IterativeSystemObject.hxx
Go to the documentation of this file.
1 
2 
3 #ifndef CH_MATRIX_CLASSES__ITERATIVESYSTEMOBJECT_HXX
4 #define CH_MATRIX_CLASSES__ITERATIVESYSTEMOBJECT_HXX
5 
14 #ifndef CH_MATRIX_CLASSES__MATRIX_HXX
15 #include "matrix.hxx"
16 #endif
17 
18 namespace CH_Matrix_Classes {
19 
29 
38  {
39  public:
40  virtual ~IterativeSystemObject();
41 
43  virtual const Matrix& ItSys_rhs() =0;
44 
46  virtual int ItSys_mult(const Matrix& in_vec,Matrix& out_vec) =0;
47 
49  virtual int ItSys_precondM1(Matrix& /* vec */) {return 0;}
50 
52  virtual int ItSys_precondM2(Matrix& /* vec */) {return 0;}
53 
54  };
55 
56 
62  {
63  public:
65  virtual ~IterativeSolverObject();
66 
73 
75  virtual void set_maxit(Integer in_maxit)=0;
77  virtual Integer get_maxit() const =0;
78 
80  virtual int get_err() const =0;
82  virtual Integer get_nmult() const =0;
84  virtual Real get_residual_norm() const =0;
86  virtual Real get_avg_reduction() const =0;
88  virtual Real get_termprec() const =0;
89 
91 
93  virtual int compute(IterativeSystemObject& system,
94  Matrix& x,
95  Real termprec,
96  Matrix* storex=0,
97  Integer storestep=0
98  )=0;
99 
104 
106  virtual void set_out(std::ostream* out=0,int print_level=1)=0;
107 
109  };
110 
111 
113 
114 }
115 
116 #endif
117 
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
Header declaring the classes CH_Matrix_Classes::Realrange and CH_Matrix_Classes::Matrix having Real e...
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
virtual int ItSys_precondM2(Matrix &)
returns M2^{-1}vec; default: M2=I
Definition: IterativeSystemObject.hxx:52
Matrix Classes and Linear Algebra. See Matrix Classes (namespace CH_Matrix_Classes) for a quick intro...
Definition: PSCOracle.hxx:20
virtual const Matrix & ItSys_rhs()=0
returns the right hand side vector (dense)
virtual int ItSys_precondM1(Matrix &)
returns M1^{-1}*vec; default: M1=I
Definition: IterativeSystemObject.hxx:49
Abstract base class for supplying the system for an iterative solver.
Definition: IterativeSystemObject.hxx:37
Matrix class for real values of type Real
Definition: matrix.hxx:74
virtual int ItSys_mult(const Matrix &in_vec, Matrix &out_vec)=0
returns out_vec=(system matrix)*in_vec
Abstract interface to iterative methods for solving Ax=b given by an IterativeSystemObject.
Definition: IterativeSystemObject.hxx:61