// @HEADER // ***************************************************************************** // MueLu: A package for multigrid based preconditioning // // Copyright 2012 NTESS and the MueLu contributors. // SPDX-License-Identifier: BSD-3-Clause // ***************************************************************************** // @HEADER #ifndef MUELU_TENTATIVEPFACTORY_DECL_HPP #define MUELU_TENTATIVEPFACTORY_DECL_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include "MueLu_ConfigDefs.hpp" #include "MueLu_TentativePFactory_fwd.hpp" #include "MueLu_Aggregates_fwd.hpp" #include "MueLu_AmalgamationFactory_fwd.hpp" #include "MueLu_AmalgamationInfo_fwd.hpp" #include "MueLu_CoarseMapFactory_fwd.hpp" #include "MueLu_Level_fwd.hpp" #include "MueLu_PerfUtils_fwd.hpp" #include "MueLu_PFactory.hpp" #include "MueLu_Utilities_fwd.hpp" namespace MueLu { /*! @class TentativePFactory class. @brief Factory for building tentative prolongator. Factory for creating tentative prolongator. Nullspace vectors are split across aggregates so that they have local support. The vectors with local support are factored via LAPACK QR. The Q becomes the tentative prolongator, and the R becomes the coarse nullspace. Note that the TentativePFactory also creates the coarse null space vectors, that is, it serves as generating factory for the Nullspace vectors on the coarse levels. To feed in the near null space vectors on the finest level one has to use the NullspaceFactory. @ingroup MueLuTransferClasses ## Input/output of TentativePFactory ## ### User parameters of TentativePFactory ### Parameter | type | default | master.xml | validated | requested | description ----------|------|---------|:----------:|:---------:|:---------:|------------ A | Factory | null | | * | * | Generating factory of the matrix A Aggregates | Factory | null | | * | * | Generating factory of the aggregates (of type "Aggregates" produced, e.g., by the UncoupledAggregationFactory) Nullspace | Factory | null | | * | * | Generating factory of the fine nullspace vectors (of type "MultiVector"). In the default case the same instance of the TentativePFactory is also the generating factory for the null space vectors (on the next coarser levels). Therefore, it is recommended to declare the TentativePFactory to be the generating factory of the "Nullspace" variable globally using the FactoryManager object! For defining the near null space vectors on the finest level one should use the NullspaceFactory. UnAmalgamationInfo | Factory | null | | * | * | Generating factory of UnAmalgamationInfo. This data (of type "AmalgamationInfo") is produced by the AmalgamationFactory class. The default option should be fine for most standard cases though. CoarseMap | Factory | null | | * | * | Generating factory of the coarse map. The map generates the coarse domain map of the prolongation operator. The default choice should be fine as long as you do not wish some offset in the domain map (e.g. for block operators in multiphysics problems). The data is generated by the CoarseMapFactory. 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 TentativePFactory::GetValidParameters).
The * in the @c requested column states that the data is requested as input with all dependencies (see TentativePFactory::DeclareInput). ### Variables provided by TentativePFactory ### After TentativePFactory::Build the following data is available (if requested) Parameter | generated by | description ----------|--------------|------------ | P | TentativePFactory | Non-smoothed "tentative" prolongation operator (with piece-wise constant transfer operator basis functions) | Nullspace | TentativePFactory | Coarse near null space vectors. Please also check the documentation of the NullspaceFactory for the special dependency tree of the "Nullspace" variable throughout all multigrid levels. */ template class TentativePFactory : public PFactory { #undef MUELU_TENTATIVEPFACTORY_SHORT #include "MueLu_UseShortNames.hpp" public: //! @name Constructors/Destructors. //@{ //! Constructor TentativePFactory() {} //! Destructor. virtual ~TentativePFactory() {} //@} RCP GetValidParameterList() const; //! Input //@{ void DeclareInput(Level& fineLevel, Level& coarseLevel) const; //@} //! @name Build methods. //@{ void Build(Level& fineLevel, Level& coarseLevel) const; void BuildP(Level& fineLevel, Level& coarseLevel) const; //@} private: void BuildPuncoupled(RCP A, RCP aggregates, RCP amalgInfo, RCP fineNullspace, RCP coarseMap, RCP& Ptentative, RCP& coarseNullspace, const int levelID) const; void BuildPcoupled(RCP A, RCP aggregates, RCP amalgInfo, RCP fineNullspace, RCP coarseMap, RCP& Ptentative, RCP& coarseNullspace) const; void BuildPuncoupledBlockCrs(RCP A, RCP aggregates, RCP amalgInfo, RCP fineNullspace, RCP coarseMap, RCP& Ptentative, RCP& coarseNullspace, const int levelID) const; mutable bool bTransferCoordinates_ = false; }; // class TentativePFactory } // namespace MueLu // TODO: noQR_ #define MUELU_TENTATIVEPFACTORY_SHORT #endif // MUELU_TENTATIVEPFACTORY_DECL_HPP