46 #ifndef MUELU_HIERARCHYMANAGER_DECL_HPP 
   47 #define MUELU_HIERARCHYMANAGER_DECL_HPP 
   60 #include "MueLu_Hierarchy.hpp" 
   64 #include "MueLu_PerfUtils.hpp" 
   66 #ifdef HAVE_MUELU_INTREPID2 
   82 #undef MUELU_HIERARCHYMANAGER_SHORT 
   84     typedef std::pair<std::string, const FactoryBase*> 
keep_pair;
 
  103       const int lastLevel = startLevel + numDesiredLevel - 1;
 
  107       for (
int iLevel = startLevel; iLevel <= lastLevel; iLevel++)
 
  145       if (l0->IsAvailable(
"Nullspace")) {
 
  146         RCP<Matrix> A = Teuchos::rcp_dynamic_cast<Matrix>(Op);
 
  147         if (A != Teuchos::null) {
 
  149           TEUCHOS_TEST_FOR_EXCEPTION(static_cast<size_t>(A->GetFixedBlockSize()) > nullspace->getNumVectors(), 
Exceptions::RuntimeError, 
"user-provided nullspace has fewer vectors (" << nullspace->getNumVectors() << 
") than number of PDE equations (" << A->GetFixedBlockSize() << 
")");
 
  151           this->
GetOStream(
Warnings0) << 
"Skipping dimension check of user-supplied nullspace because user-supplied operator is not a matrix" << std::endl;
 
  155 #ifdef HAVE_MUELU_DEBUG 
  182             params->set(
"printLoadBalancingInfo", 
true);
 
  183             params->set(
"printCommInfo",          
true);
 
  215         std::map<int, std::vector<keep_pair> >::const_iterator it = 
keep_.find(i);
 
  216         if (it != 
keep_.end()) {
 
  218           const std::vector<keep_pair>& keeps = it->second;
 
  219           for (
size_t j = 0; j < keeps.size(); j++)
 
  220             l->Keep(keeps[j].first, keeps[j].second);
 
  222         if (i < numDesiredLevel_-1) {
 
  232 #ifdef HAVE_MUELU_INTREPID2 
  237       int  lastLevelID = numDesiredLevel_ - 1;
 
  238       bool isLastLevel = 
false;
 
  240       while (!isLastLevel) {
 
  241         bool r = H.
Setup(levelID,
 
  242                          LvlMngr(levelID-1, lastLevelID),
 
  244                          LvlMngr(levelID+1, lastLevelID));
 
  246         isLastLevel = r || (levelID == lastLevelID);
 
  264       numDesiredLevel_ = levelID;
 
  271 #ifdef HAVE_MUELU_INTREPID2 
  272       typedef Kokkos::DynRankView<LocalOrdinal,typename Node::device_type> FCi;
 
  281     typedef std::map<std::string, RCP<const FactoryBase> > 
FactoryMap;
 
  298         return Teuchos::null;
 
  300       if (levelID == lastLevelID+1)         
 
  301         return Teuchos::null;
 
  328     std::map<int, std::vector<keep_pair> > 
keep_;
 
  333       for (
int i = 0; i < data.
size(); ++i) {
 
  337       L->AddKeepFlag(name, &*
levelManagers_[data[i]]->GetFactory(name));
 
  345       for (
int i = 0; i < data.
size(); ++i) {
 
  357     else if (L->IsAvailable(name)) {
 
  359             RCP<T> M = L->template Get< RCP<T> >(name);
 
  372       for (
int i = 0; i < data.
size(); ++i) {
 
  378           if (L->IsAvailable(name)) {
 
  379             RCP<T> M = L->template Get< RCP<T> >(name);
 
  381               RCP<Matrix> A = L->template Get<RCP<Matrix> >(
"A");
 
  383               WriteFieldContainer<T>(fileName,*M,*AG->getColMap());
 
  398       size_t num_els = (size_t) fcont.extent(0);
 
  399       size_t num_vecs =(size_t) fcont.extent(1);
 
  407       for(
size_t j=0; j<num_vecs; j++)  {
 
  409         for(
size_t i=0; i<num_els; i++)
 
  410           v[i] = colMap.getGlobalElement(fcont(i,j));
 
  425 #define MUELU_HIERARCHYMANAGER_SHORT 
  426 #endif // MUELU_HIERARCHYMANAGER_HPP 
virtual void SetupExtra(Hierarchy &) const 
Setup extra data. 
 
Important warning messages (one line) 
 
This class specifies the default factory that should generate some data on a Level if the data does n...
 
Teuchos::Array< int > matricesToPrint_
 
MueLu::DefaultLocalOrdinal LocalOrdinal
 
Teuchos::FancyOStream & GetOStream(MsgType type, int thisProcRankOnly=0) const 
Get an output stream for outputting the input message type. 
 
KokkosClassic::DefaultNode::DefaultNodeType DefaultNode
 
RCP< Level > & GetLevel(const int levelID=0)
Retrieve a certain level from hierarchy. 
 
static Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node >> &map, size_t NumVectors, bool zeroOut=true)
 
void ExportDataSetKeepFlags(Hierarchy &H, const Teuchos::Array< int > &data, const std::string &name) const 
 
virtual RCP< Hierarchy > CreateHierarchy(const std::string &label) const 
Create a labeled empty Hierarchy object. 
 
void AddLevel(const RCP< Level > &level)
Add a level at the end of the hierarchy. 
 
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
 
Teuchos::Array< int > elementToNodeMapsToPrint_
 
static void Write(const std::string &fileName, const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > &M)
 
void SetMaxCoarseSize(Xpetra::global_size_t maxCoarseSize)
 
void AddFactoryManager(int startLevel, int numDesiredLevel, RCP< FactoryManagerBase > manager)
 
One-liner description of what is happening. 
 
void Clear(int startLevel=0)
Clear impermanent data from previous setup. 
 
void SetFuseProlongationAndUpdate(const bool &fuse)
 
std::map< std::string, RCP< const FactoryBase > > FactoryMap
 
Static class that holds the complete list of valid MueLu parameters. 
 
void AllocateLevelMultiVectors(int numvecs)
 
virtual ~HierarchyManager()
 
Teuchos::RCP< FactoryManagerBase > LvlMngr(int levelID, int lastLevelID) const 
 
Print even more statistics. 
 
Teuchos::RCP< Teuchos::ParameterList > matvecParams_
 
void WriteData(Hierarchy &H, const Teuchos::Array< int > &data, const std::string &name) const 
 
static void SetDefaultVerbLevel(const VerbLevel defaultVerbLevel)
Set the default (global) verbosity level. 
 
size_t getNumFactoryManagers() const 
returns number of factory managers stored in levelManagers_ vector. 
 
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. 
 
Teuchos::Array< int > nullspaceToPrint_
 
static Teuchos::RCP< Map< LocalOrdinal, GlobalOrdinal, Node > > Build(UnderlyingLib lib, global_size_t numGlobalElements, GlobalOrdinal indexBase, const Teuchos::RCP< const Teuchos::Comm< int >> &comm, LocalGlobal lg=Xpetra::GloballyDistributed)
 
bool IsPrint(MsgType type, int thisProcRankOnly=-1) const 
Find out whether we need to print out information for a specific message type. 
 
Array< RCP< FactoryManagerBase > > levelManagers_
 
RCP< FactoryManagerBase > GetFactoryManager(int levelID) const 
 
static std::string PrintMatrixInfo(const Matrix &A, const std::string &msgTag, RCP< const Teuchos::ParameterList > params=Teuchos::null)
 
void SetPRrebalance(bool doPRrebalance)
 
void SetMatvecParams(RCP< ParameterList > matvecParams)
 
virtual void SetupOperator(Operator &) const 
Setup Matrix object. 
 
void SetImplicitTranspose(const bool &implicit)
 
Teuchos::Array< int > prolongatorsToPrint_
 
Teuchos::Array< int > coordinatesToPrint_
 
std::map< int, std::vector< keep_pair > > keep_
 
HierarchyManager(int numDesiredLevel=MasterList::getDefault< int >("max levels"))
 
Exception throws to report errors in the internal logical of the program. 
 
std::pair< std::string, const FactoryBase * > keep_pair
 
void describe(Teuchos::FancyOStream &out, const VerbLevel verbLevel=Default) const 
Print the Hierarchy with some verbosity level to a FancyOStream object. 
 
void WriteDataFC(Hierarchy &H, const Teuchos::Array< int > &data, const std::string &name, const std::string &ofname) const 
 
void setlib(Xpetra::UnderlyingLib inlib)
 
Xpetra::global_size_t maxCoarseSize_
 
virtual RCP< Hierarchy > CreateHierarchy() const 
Create an empty Hierarchy object. 
 
bool Setup(int coarseLevelID, const RCP< const FactoryManagerBase > fineLevelManager, const RCP< const FactoryManagerBase > coarseLevelManager, const RCP< const FactoryManagerBase > nextLevelManager=Teuchos::null)
Multi-level setup phase: build a new level of the hierarchy. 
 
void WriteFieldContainer(const std::string &fileName, T &fcont, const Map &colMap) const 
 
bool fuseProlongationAndUpdate_
 
Teuchos::Array< int > restrictorsToPrint_
 
void EnableGraphDumping(const std::string &filename, int levelID=1)
 
Provides methods to build a multigrid hierarchy and apply multigrid cycles. 
 
std::string toString(const T &t)
 
virtual void SetupHierarchy(Hierarchy &H) const 
Setup Hierarchy object.