00001 /* @HEADER@ */ 00002 // 00003 /* @HEADER@ */ 00004 00005 #ifndef PLAYA_AMESOSSOLVER_HPP 00006 #define PLAYA_AMESOSSOLVER_HPP 00007 00008 #include "PlayaDefs.hpp" 00009 #include "PlayaLinearSolverBaseDecl.hpp" 00010 #include "PlayaHandleable.hpp" 00011 #include "PlayaPrintable.hpp" 00012 #include "Teuchos_Describable.hpp" 00013 00014 #include "Teuchos_Array.hpp" 00015 #include "Teuchos_RefCountPtr.hpp" 00016 #include "Teuchos_ParameterList.hpp" 00017 00018 namespace Playa 00019 { 00020 using namespace Teuchos; 00021 00022 /** 00023 * 00024 */ 00025 class AmesosSolver : public LinearSolverBase<double>, 00026 public Playa::Handleable<LinearSolverBase<double> >, 00027 public Printable, 00028 public Describable 00029 { 00030 public: 00031 /** */ 00032 AmesosSolver(const ParameterList& params); 00033 00034 /** */ 00035 virtual ~AmesosSolver(){;} 00036 00037 /** \name Printable interface */ 00038 //@{ 00039 /** Write to a stream */ 00040 void print(std::ostream& os) const 00041 { 00042 os << description() << std::endl; 00043 } 00044 //@} 00045 00046 /** \name Describable interface */ 00047 //@{ 00048 /** Write a brief description */ 00049 std::string description() const {return "AmesosSolver[" + kernel_ + "]";} 00050 //@} 00051 00052 00053 00054 /** */ 00055 virtual SolverState<double> solve(const LinearOperator<double>& op, 00056 const Vector<double>& rhs, 00057 Vector<double>& soln) const ; 00058 00059 /** \name Handleable interface */ 00060 //@{ 00061 /** Return a ref count pointer to a newly created object */ 00062 virtual RCP<LinearSolverBase<double> > getRcp() 00063 {return rcp(this);} 00064 //@} 00065 00066 00067 protected: 00068 00069 private: 00070 std::string kernel_; 00071 }; 00072 00073 } 00074 00075 #endif