// @HEADER // ***************************************************************************** // MueLu: A package for multigrid based preconditioning // // Copyright 2012 NTESS and the MueLu contributors. // SPDX-License-Identifier: BSD-3-Clause // ***************************************************************************** // @HEADER #ifndef MUELU_REBALANCEBLOCKACFACTORY_DECL_HPP_ #define MUELU_REBALANCEBLOCKACFACTORY_DECL_HPP_ #include #include #include #include #include #include #include #include "MueLu_ConfigDefs.hpp" #include "MueLu_RebalanceBlockAcFactory_fwd.hpp" #include "MueLu_FactoryBase_fwd.hpp" #include "MueLu_FactoryManager_fwd.hpp" #include "MueLu_Level_fwd.hpp" #include "MueLu_PerfUtils_fwd.hpp" #include "MueLu_TwoLevelFactoryBase.hpp" #include "MueLu_Types.hpp" namespace MueLu { /*! @class RebalanceAcFactory @brief Factory to perform rebalancing of coarse matrices. Factory that performes the actual rebalancing of coarse maps based on pre-computed rebalancing data (generated by other factories). ## Input/output ## ### User parameters ### Parameter | type | default | master.xml | validated | requested | description ----------|------|---------|:----------:|:---------:|:---------:|------------ A | string | null | | * | * | Generating factory of the un-rebalanced coarse matrix Importer | string | null | | * | * | Generating factory of the importer used in rebalancing SubImporters | string | null | | * | * | ?? The * in the @c master.xml column denotes that the parameter is defined in the @c master.xml file.
The * in the @c validated column means that the parameter is declared in the list of valid input parameters (see @c GetValidParameters() ).
The * in the @c requested column states that the data is requested as input with all dependencies (see @c DeclareInput() ). ### Variables provided by this factory ### After \c Build() , the following data is available (if requested): Parameter | generated by | description ----------|--------------|------------ | A | RebalanceBlockAcFactory | Rebalanced coarse matrix */ template class RebalanceBlockAcFactory : public TwoLevelFactoryBase { #undef MUELU_REBALANCEBLOCKACFACTORY_SHORT #include "MueLu_UseShortNames.hpp" public: //! @name Input //@{ RCP GetValidParameterList() const; void DeclareInput(Level &fineLevel, Level &coarseLevel) const; //! Add a factory manager void AddFactoryManager(RCP FactManager); //@} //! @name Build methods. //@{ void Build(Level &fineLevel, Level &coarseLevel) const; //@} //@{ /*! @brief Add rebalancing factory in the end of list of rebalancing factories in RebalanceAcFactory. Rebalancing factories are derived from SingleLevelFactoryBase and rebalance the underlaying object (e.g. map, vector,...) to fit to the rebalanced maps. */ void AddRebalanceFactory(const RCP &factory); //! Returns number of transfer factories. size_t NumRebalanceFactories() const { return rebalanceFacts_.size(); } //@} private: //! list of user-defined rebalancing Factories std::vector > rebalanceFacts_; //! Input factories std::vector > FactManager_; }; // class RebalanceAcFactory } // namespace MueLu #define MUELU_REBALANCEBLOCKACFACTORY_SHORT #endif /* MUELU_REBALANCEBLOCKACFACTORY_DECL_HPP_ */