46 #ifndef MUELU_AMESOS2SMOOTHER_DECL_HPP
47 #define MUELU_AMESOS2SMOOTHER_DECL_HPP
50 #if defined(HAVE_MUELU_TPETRA) && defined(HAVE_MUELU_AMESOS2)
56 #include "MueLu_SmootherPrototype.hpp"
60 namespace Amesos2 {
template<
class OP,
class MV>
class Solver; }
73 template <class Scalar = SmootherPrototype<>::scalar_type,
74 class LocalOrdinal =
typename SmootherPrototype<Scalar>::local_ordinal_type,
75 class GlobalOrdinal =
typename SmootherPrototype<Scalar, LocalOrdinal>::global_ordinal_type,
76 class Node =
typename SmootherPrototype<Scalar, LocalOrdinal, GlobalOrdinal>::node_type>
78 #undef MUELU_AMESOS2SMOOTHER_SHORT
118 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
153 #ifdef HAVE_MUELU_EPETRA
155 # if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
156 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
164 #undef MUELU_AMESOS2SMOOTHER_SHORT
174 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const {};
185 #endif // HAVE_MUELU_EPETRA
189 #define MUELU_AMESOS2SMOOTHER_SHORT
190 #endif // HAVE_MUELU_TPETRA && HAVE_MUELU_AMESOS2
191 #endif // MUELU_AMESOS2SMOOTHER_DECL_HPP
void Setup(Level ¤tLevel)
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
std::string type_
amesos2-specific key phrase that denote smoother type
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the direct solver. Solves the linear system AX=B using the constructed solver.
Base class for smoother prototypes.
virtual ~Amesos2Smoother()
Amesos2Smoother(const std::string &type="", const Teuchos::ParameterList ¶mList=Teuchos::ParameterList())
Constructor Creates a MueLu interface to the direct solvers in the Amesos2 package. If you are using type=="", then either SuperLU or KLU2 are used by default.
std::string description() const
Return a simple one-line description of this object.
Amesos2Smoother(const std::string &type="", const Teuchos::ParameterList ¶mList=Teuchos::ParameterList())
Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > Tpetra_MultiVector
RCP< SmootherPrototype > Copy() const
Class that holds all level-specific information.
void DeclareInput(Level ¤tLevel) const
Input.
Class that encapsulates Amesos2 direct solvers.
Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > Tpetra_CrsMatrix
#define MUELU_TPETRA_ETI_EXCEPTION(cl, obj, go)
RCP< SmootherPrototype > Copy() const
void DeclareInput(Level ¤tLevel) const
Input.
virtual ~Amesos2Smoother()
Destructor.
void Setup(Level ¤tLevel)
Set up the direct solver. This creates the underlying Amesos2 solver object according to the paramete...
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
RCP< Amesos2::Solver< Tpetra_CrsMatrix, Tpetra_MultiVector > > prec_
pointer to Amesos2 solver object
std::string description() const
Return a simple one-line description of this object.
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply smoother.