Reference documentation for deal.II version Git 3b2434bd97 2019-12-10 23:09:16 -0500
\(\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 
98 #ifdef DEAL_II_WITH_64BIT_INDICES
99 
103  using coarse_cell_id = unsigned long long int;
104 #else
105 
109  using coarse_cell_id = unsigned int;
110 #endif
111 
125  using boundary_id = unsigned int;
126 
137  using manifold_id = unsigned int;
138 
148  using material_id = unsigned int;
149 } // namespace types
150 
154 using TrilinosScalar = double;
155 
156 
158 {
159  namespace types
160  {
161 #ifdef DEAL_II_WITH_64BIT_INDICES
162 
165  using int_type = long long;
166 #else
167 
170  using int_type = int;
171 #endif
172  } // namespace types
173 } // namespace TrilinosWrappers
174 
175 
176 // this part of the namespace numbers got moved to the bottom types.h file,
177 // because otherwise we get a circular inclusion of config.h, types.h, and
178 // numbers.h
179 namespace numbers
180 {
187  static const unsigned int invalid_unsigned_int =
188  static_cast<unsigned int>(-1);
189 
197  static_cast<types::global_dof_index>(-1);
198 
203  static_cast<types::global_dof_index>(-1);
204 
210  static_cast<types::coarse_cell_id>(-1);
211 
218  static_cast<types::material_id>(-1);
219 
229  static_cast<types::boundary_id>(-1);
230 
245  static_cast<types::boundary_id>(-1);
246 
257  DEAL_II_DEPRECATED
259  static_cast<types::manifold_id>(-1);
260 
268  static_cast<types::manifold_id>(-1);
269 
280  static_cast<types::subdomain_id>(-1);
281 
297  static_cast<types::subdomain_id>(-2);
298 } // namespace numbers
299 
300 DEAL_II_NAMESPACE_CLOSE
301 
302 #endif
const types::global_dof_index invalid_size_type
Definition: types.h:196
const types::manifold_id flat_manifold_id
Definition: types.h:267
static const unsigned int invalid_unsigned_int
Definition: types.h:187
unsigned int manifold_id
Definition: types.h:137
const types::coarse_cell_id invalid_coarse_cell_id
Definition: types.h:209
const types::subdomain_id invalid_subdomain_id
Definition: types.h:279
unsigned int material_id
Definition: types.h:148
unsigned int coarse_cell_id
Definition: types.h:109
unsigned int subdomain_id
Definition: types.h:43
Definition: types.h:31
const types::boundary_id invalid_boundary_id
Definition: types.h:228
unsigned int global_dof_index
Definition: types.h:89
const types::subdomain_id artificial_subdomain_id
Definition: types.h:296
const types::manifold_id invalid_manifold_id
Definition: types.h:258
const types::boundary_id internal_face_boundary_id
Definition: types.h:244
unsigned long long int global_vertex_index
Definition: types.h:48
const types::global_dof_index invalid_dof_index
Definition: types.h:202
const types::material_id invalid_material_id
Definition: types.h:217
unsigned int boundary_id
Definition: types.h:125