10 #ifndef MUELU_AMESOS2SMOOTHER_DECL_HPP
11 #define MUELU_AMESOS2SMOOTHER_DECL_HPP
14 #if defined(HAVE_MUELU_AMESOS2)
22 #include "MueLu_SmootherPrototype.hpp"
27 template <
class OP,
class MV>
33 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
55 template <class Scalar = SmootherPrototype<>::scalar_type,
60 #undef MUELU_AMESOS2SMOOTHER_SHORT
102 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
139 #ifdef HAVE_MUELU_EPETRA
141 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
142 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
150 #undef MUELU_AMESOS2SMOOTHER_SHORT
155 MUELU_TPETRA_ETI_EXCEPTION(
"Amesos2Smoother<double,int,int,EpetraNode>",
"Amesos2Smoother<double,int,int,EpetraNode>",
"int");
160 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const {};
174 #endif // HAVE_MUELU_EPETRA
178 #define MUELU_AMESOS2SMOOTHER_SHORT
179 #endif // HAVE_MUELU_AMESOS2
180 #endif // MUELU_AMESOS2SMOOTHER_DECL_HPP
void Setup(Level ¤tLevel)
RCP< Projection< Scalar, LocalOrdinal, GlobalOrdinal, Node > > projection_
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.
LocalOrdinal local_ordinal_type
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.
Teuchos::RCP< Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Nullspace_
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...
GlobalOrdinal global_ordinal_type
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > localMap_
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.
Projection(RCP< Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >> &Nullspace)
void projectOut(Xpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > &X)