v0.13.1
TagMultiIndices.hpp
Go to the documentation of this file.
1/** \file TagMultiIndices.hpp
2 * \brief Tags for Multi-index containers
3 */
4
5/* MoFEM is free software: you can redistribute it and/or modify it under
6 * the terms of the GNU Lesser General Public License as published by the
7 * Free Software Foundation, either version 3 of the License, or (at your
8 * option) any later version.
9 *
10 * MoFEM is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13 * License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
17 */
18
19#ifndef __TAGMULTIINDICES_HPP__
20#define __TAGMULTIINDICES_HPP__
21
22namespace MoFEM {
23
24/// MultiIndex Tag for field id
29
31struct Unique_mi_tag {};
34struct Ent_mi_tag {};
35struct FEEnt_mi_tag {};
42struct Space_mi_tag {};
43
44struct Idx_mi_tag {
45 static const bool IamNotPartitioned;
46 /// extract dof index from iterator
47 template <class IT> static inline DofIdx get_index(const IT &it) {
48 return (*it)->getDofIdx();
49 }
50};
52 static const bool IamNotPartitioned;
53 /// extract global dof index from iterator
54 template <class IT> static inline DofIdx get_index(const IT &it) {
55 return (*it)->getPetscGlobalDofIdx();
56 }
57};
59 static const bool IamNotPartitioned;
60 /// extract global dof index from iterator
61 template <class IT> static inline DofIdx get_index(const IT &it) {
62 return (*it)->getPetscLocalDofIdx();
63 }
64};
65
66struct Part_mi_tag {};
67
70
75
76/// MultiIndex Tag for field order
77struct Order_mi_tag {};
78
79/// MultiIndex Tag for field name
84
86struct Proc_mi_tag {};
87
103
109
110} // namespace MoFEM
111
112#endif // __TAGMULTIINDICES_HPP__
int DofIdx
Index of DOF.
Definition: Types.hpp:29
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:21
MultiIndex Tag for field id.
MultiIndex Tag for field name.
static DofIdx get_index(const IT &it)
extract dof index from iterator
static const bool IamNotPartitioned
MultiIndex Tag for field order.
static const bool IamNotPartitioned
static DofIdx get_index(const IT &it)
extract global dof index from iterator
static const bool IamNotPartitioned
static DofIdx get_index(const IT &it)
extract global dof index from iterator