46 #ifndef MUELU_AMESOSSMOOTHER_HPP 47 #define MUELU_AMESOSSMOOTHER_HPP 50 #if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_AMESOS) 58 #include "MueLu_SmootherPrototype.hpp" 75 template <class Node = typename SmootherPrototype<double,int,int>::node_type>
82 #undef MUELU_AMESOSSMOOTHER_SHORT 147 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
192 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
196 "AmesosSmoother cannot be used with Scalar != double, LocalOrdinal != int, GlobalOrdinal != int");
197 return Teuchos::null;
201 #if defined(HAVE_MUELU_SERIAL) 203 inline RCP<MueLu::SmootherPrototype<double, int, int, Xpetra::EpetraNode> >
204 GetAmesosSmoother<double, int, int, Xpetra::EpetraNode> (
const std::string& type,
const Teuchos::ParameterList& paramList) {
207 #endif // HAVE_MUELU_SERIAL 211 #define MUELU_AMESOSSMOOTHER_SHORT 213 #endif // HAVE_MUELU_AMESOS 214 #endif // MUELU_AMESOSSMOOTHER_HPP
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the direct solver.
RCP< Epetra_LinearProblem > linearProblem_
Problem that Amesos uses internally.
AmesosSmoother(const std::string &type="", const Teuchos::ParameterList ¶mList=Teuchos::ParameterList())
Constructor.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
RCP< Matrix > A_
Matrix. Not used directly, but held inside of linearProblem_. So we have to keep an RCP pointer to it...
Base class for smoother prototypes.
Namespace for MueLu classes and methods.
void Setup(Level ¤tLevel)
Set up the direct solver. This creates the underlying Amesos solver object according to the parameter...
std::string type_
amesos-specific key phrase that denote smoother type
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
Class that holds all level-specific information.
virtual ~AmesosSmoother()
Destructor.
RCP< SmootherPrototype > Copy() const
void DeclareInput(Level ¤tLevel) const
Input.
RCP< MueLu::SmootherPrototype< Scalar, LocalOrdinal, GlobalOrdinal, Node > > GetAmesosSmoother(const std::string &type="", const Teuchos::ParameterList ¶mList=Teuchos::ParameterList())
Non-member templated function GetAmesosSmoother() returns a new AmesosSmoother object.
std::string description() const
Return a simple one-line description of this object.
RCP< Amesos_BaseSolver > prec_
pointer to Amesos solver object
Exception throws to report errors in the internal logical of the program.
Class that encapsulates Amesos direct solvers.