17 #ifndef MUELU_PERMUTINGSMOOTHER_DEF_HPP
18 #define MUELU_PERMUTINGSMOOTHER_DEF_HPP
22 #include <Xpetra_MultiVectorFactory.hpp>
30 #include "MueLu_TrilinosSmoother.hpp"
32 #include "MueLu_PermutationFactory.hpp"
37 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
41 , permQT_(Teuchos::null)
42 , permP_(Teuchos::null)
43 , diagScalingOp_(Teuchos::null) {
50 newPermFact->SetFactory(
"PermutationRowMapFactory", mapFact);
56 #if defined(HAVE_MUELU_EPETRA) && defined(HAVE_MUELU_IFPACK)
70 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
73 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
77 currentLevel.
DeclareInput(
"permScaling", permFact_.get());
79 s_->DeclareInput(currentLevel);
82 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
87 this->GetOStream(
Warnings0) <<
"MueLu::PermutingSmoother::Setup(): Setup() has already been called" << std::endl;
91 permQT_ = currentLevel.
Get<
RCP<Matrix> >(
"permQT", permFact_.get());
92 diagScalingOp_ = currentLevel.
Get<
RCP<Matrix> >(
"permScaling", permFact_.get());
94 s_->Setup(currentLevel);
99 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
106 Xtemp->update(STS::one(), X, STS::zero());
115 s_->Apply(*Xtemp, *Btemp2, InitialGuessIsZero);
121 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
127 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
129 std::ostringstream out;
134 template <
class Scalar,
class LocalOrdinal,
class GlobalOrdinal,
class Node>
Important warning messages (one line)
virtual const Teuchos::ParameterList & GetParameterList() const
std::string description() const
Return a simple one-line description of this object.
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.
RCP< SmootherPrototype > Copy() const
virtual ~PermutingSmoother()
Destructor.
Class that encapsulates external library smoothers.
Timer to be used in factories. Similar to Monitor but with additional timers.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
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.
factory generates a row- and column permutation operators P and Q such that P*A*Q^T is a (hopefully) ...
This class first calculates row- and column permutation operators and applies a smoother to the permu...
LO overlap_
overlap when using the smoother in additive Schwarz mode
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 Setup(Level ¤tLevel)
Set up the direct solver.
Class that holds all level-specific information.
RCP< FactoryBase > permFact_
Permutation Factory.
void DeclareInput(Level ¤tLevel) const
Input.
bool IsSetup() const
Get the state of a smoother prototype.
std::string type_
ifpack1/2-specific key phrase that denote smoother type
void print(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const
Print the object with some verbosity level to an FancyOStream object.
#define MUELU_DESCRIBE
Helper macro for implementing Describable::describe() for BaseClass objects.
PermutingSmoother(std::string const &mapName, const RCP< const FactoryBase > &mapFact, std::string const &type="", const Teuchos::ParameterList ¶mList=Teuchos::ParameterList(), LO const &overlap=0, RCP< FactoryBase > permFact=Teuchos::null)
Constructor.
Exception throws to report errors in the internal logical of the program.
RCP< SmootherPrototype > s_
Smoother.
void DeclareInput(const std::string &ename, const FactoryBase *factory, const FactoryBase *requestedBy=NoFactory::get())
Callback from FactoryBase::CallDeclareInput() and FactoryBase::DeclareInput()
virtual std::string description() const
Return a simple one-line description of this object.