Debian Codegraph @

packages/muelu/src/Transfers/BlockedTransfers/MueLu_BlockedCoarseMapFactory_decl.hpp

raw
1 // @HEADER
2 // *****************************************************************************
3 // MueLu: A package for multigrid based preconditioning
4 //
5 // Copyright 2012 NTESS and the MueLu contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9
10 #ifndef MUELU_BLOCKEDCOARSEMAPFACTORY_DECL_HPP_
11 #define MUELU_BLOCKEDCOARSEMAPFACTORY_DECL_HPP_
12
13 #include "MueLu_ConfigDefs.hpp"
14 #include "MueLu_CoarseMapFactory.hpp"
15
16 #include "MueLu_Level_fwd.hpp"
17 #include "MueLu_Aggregates_fwd.hpp"
18 #include "MueLu_Exceptions.hpp"
19
20 namespace MueLu {
21
22 /*!
23 @class BlockedCoarseMapFactory class.
24 @brief Factory for generating coarse level map. Used by BlockedPFactory.
25
26 Overloads @c CoarseMapFactory. Uses a @c "CoarseMap" generated by another @c CoarseMapFactory as input
27 and automatically calculates the domain offset using the max GID from the given coarse map.
28
29 @ingroup MueLuTransferClasses
30
31 ## Input/output ##
32
33 ### User parameters for this factory ###
34 Parameter | type | default | master.xml | validated | requested | description
35 ----------|------|---------|:----------:|:---------:|:---------:|------------
36 Aggregates | Factory | null | | * | * | Generating factory for aggregates. We basically need only the number of aggregates in this factory.
37 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.
38 Striding info | std::string | {} | | * | | String containing the striding information, e.g. {2,1} for a fixed block size of 3 with sub blocks of size 2 and 1 in each node.
39 Strided block id | LocalOrdinal | -1 | | * | | Strided block id in strided information vector or -1 (=default) for the full block information.
40 Coarse Map | Factory | null | | * | | Generating factory of another coarse map to be used for calculating the GID offset for the map to be generated.
41
42 The * in the @c master.xml column denotes that the parameter is defined in the @c master.xml file.<br>
43 The * in the @c validated column means that the parameter is declared in the list of valid input parameters (see @c GetValidParameters() ).<br>
44 The * in the @c requested column states that the data is requested as input with all dependencies (see @c DeclareInput() ).
45
46 ### Variables provided by this factory ###
47
48 After @c Build(), the following data is available (if requested)
49
50 Parameter | generated by | description
51 ----------|--------------|------------
52 | CoarseMap | BlockedCoarseMapFactory | Map containing the coarse map used as domain map in the tentative prolongation operator
53 */
54
55 template <class Scalar = DefaultScalar,
56 class LocalOrdinal = DefaultLocalOrdinal,
57 class GlobalOrdinal = DefaultGlobalOrdinal,
58 class Node = DefaultNode>
59 class BlockedCoarseMapFactory : public MueLu::CoarseMapFactory<Scalar, LocalOrdinal, GlobalOrdinal, Node> { // SingleLevelFactoryBase {
60 #undef MUELU_BLOCKEDCOARSEMAPFACTORY_SHORT
61 #include "MueLu_UseShortNames.hpp"
62
63 public:
64 //! @name Input
65 //@{
66
67 RCP<const ParameterList> GetValidParameterList() const final;
68
69 /*! @brief Specifies the data that this class needs, and the factories that generate that data.
70
71 If the Build method of this class requires some data, but the generating factory is not specified in DeclareInput, then this class
72 will fall back to the settings in FactoryManager.
73 */
74 void DeclareInput(Level &currentLevel) const final;
75
76 //@}
77
78 //! @name Build methods.
79 //@{
80
81 //! Build an object with this factory.
82 void Build(Level &currentLevel) const final;
83
84 //@}
85
86 protected:
87 //! Compute domain GID offset from another CoarseMap
88 virtual GlobalOrdinal GetDomainGIDOffset(Level &currentLevel) const final;
89
90 }; // class BlockedCoarseMapFactory
91
92 } // namespace MueLu
93
94 #define MUELU_BLOCKEDCOARSEMAPFACTORY_SHORT
95 #endif /* MUELU_BLOCKEDCOARSEMAPFACTORY_DECL_HPP_ */