46 #ifndef MUELU_REFMAXWELLSMOOTHER_DEF_HPP
47 #define MUELU_REFMAXWELLSMOOTHER_DEF_HPP
55 #include <Xpetra_MultiVectorFactory.hpp>
63 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
66 const bool solverSupported = (
type_ ==
"RefMaxwell");
72 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
77 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
82 if (pL.
isType<
int>(
"refmaxwell: space number"))
83 spaceNumber = pL.
get<
int>(
"refmaxwell: space number");
84 this->Input(currentLevel,
"A");
85 this->Input(currentLevel,
"Dk_1");
87 this->Input(currentLevel,
"Dk_2");
88 this->Input(currentLevel,
"D0");
89 this->Input(currentLevel,
"Mk_one");
91 this->Input(currentLevel,
"Mk_1_one");
92 this->Input(currentLevel,
"M1_beta");
94 this->Input(currentLevel,
"M1_alpha");
95 this->Input(currentLevel,
"invMk_1_invBeta");
97 this->Input(currentLevel,
"invMk_2_invAlpha");
98 this->Input(currentLevel,
"Coordinates");
101 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
105 SetupRefMaxwell(currentLevel);
107 this->GetOStream(
Statistics1) << description() << std::endl;
110 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
117 if (params.
isType<
int>(
"refmaxwell: space number"))
118 spaceNumber = params.
get<
int>(
"refmaxwell: space number");
120 RCP<Matrix> SM, Dk_1, Dk_2, D0, Mk_one, Mk_1_one, M1_beta, M1_alpha, invMk_1_invBeta, invMk_2_invAlpha;
133 invMk_1_invBeta = currentLevel.
Get<
RCP<Matrix> >(
"invMk_1_invBeta");
135 invMk_2_invAlpha = currentLevel.
Get<
RCP<Matrix> >(
"invMk_2_invAlpha");
142 invMk_1_invBeta, invMk_2_invAlpha,
143 Teuchos::null, Teuchos::null, coords,
145 std::ostringstream oss;
146 op_->describe(*Teuchos::fancyOStream(Teuchos::rcpFromRef(oss)));
147 cachedDescription_ = oss.str();
150 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
154 if (InitialGuessIsZero) {
160 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
167 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
169 std::ostringstream out;
171 out << op_->description();
181 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
186 out0 <<
"Parameter list: " << std::endl;
188 out << this->GetParameterList();
192 if (op_ != Teuchos::null) {
194 out << *op_ << std::endl
206 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
213 #endif // MUELU_REFMAXWELLSMOOTHER_DEF_HPP
T & Get(const std::string &ename, const FactoryBase *factory=NoFactory::get())
Get data without decrementing associated storage counter (i.e., read-only access). Usage: Level->Get< RCP<Matrix> >("A", factory) if factory == NULL => use default factory.
RefMaxwellSmoother(const std::string type, const Teuchos::ParameterList ¶mList)
Constructor.
RCP< SmootherPrototype > Copy() const
Print external lib objects.
void SetupRefMaxwell(Level ¤tLevel)
T & get(const std::string &name, T def_value)
Timer to be used in factories. Similar to Monitor but with additional timers.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Preconditioner (wrapped as a Xpetra::Operator) for Maxwell's equations in curl-curl form...
virtual void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameters from a parameter list and return with default values.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
void declareConstructionOutcome(bool fail, std::string msg)
Class that holds all level-specific information.
size_t getNodeSmootherComplexity() const
Get a rough estimate of cost per iteration.
bool IsSetup() const
Get the state of a smoother prototype.
Class that encapsulates Operator smoothers.
std::string description() const
Return a simple one-line description of this object.
#define MUELU_DESCRIBE
Helper macro for implementing Describable::describe() for BaseClass objects.
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
void DeclareInput(Level ¤tLevel) const
Input.
void Apply(MultiVector &X, const MultiVector &B, bool InitialGuessIsZero=false) const
Apply the preconditioner.
bool isType(const std::string &name) const
Print class parameters (more parameters, more verbose)
Exception throws to report errors in the internal logical of the program.
void SetParameterList(const Teuchos::ParameterList ¶mList)
Set parameters from a parameter list and return with default values.
void Setup(Level ¤tLevel)
Set up the smoother.