SundanceStochBlockJacobiSolver.hpp
Go to the documentation of this file.
00001 #ifndef SUNDANCE_STOCHBLOCKJACOBISOLVER_HPP
00002 #define SUNDANCE_STOCHBLOCKJACOBISOLVER_HPP
00003 
00004 #include "PlayaLinearSolverDecl.hpp"
00005 #include "SundanceSpectralBasis.hpp"
00006 
00007 using Playa::LinearSolver;
00008 using Playa::LinearOperator;
00009 using Playa::Vector;
00010 using Sundance::SpectralBasis;
00011 
00012 namespace Sundance
00013 {
00014 
00015 class StochBlockJacobiSolver
00016 {
00017 public:
00018   /** */
00019   StochBlockJacobiSolver(
00020     const LinearSolver<double>& diagonalSolver,
00021     const SpectralBasis& pcBasis, 
00022     double convTol,
00023     int maxIters,
00024     int verbosity)
00025     : diagonalSolver_(diagonalSolver),
00026       pcBasis_(pcBasis),
00027       convTol_(convTol),
00028       maxIters_(maxIters),
00029       verbosity_(verbosity)
00030     {}
00031 
00032   /** */
00033   void solve(const Array<LinearOperator<double> >& KBlock,
00034     const Array<int>& hasNonzeroMatrixBlock,
00035     const Array<Vector<double> >& fBlock,
00036     Array<Vector<double> >& xBlock) const ;
00037 
00038   /** */
00039   void solve(const Array<LinearOperator<double> >& KBlock,
00040     const Array<Vector<double> >& fBlock,
00041     Array<Vector<double> >& xBlock) const ;
00042 
00043 private:
00044   LinearSolver<double> diagonalSolver_;
00045   SpectralBasis pcBasis_;
00046   double convTol_;
00047   int maxIters_;
00048   int verbosity_;
00049 };
00050 }
00051 
00052 #endif

Site Contact