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> 58 #include "MueLu_SmootherPrototype.hpp" 75 template <class Node = typename SmootherPrototype<double,int,int>::node_type>
82 #undef MUELU_AMESOSSMOOTHER_SHORT 116 AmesosSmoother(
const std::string& type =
"",
const Teuchos::ParameterList& paramList = Teuchos::ParameterList());
147 void Apply(MultiVector& X,
const MultiVector& B,
bool =
false)
const;
151 RCP<SmootherPrototype>
Copy()
const;
196 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
197 RCP<MueLu::SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal, Node> >
198 GetAmesosSmoother (
const std::string& =
"",
const Teuchos::ParameterList& = Teuchos::ParameterList ()) {
200 "AmesosSmoother cannot be used with Scalar != double, LocalOrdinal != int, GlobalOrdinal != int");
201 TEUCHOS_UNREACHABLE_RETURN(Teuchos::null);
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
RCP< Epetra_LinearProblem > linearProblem_
Problem that Amesos uses internally.
AmesosSmoother(const std::string &type="", const Teuchos::ParameterList ¶mList=Teuchos::ParameterList())
Constructor.
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
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.
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
RCP< SmootherPrototype > Copy() const
void DeclareInput(Level ¤tLevel) const
Input.
void Apply(MultiVector &X, const MultiVector &B, bool=false) const
Apply the direct solver.
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.
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.
Class that encapsulates Amesos direct solvers.