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 =
false)
const;
196 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
200 "AmesosSmoother cannot be used with Scalar != double, LocalOrdinal != int, GlobalOrdinal != int");
205 #if defined(HAVE_MUELU_SERIAL)
207 inline RCP<MueLu::SmootherPrototype<double, int, int, Xpetra::EpetraNode> >
208 GetAmesosSmoother<double, int, int, Xpetra::EpetraNode> (
const std::string& type,
const Teuchos::ParameterList& paramList) {
211 #endif // HAVE_MUELU_SERIAL
215 #define MUELU_AMESOSSMOOTHER_SHORT
217 #endif // HAVE_MUELU_AMESOS
218 #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.