bramblePasciakFabric.hh

Go to the documentation of this file.
1 
6 #ifndef BramblePasciakfabric_hh
7 #define BramblePasciakfabric_hh
8 
9 #if __GNUC__ == 2
10 # include <float.h>
11 # define EPS DBL_EPSILON
12 #else
13 # include <limits>
14 # define EPS std::numeric_limits<double>::epsilon()
15 #endif
16 #include "bramblePasciak.hh"
17 #include "operator/solverFabric.hh"
18 
19 namespace vectorial {
20 
21  using concepts::Real;
22 
23  // ************************************************** BramblePasciakFabric **
24 
34  public:
46  Real maxeps = EPS,
47  int maxit = 0, uint relres = 0)
48  : A_(A), B_(B), Bt_(Bt), C_(C), W_(W),
49  maxeps_(maxeps), maxit_(maxit), relres_(relres) { }
50  virtual concepts::Operator<Real>* operator()
51  (concepts::Operator<Real>& matrix) {
52  return new BramblePasciak(A_, B_, Bt_, C_, W_, maxeps_, maxit_,
53  relres_);
54  }
55  protected:
56  virtual std::ostream& info(std::ostream& os) const {
57  return os << concepts::typeOf(*this)<<"(maxeps = " << maxeps_ << ", maxit = "
58  << maxit_ << ", relres = " << relres_ << ")";
59  }
60  private:
74  int maxit_;
76  uint relres_;
77  };
78 
79 } // namespace vectorial
80 
81 #endif // BramblePasciakfabric_hh
virtual std::ostream & info(std::ostream &os) const
concepts::Operator< Real > & C_
Lower right submatrix.
Vector valued problems.
Definition: spaceTraits.hh:24
BramblePasciakFabric(concepts::Operator< Real > &A, concepts::Operator< Real > &B, concepts::Operator< Real > &Bt, concepts::Operator< Real > &C, concepts::Operator< Real > &W, Real maxeps=EPS, int maxit=0, uint relres=0)
Constructor.
concepts::Operator< Real > & B_
Upper right submatrix.
int maxit_
Convergence criteria for the solver.
concepts::Operator< Real > & Bt_
Lower left submatrix.
concepts::Operator< Real > & A_
Upper left submatrix.
Abstract fabric class for linear solvers.
Definition: jdbsym.hh:16
#define EPS
Bramble-Pasciak preconditioned solver for generalized saddle point problems.
Real maxeps_
Convergence criteria for the solver.
uint relres_
relres = 0: absolute residual, relres = 1: relative residual
Fabric class for BramblePasciak.
std::string typeOf(const T &t)
Return the typeid name of a class object.
Definition: output.hh:43
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
concepts::Operator< Real > & W_
Preconditioner for A.
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich