Go to the documentation of this file.00001
00002
00003 #ifndef BramblePasciakfabric_hh
00004 #define BramblePasciakfabric_hh
00005
00006 #if __GNUC__ == 2
00007 # include <float.h>
00008 # define EPS DBL_EPSILON
00009 #else
00010 # include <limits>
00011 # define EPS std::numeric_limits<double>::epsilon()
00012 #endif
00013 #include "bramblePasciak.hh"
00014 #include "operator/solverFabric.hh"
00015
00016 namespace vectorial {
00017
00018 using concepts::Real;
00019
00020
00021
00030 class BramblePasciakFabric : public concepts::SolverFabric<Real> {
00031 public:
00038 BramblePasciakFabric(concepts::Operator<Real>& A,
00039 concepts::Operator<Real>& B,
00040 concepts::Operator<Real>& Bt,
00041 concepts::Operator<Real>& C,
00042 concepts::Operator<Real>& W,
00043 Real maxeps = EPS,
00044 int maxit = 0, uint relres = 0)
00045 : A_(A), B_(B), Bt_(Bt), C_(C), W_(W),
00046 maxeps_(maxeps), maxit_(maxit), relres_(relres) { }
00047 virtual concepts::Operator<Real>* operator()
00048 (concepts::Operator<Real>& matrix) {
00049 return new BramblePasciak(A_, B_, Bt_, C_, W_, maxeps_, maxit_,
00050 relres_);
00051 }
00052 protected:
00053 virtual std::ostream& info(std::ostream& os) const {
00054 return os << "BramblePasciakFabric(maxeps = " << maxeps_ << ", maxit = "
00055 << maxit_ << ", relres = " << relres_ << ")";
00056 }
00057 private:
00059 concepts::Operator<Real>& A_;
00061 concepts::Operator<Real>& B_;
00063 concepts::Operator<Real>& Bt_;
00065 concepts::Operator<Real>& C_;
00067 concepts::Operator<Real>& W_;
00069 Real maxeps_;
00071 int maxit_;
00073 uint relres_;
00074 };
00075
00076 }
00077
00078 #endif // BramblePasciakfabric_hh