46 #ifndef MUELU_AMESOSSMOOTHER_HPP 47 #define MUELU_AMESOSSMOOTHER_HPP 50 #if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_AMESOS) 52 #include <Teuchos_ParameterList.hpp> 53 #include <Xpetra_Matrix_fwd.hpp> 55 class Epetra_LinearProblem;
58 #include "MueLu_SmootherPrototype.hpp" 81 typedef KokkosClassic::DefaultNode::DefaultNodeType
Node;
84 #undef MUELU_AMESOSSMOOTHER_SHORT 118 AmesosSmoother(
const std::string& type =
"",
const Teuchos::ParameterList& paramList = Teuchos::ParameterList());
149 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
153 RCP<SmootherPrototype>
Copy()
const;
193 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
194 RCP<MueLu::SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
196 const Teuchos::ParameterList& paramList = Teuchos::ParameterList ())
198 TEUCHOS_TEST_FOR_EXCEPTION(
true,
Exceptions::RuntimeError,
"AmesosSmoother cannot be used with Scalar != double, LocalOrdinal != int, GlobalOrdinal != int");
199 return Teuchos::null;
203 inline RCP<MueLu::SmootherPrototype<double, int, int> >
205 const Teuchos::ParameterList& paramList)
212 #define MUELU_AMESOSSMOOTHER_SHORT 214 #endif // HAVE_MUELU_AMESOS 215 #endif // MUELU_AMESOSSMOOTHER_HPP void DeclareInput(Level ¤tLevel) const
Input.
RCP< Epetra_LinearProblem > linearProblem_
Problem that Amesos uses internally.
KokkosClassic::DefaultNode::DefaultNodeType Node
void Setup(Level ¤tLevel)
Set up the direct solver. This creates the underlying Amesos solver object according to the parameter...
Base class for smoother prototypes.
AmesosSmoother(const std::string &type="", const Teuchos::ParameterList ¶mList=Teuchos::ParameterList())
Constructor.
std::string type_
amesos-specific key phrase that denote smoother type
Namespace for MueLu classes and methods.
RCP< Matrix > A_
Matrix. Not used directly, but held inside of linearProblem_. So we have to keep an RCP pointer to it...
RCP< Amesos_BaseSolver > prec_
pointer to Amesos solver object
Class that holds all level-specific information.
RCP< MueLu::SmootherPrototype< double, int, int > > GetAmesosSmoother< double, int, int >(const std::string &type, const Teuchos::ParameterList ¶mList)
std::string description() const
Return a simple one-line description of this object.
RCP< MueLu::SmootherPrototype< Scalar, LocalOrdinal, GlobalOrdinal, Node > > GetAmesosSmoother(const std::string &type="", const Teuchos::ParameterList ¶mList=Teuchos::ParameterList())
virtual ~AmesosSmoother()
Destructor.
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the direct solver.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
Exception throws to report errors in the internal logical of the program.
RCP< SmootherPrototype > Copy() const
Class that encapsulates Amesos direct solvers.