10 #ifndef MUELU_AMESOSSMOOTHER_HPP
11 #define MUELU_AMESOSSMOOTHER_HPP
14 #if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_AMESOS)
22 #include "MueLu_SmootherPrototype.hpp"
39 template <class Node = typename SmootherPrototype<double, int, int>::node_type>
45 #undef MUELU_AMESOSSMOOTHER_SHORT
109 void Apply(MultiVector& X,
const MultiVector& B,
bool =
false)
const;
156 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
160 "AmesosSmoother cannot be used with Scalar != double, LocalOrdinal != int, GlobalOrdinal != int");
165 #if defined(HAVE_MUELU_SERIAL)
167 inline RCP<MueLu::SmootherPrototype<double, int, int, Xpetra::EpetraNode> >
168 GetAmesosSmoother<double, int, int, Xpetra::EpetraNode>(
const std::string& type,
const Teuchos::ParameterList& paramList) {
171 #endif // HAVE_MUELU_SERIAL
175 #define MUELU_AMESOSSMOOTHER_SHORT
177 #endif // HAVE_MUELU_AMESOS
178 #endif // MUELU_AMESOSSMOOTHER_HPP
void Apply(MultiVector &X, const MultiVector &B, bool=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)
std::string description() const
Return a simple one-line description of this object.
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.
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)
Class that holds all level-specific information.
virtual ~AmesosSmoother()
Destructor.
RCP< SmootherPrototype > Copy() const
#define TEUCHOS_UNREACHABLE_RETURN(dummyReturnVal)
RCP< Amesos_BaseSolver > prec_
pointer to Amesos solver object
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
Exception throws to report errors in the internal logical of the program.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
RCP< MueLu::SmootherPrototype< Scalar, LocalOrdinal, GlobalOrdinal, Node > > GetAmesosSmoother(const std::string &="", const Teuchos::ParameterList &=Teuchos::ParameterList())
Non-member templated function GetAmesosSmoother() returns a new AmesosSmoother object.
void DeclareInput(Level ¤tLevel) const
Input.
Class that encapsulates Amesos direct solvers.