46 #ifndef MUELU_ZOLTAN2INTERFACE_DECL_HPP
47 #define MUELU_ZOLTAN2INTERFACE_DECL_HPP
51 #if defined(HAVE_MUELU_ZOLTAN2) && defined(HAVE_MPI)
62 #if defined(HAVE_MUELU_ZOLTAN)
63 #include "MueLu_ZoltanInterface.hpp"
116 #undef MUELU_ZOLTAN2INTERFACE_SHORT
148 #ifdef HAVE_MUELU_EPETRA
150 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \
151 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
153 #if defined(HAVE_MUELU_ZOLTAN)
162 #undef MUELU_ZOLTAN2INTERFACE_SHORT
172 level_->SetLevelID(1);
175 zoltanInterface_ = Teuchos::null;
176 level_ = Teuchos::null;
183 validParamList->set<
RCP<const FactoryBase> >(
"number of partitions", Teuchos::null,
"Instance of RepartitionHeuristicFactory.");
186 return validParamList;
189 Input(currentLevel,
"A");
190 Input(currentLevel,
"number of partitions");
196 if (providedList != Teuchos::null && providedList->
isType<std::string>(
"algorithm")) {
197 const std::string algo = providedList->
get<std::string>(
"algorithm");
198 if (algo ==
"multijagged" || algo ==
"rcb")
199 Input(currentLevel,
"Coordinates");
201 Input(currentLevel,
"Coordinates");
204 this->
GetOStream(
Warnings0) <<
"Tpetra does not support <double,int,int,EpetraNode> instantiation, "
205 "switching Zoltan2Interface to ZoltanInterface"
209 level_->Set(
"A", Get<
RCP<Matrix> >(currentLevel,
"A"));
211 level_->Set(
"number of partitions", currentLevel.
Get<
GO>(
"number of partitions"));
213 level_->Request(
"Partition", zoltanInterface_.get());
214 zoltanInterface_->Build(*level_);
217 level_->Get(
"Partition", decomposition, zoltanInterface_.
get());
218 Set(currentLevel,
"Partition", decomposition);
234 void Build(Level& level)
const {};
236 #endif // HAVE_MUELU_ZOLTAN
240 #endif // HAVE_MUELU_EPETRA
244 #define MUELU_ZOLTAN2INTERFACE_SHORT
245 #endif // if defined(HAVE_MUELU_ZOLTAN2) && defined(HAVE_MPI)
247 #endif // MUELU_ZOLTAN2INTERFACE_DECL_HPP
Important warning messages (one line)
virtual const Teuchos::ParameterList & GetParameterList() const
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
MueLu::DefaultLocalOrdinal LocalOrdinal
Teuchos::FancyOStream & GetOStream(MsgType type, int thisProcRankOnly=0) const
Get an output stream for outputting the input message type.
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< ParameterList > defaultZoltan2Params
Tpetra::KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
T & get(const std::string &name, T def_value)
Zoltan2Interface()
Constructor.
void Build(Level ¤tLevel) const
Build an object with this factory.
Interface to Zoltan library.This interface provides access to partitioning methods in Zoltan...
virtual ~Zoltan2Interface()
Destructor.
Xpetra::MultiVector< real_type, LO, GO, NO > RealValuedMultiVector
void Build(Level ¤tLevel) const
Build an object with this factory.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
MueLu::DefaultScalar Scalar
MueLu::DefaultGlobalOrdinal GlobalOrdinal
Class that holds all level-specific information.
Interface to Zoltan2 library.This interface provides access to partitioning methods in Zoltan2...
RCP< ZoltanInterface > zoltanInterface_
any & getAny(bool activeQry=true)
bool isType(const std::string &name) const
virtual ~Zoltan2Interface()
Exception throws to report errors in the internal logical of the program.
void DeclareInput(Level ¤tLevel) const
Specifies the data that this class needs, and the factories that generate that data.
ParameterEntry & getEntry(const std::string &name)
Teuchos::ScalarTraits< Scalar >::magnitudeType real_type
Base class for factories that use one level (currentLevel).
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
void DeclareInput(Level ¤tLevel) const
Specifies the data that this class needs, and the factories that generate that data.