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
121 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
156 #ifdef HAVE_MUELU_EPETRA
158 # if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
159 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
167 #undef MUELU_AMESOS2SMOOTHER_SHORT
177 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const {};
188 #endif // HAVE_MUELU_EPETRA
192 #define MUELU_AMESOS2SMOOTHER_SHORT
193 #endif // HAVE_MUELU_TPETRA && HAVE_MUELU_AMESOS2
194 #endif // MUELU_AMESOS2SMOOTHER_DECL_HPP
void Setup(Level ¤tLevel)
MueLu::DefaultLocalOrdinal LocalOrdinal
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
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
MueLu::DefaultGlobalOrdinal GlobalOrdinal
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.
Kokkos::Compat::KokkosSerialWrapperNode EpetraNode
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.