46 #ifndef MUELU_MATLABSMOOTHER_DECL_HPP 47 #define MUELU_MATLABSMOOTHER_DECL_HPP 49 #include <Teuchos_ParameterList.hpp> 50 #include <Xpetra_Matrix_fwd.hpp> 53 #if defined(HAVE_MUELU_TPETRA) && defined(HAVE_MUELU_MATLAB) 54 #include <Tpetra_CrsMatrix.hpp> 55 #include "MueLu_SmootherPrototype.hpp" 69 template <class Scalar = SmootherPrototype<>::scalar_type,
75 #undef MUELU_MATLABSMOOTHER_SHORT 91 template<
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
95 MatlabSmoother(
const Teuchos::ParameterList& paramList = Teuchos::ParameterList());
131 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
138 RCP<SmootherPrototype>
Copy()
const;
143 template<
typename Node2>
144 RCP<MueLu::MatlabSmoother<Scalar,LocalOrdinal,GlobalOrdinal,Node2> >
145 clone(
const RCP<Node2>& node2,
const Teuchos::RCP<
const Xpetra::Matrix<Scalar,LocalOrdinal,GlobalOrdinal,Node2> >& A_newnode)
const;
178 mutable RCP<Matrix>
A_;
182 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
183 template<
typename Node2>
184 RCP<MueLu::MatlabSmoother<Scalar,LocalOrdinal,GlobalOrdinal,Node2> >
188 RCP<MatlabSmoother<Scalar, LocalOrdinal, GlobalOrdinal, Node2> > cloneSmoother =
194 cloneSmoother->A_ =
A_;
197 cloneSmoother->solveData_->push_back(
solveData_[i]);
198 cloneSmoother->SetParameterList(paramList);
199 cloneSmoother->IsSetup(this->
IsSetup());
200 return cloneSmoother;
206 #define MUELU_MATLABSMOOTHER_SHORT 207 #endif // HAVE_MUELU_TPETRA && HAVE_MUELU_MATLAB 208 #endif // MUELU_MATLABSMOOTHER_DECL_HPP void SetParameterList(const Teuchos::ParameterList ¶mList)
void DeclareInput(Level ¤tLevel) const
Input.
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the preconditioner.
RCP< SmootherPrototype > Copy() const
size_t solveDataSize_
Amount of solve data (besides A, LHS & RHS)
std::vector< Teuchos::RCP< MuemexArg > > solveData_
List of data generated by setup which will be sent to solve after "A", "LHS" and "RHS".
Base class for smoother prototypes.
void Setup(Level ¤tLevel)
Set up the smoother.
Namespace for MueLu classes and methods.
LocalOrdinal local_ordinal_type
virtual const Teuchos::ParameterList & GetParameterList() const
RCP< Matrix > A_
Matrix, (maybe) used in apply.
virtual ~MatlabSmoother()
Destructor.
Class that holds all level-specific information.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
std::string setupFunction_
Matlab setup function.
bool IsSetup() const
Get the state of a smoother prototype.
friend class MatlabSmoother
Constructor.
std::string solveFunction_
Matlab solve function.
Class that encapsulates Matlab smoothers.
GlobalOrdinal global_ordinal_type
std::string description() const
Return a simple one-line description of this object.
std::string needsSetup_
List of arguments to the MATLAB setup function besides "A", in order.
RCP< MueLu::MatlabSmoother< Scalar, LocalOrdinal, GlobalOrdinal, Node2 > > clone(const RCP< Node2 > &node2, const Teuchos::RCP< const Xpetra::Matrix< Scalar, LocalOrdinal, GlobalOrdinal, Node2 > > &A_newnode) const
Clone the smoother to a different node type.