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"
70 template <class Scalar = SmootherPrototype<>::scalar_type,
76#undef MUELU_MATLABSMOOTHER_SHORT
92 template<
class Scalar2,
class LocalOrdinal2,
class GlobalOrdinal2,
class Node2>
96 MatlabSmoother(
const Teuchos::ParameterList& paramList = Teuchos::ParameterList());
132 void Apply(MultiVector& X,
const MultiVector& B,
bool InitialGuessIsZero =
false)
const;
139 RCP<SmootherPrototype>
Copy()
const;
144 template<
typename Node2>
145 RCP<MueLu::MatlabSmoother<Scalar,LocalOrdinal,GlobalOrdinal,Node2> >
146 clone(
const RCP<Node2>& node2,
const Teuchos::RCP<
const Xpetra::Matrix<Scalar,LocalOrdinal,GlobalOrdinal,Node2> >& A_newnode)
const;
182 mutable RCP<Matrix>
A_;
186 template<
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
187 template<
typename Node2>
188 RCP<MueLu::MatlabSmoother<Scalar,LocalOrdinal,GlobalOrdinal,Node2> >
190 const ParameterList& paramList = this->GetParameterList();
192 RCP<MatlabSmoother<Scalar, LocalOrdinal, GlobalOrdinal, Node2> > cloneSmoother =
195 cloneSmoother->needsSetup_ = needsSetup_;
196 cloneSmoother->setupFunction_ = setupFunction_;
197 cloneSmoother->solveFunction_ = solveFunction_;
198 cloneSmoother->A_ = A_;
200 for(
size_t i=0; i< solveData_.size(); i++)
201 cloneSmoother->solveData_->push_back(solveData_[i]);
202 cloneSmoother->SetParameterList(paramList);
203 cloneSmoother->IsSetup(this->IsSetup());
204 return cloneSmoother;
210#define MUELU_MATLABSMOOTHER_SHORT
MueLu::DefaultLocalOrdinal LocalOrdinal
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
virtual ~MatlabSmoother()
Destructor.
std::string solveFunction_
Matlab solve function.
void DeclareInput(Level ¤tLevel) const
Input.
size_t getNodeSmootherComplexity() const
Compute a rough estimate of the cost to apply this smoother on this MPI rank. Return Teuchos::Ordinal...
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.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
void Setup(Level ¤tLevel)
Set up the smoother.
size_t solveDataSize_
Amount of solve data (besides A, LHS & RHS)
RCP< SmootherPrototype > Copy() const
RCP< Matrix > A_
Matrix, (maybe) used in apply.
friend class MatlabSmoother
Constructor.
std::vector< Teuchos::RCP< MuemexArg > > solveData_
List of data generated by setup which will be sent to solve after "A", "LHS" and "RHS".
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the preconditioner.
std::string setupFunction_
Matlab setup function.
void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameters from a parameter list and return with default values.
std::string description() const
Return a simple one-line description of this object.
Base class for smoother prototypes.
GlobalOrdinal global_ordinal_type
LocalOrdinal local_ordinal_type
Namespace for MueLu classes and methods.