Reference documentation for deal.II version Git e849c0d71e 2019-06-17 10:40:29 -0400
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
types.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2009 - 2018 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 <cstddef>
23 
24 
25 DEAL_II_NAMESPACE_OPEN
26 
31 namespace types
32 {
43  using subdomain_id = unsigned int;
44 
48  using global_vertex_index = unsigned long long int;
49 
54 #define DEAL_II_VERTEX_INDEX_MPI_TYPE MPI_UNSIGNED_LONG_LONG
55 
56 #ifdef DEAL_II_WITH_64BIT_INDICES
57 
70  // TODO: we should check that unsigned long long int
71  // has the same size as uint64_t
72  using global_dof_index = unsigned long long int;
73 
78 # define DEAL_II_DOF_INDEX_MPI_TYPE MPI_UNSIGNED_LONG_LONG
79 #else
80 
89  using global_dof_index = unsigned int;
90 
95 # define DEAL_II_DOF_INDEX_MPI_TYPE MPI_UNSIGNED
96 #endif
97 
111  using boundary_id = unsigned int;
112 
123  using manifold_id = unsigned int;
124 
134  using material_id = unsigned int;
135 } // namespace types
136 
140 using TrilinosScalar = double;
141 
142 
144 {
145  namespace types
146  {
147 #ifdef DEAL_II_WITH_64BIT_INDICES
148 
151  using int_type = long long;
152 #else
153 
156  using int_type = int;
157 #endif
158  } // namespace types
159 } // namespace TrilinosWrappers
160 
161 
162 // this part of the namespace numbers got moved to the bottom types.h file,
163 // because otherwise we get a circular inclusion of config.h, types.h, and
164 // numbers.h
165 namespace numbers
166 {
173  static const unsigned int invalid_unsigned_int =
174  static_cast<unsigned int>(-1);
175 
183  static_cast<types::global_dof_index>(-1);
184 
189  static_cast<types::global_dof_index>(-1);
190 
197  static_cast<types::material_id>(-1);
198 
208  static_cast<types::boundary_id>(-1);
209 
224  static_cast<types::boundary_id>(-1);
225 
236  DEAL_II_DEPRECATED
238  static_cast<types::manifold_id>(-1);
239 
247  static_cast<types::manifold_id>(-1);
248 
259  static_cast<types::subdomain_id>(-1);
260 
276  static_cast<types::subdomain_id>(-2);
277 } // namespace numbers
278 
279 DEAL_II_NAMESPACE_CLOSE
280 
281 #endif
const types::global_dof_index invalid_size_type
Definition: types.h:182
const types::manifold_id flat_manifold_id
Definition: types.h:246
static const unsigned int invalid_unsigned_int
Definition: types.h:173
unsigned int manifold_id
Definition: types.h:123
const types::subdomain_id invalid_subdomain_id
Definition: types.h:258
unsigned int material_id
Definition: types.h:134
unsigned int subdomain_id
Definition: types.h:43
Definition: types.h:31
const types::boundary_id invalid_boundary_id
Definition: types.h:207
unsigned int global_dof_index
Definition: types.h:89
const types::subdomain_id artificial_subdomain_id
Definition: types.h:275
const types::manifold_id invalid_manifold_id
Definition: types.h:237
const types::boundary_id internal_face_boundary_id
Definition: types.h:223
unsigned long long int global_vertex_index
Definition: types.h:48
const types::global_dof_index invalid_dof_index
Definition: types.h:188
const types::material_id invalid_material_id
Definition: types.h:196
unsigned int boundary_id
Definition: types.h:111