46 #ifndef MUELU_ZOLTAN2INTERFACE_DECL_HPP 47 #define MUELU_ZOLTAN2INTERFACE_DECL_HPP 51 #if defined(HAVE_MUELU_ZOLTAN2) && defined(HAVE_MPI) 63 #if defined(HAVE_MUELU_ZOLTAN) 64 #include "MueLu_ZoltanInterface.hpp" 114 template <
class Scalar,
119 #undef MUELU_ZOLTAN2INTERFACE_SHORT 152 #ifdef HAVE_MUELU_EPETRA 154 #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) || \ 155 (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT)))) 157 #if defined(HAVE_MUELU_ZOLTAN) 166 #undef MUELU_ZOLTAN2INTERFACE_SHORT 173 level_->SetLevelID(1);
176 zoltanInterface_ = Teuchos::null;
177 level_ = Teuchos::null;
183 validParamList->set<
RCP<const FactoryBase> > (
"Coordinates", Teuchos::null,
"Factory of the coordinates");
184 validParamList->set<
RCP<const FactoryBase> > (
"number of partitions", Teuchos::null,
"Instance of RepartitionHeuristicFactory.");
187 return validParamList;
190 Input(currentLevel,
"A");
191 Input(currentLevel,
"number of partitions");
192 Input(currentLevel,
"Coordinates");
195 this->
GetOStream(
Warnings0) <<
"Tpetra does not support <double,int,int,EpetraNode> instantiation, " 196 "switching Zoltan2Interface to ZoltanInterface" << std::endl;
203 level_->Set(
"number of partitions", currentLevel.
Get<
GO>(
"number of partitions"));
205 level_->Request(
"Partition", zoltanInterface_.get());
206 zoltanInterface_->Build(*level_);
209 level_->Get(
"Partition", decomposition, zoltanInterface_.
get());
210 Set(currentLevel,
"Partition", decomposition);
226 void Build(Level &level)
const {};
228 #endif // HAVE_MUELU_ZOLTAN 232 #endif // HAVE_MUELU_EPETRA 236 #define MUELU_ZOLTAN2INTERFACE_SHORT 237 #endif //if defined(HAVE_MUELU_ZOLTAN2) && defined(HAVE_MPI) 239 #endif // MUELU_ZOLTAN2INTERFACE_DECL_HPP Important warning messages (one line)
void Build(Level ¤tLevel) const
Build an object with this factory.
void DeclareInput(Level ¤tLevel) const
Specifies the data that this class needs, and the factories that generate that data.
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
Teuchos::FancyOStream & GetOStream(MsgType type, int thisProcRankOnly=0) const
Get an output stream for outputting the input message type.
Zoltan2Interface()
Constructor.
LocalOrdinal local_ordinal_type
Namespace for MueLu classes and methods.
Interface to Zoltan library.This interface provides access to partitioning methods in Zoltan...
virtual ~Zoltan2Interface()
Destructor.
void Build(Level ¤tLevel) const
Build an object with this factory.
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Class that holds all level-specific information.
Interface to Zoltan2 library.This interface provides access to partitioning methods in Zoltan2...
RCP< ZoltanInterface > zoltanInterface_
T Get(Level &level, const std::string &varName) const
void Input(Level &level, const std::string &varName) const
virtual ~Zoltan2Interface()
Exception throws to report errors in the internal logical of the program.
void Set(Level &level, const std::string &varName, const T &data) const
RCP< const ParameterList > GetValidParameterList() const
Return a const parameter list of valid parameters that setParameterList() will accept.
Base class for factories that use one level (currentLevel).
void DeclareInput(Level ¤tLevel) const
Specifies the data that this class needs, and the factories that generate that data.
GlobalOrdinal global_ordinal_type