46 #ifndef MUELU_AMESOS2SMOOTHER_DECL_HPP 47 #define MUELU_AMESOS2SMOOTHER_DECL_HPP 50 #if defined(HAVE_MUELU_TPETRA) && defined(HAVE_MUELU_AMESOS2) 52 #include <Teuchos_ParameterList.hpp> 56 #include "MueLu_SmootherPrototype.hpp" 73 template <class Scalar = SmootherPrototype<>::scalar_type,
78 #undef MUELU_AMESOS2SMOOTHER_SHORT 90 Amesos2Smoother(
const std::string& type =
"",
const Teuchos::ParameterList& paramList = Teuchos::ParameterList());
118 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
121 RCP<SmootherPrototype>
Copy()
const;
143 RCP<Amesos2::Solver<Tpetra_CrsMatrix, Tpetra_MultiVector> >
prec_;
150 #ifdef HAVE_MUELU_EPETRA 152 # if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ 153 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) 161 #undef MUELU_AMESOS2SMOOTHER_SHORT 165 Amesos2Smoother(
const std::string& type =
"",
const Teuchos::ParameterList& paramList = Teuchos::ParameterList()) {
171 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const {};
173 RCP<SmootherPrototype>
Copy()
const {
return Teuchos::null; };
179 #endif // HAVE_MUELU_EPETRA 183 #define MUELU_AMESOS2SMOOTHER_SHORT 184 #endif // HAVE_MUELU_TPETRA && HAVE_MUELU_AMESOS2 185 #endif // MUELU_AMESOS2SMOOTHER_DECL_HPP void Setup(Level ¤tLevel)
void DeclareInput(Level ¤tLevel) const
Input.
std::string type_
amesos2-specific key phrase that denote smoother type
Base class for smoother prototypes.
virtual ~Amesos2Smoother()
Namespace for MueLu classes and methods.
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.
LocalOrdinal local_ordinal_type
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply smoother.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
Amesos2Smoother(const std::string &type="", const Teuchos::ParameterList ¶mList=Teuchos::ParameterList())
Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > Tpetra_MultiVector
std::string description() const
Return a simple one-line description of this object.
Class that holds all level-specific information.
Class that encapsulates Amesos2 direct solvers.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node > Tpetra_CrsMatrix
#define MUELU_TPETRA_ETI_EXCEPTION(cl, obj, go)
void DeclareInput(Level ¤tLevel) const
Input.
virtual ~Amesos2Smoother()
Destructor.
std::string description() const
Return a simple one-line description of this object.
void Setup(Level ¤tLevel)
Set up the direct solver. This creates the underlying Amesos2 solver object according to the paramete...
GlobalOrdinal global_ordinal_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.
RCP< Amesos2::Solver< Tpetra_CrsMatrix, Tpetra_MultiVector > > prec_
pointer to Amesos2 solver object
RCP< SmootherPrototype > Copy() const
RCP< SmootherPrototype > Copy() const