Reference documentation for deal.II version GIT 9042b9283b 2023-12-02 14:50:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
types.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2009 - 2023 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_types_h
17 #define dealii_types_h
18 
19 
20 #include <deal.II/base/config.h>
21 
22 #include <cstdint>
23 #include <type_traits> // make_signed_t
24 
25 
27 
32 namespace types
33 {
44  using subdomain_id = unsigned int;
45 
49  using global_vertex_index = std::uint64_t;
50 
55 #define DEAL_II_VERTEX_INDEX_MPI_TYPE MPI_UINT64_T
56 
60  using fe_index = unsigned short int;
61 
79 #ifdef DEAL_II_WITH_64BIT_INDICES
80  using global_dof_index = std::uint64_t;
81 #else
82  using global_dof_index = unsigned int;
83 #endif
84 
90 #ifdef DEAL_II_WITH_64BIT_INDICES
91  using signed_global_dof_index = long long;
92 #else
94 #endif
95 
100 #ifdef DEAL_II_WITH_64BIT_INDICES
101 # define DEAL_II_DOF_INDEX_MPI_TYPE MPI_UINT64_T
102 #else
103 # define DEAL_II_DOF_INDEX_MPI_TYPE MPI_UNSIGNED
104 #endif
105 
119 #ifdef DEAL_II_WITH_64BIT_INDICES
120  using global_cell_index = std::uint64_t;
121 #else
122  using global_cell_index = unsigned int;
123 #endif
124 
132 
145  using boundary_id = unsigned int;
146 
157  using manifold_id = unsigned int;
158 
168  using material_id = unsigned int;
169 
173  using geometric_entity_type = std::uint8_t;
174 } // namespace types
175 
180 
181 
182 namespace TrilinosWrappers
183 {
184  namespace types
185  {
189  using int64_type = long long int;
190 
191 #ifdef DEAL_II_WITH_64BIT_INDICES
195  using int_type = int64_type;
196 #else
200  using int_type = int;
201 #endif
202  } // namespace types
203 } // namespace TrilinosWrappers
204 
205 
206 // this part of the namespace numbers got moved to the bottom types.h file,
207 // because otherwise we get a circular inclusion of config.h, types.h, and
208 // numbers.h
209 namespace numbers
210 {
221  static const unsigned int invalid_unsigned_int =
222  static_cast<unsigned int>(-1);
223 
235  static_cast<types::global_dof_index>(-1);
236 
245 
254  static_cast<types::global_dof_index>(-1);
255 
267  static_cast<types::coarse_cell_id>(-1);
268 
279  static_cast<types::material_id>(-1);
280 
294  static_cast<types::boundary_id>(-1);
295 
314  static_cast<types::boundary_id>(-1);
315 
327  static_cast<types::manifold_id>(-1);
328 
343  static_cast<types::subdomain_id>(-1);
344 
364  static_cast<types::subdomain_id>(-2);
365 } // namespace numbers
366 
368 
369 #endif
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:477
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:478
long long int int64_type
Definition: types.h:189
const types::material_id invalid_material_id
Definition: types.h:278
const types::boundary_id invalid_boundary_id
Definition: types.h:293
const types::boundary_id internal_face_boundary_id
Definition: types.h:313
const types::coarse_cell_id invalid_coarse_cell_id
Definition: types.h:266
const types::fe_index invalid_fe_index
Definition: types.h:244
const types::subdomain_id artificial_subdomain_id
Definition: types.h:363
const types::subdomain_id invalid_subdomain_id
Definition: types.h:342
static const unsigned int invalid_unsigned_int
Definition: types.h:221
const types::manifold_id flat_manifold_id
Definition: types.h:326
const types::global_dof_index invalid_dof_index
Definition: types.h:253
const types::global_dof_index invalid_size_type
Definition: types.h:234
Definition: types.h:33
int signed_global_dof_index
Definition: types.h:93
unsigned int manifold_id
Definition: types.h:157
std::uint64_t global_vertex_index
Definition: types.h:49
std::uint8_t geometric_entity_type
Definition: types.h:173
unsigned int global_dof_index
Definition: types.h:82
global_cell_index coarse_cell_id
Definition: types.h:131
unsigned int subdomain_id
Definition: types.h:44
unsigned short int fe_index
Definition: types.h:60
unsigned int global_cell_index
Definition: types.h:122
unsigned int material_id
Definition: types.h:168
unsigned int boundary_id
Definition: types.h:145