ASPECT
global.h
Go to the documentation of this file.
1 // ------------------------------------------------------
2 //
3 // SPDX-License-Identifier: GPL-2.0-or-later
4 //
5 // SPDX-FileCopyrightText: Copyright (C) 2011-2026 by the ASPECT authors.
6 //
7 // This file is part of ASPECT.
8 //
9 // Detailed license information governing the source code and
10 // contributions can be found in the folder LICENSES and in
11 // LICENSE and CONTRIBUTING.md at the top level directory.
12 //
13 // ------------------------------------------------------
14 
15 
16 #ifndef _aspect_global_h
17 #define _aspect_global_h
18 
19 #include <aspect/config.h>
20 #include <aspect/citation_info.h>
21 
22 #include <deal.II/base/mpi.h>
24 
26 
27 #include <boost/archive/binary_oarchive.hpp>
28 #include <boost/archive/binary_iarchive.hpp>
29 
31 
32 #include <boost/container/small_vector.hpp>
33 
34 #ifdef ASPECT_USE_TPETRA
39 #else
42 #endif
43 
44 
45 #include <aspect/compat.h>
46 
47 namespace aspect
48 {
53  using namespace dealii;
54 
59  namespace constants
60  {
64  constexpr double year_in_seconds = 60*60*24*365.2425;
65 
69  constexpr double celsius_to_kelvin = 273.15;
70 
74  constexpr double degree_to_radians = ::numbers::PI / 180.;
75 
79  constexpr double radians_to_degree = 180. / ::numbers::PI;
80 
84  constexpr double gas_constant = 8.3144621;
88  constexpr double avogadro = 6.02214129e23;
96  constexpr double big_g = 6.67430e-11;
97 
101  namespace earth
102  {
103 
107  namespace masses
108  {
112  constexpr double planet = 5.9736e24;
116  constexpr double core = 1.932e24;
120  constexpr double mantle = 4.043e24;
121  }
122 
126  namespace iasp91_radii
127  {
131  constexpr double inner_core = 1.2171e6;
135  constexpr double core = 3.482e6;
139  constexpr double lower_mantle = 5.711e6;
143  constexpr double planet = 6.371e6;
144  }
145 
149  namespace prem_gravity
150  {
154  constexpr double icb = 4.4002;
158  constexpr double cmb = 10.6823;
162  constexpr double ulmb = 10.0143;
166  constexpr double surface = 9.8156;
167  }
168 
173  constexpr double surface_gravity = 9.80665;
174  }
175 
179  namespace mars
180  {
184  namespace radii
185  {
189  constexpr double planet = 3.3895e6;
193  constexpr double core = 1.794e6;
194  }
198  constexpr double surface_gravity = 3.711;
199  }
200  }
201 
206 
207 
213  using iarchive = boost::archive::binary_iarchive;
214 
220  using oarchive = boost::archive::binary_oarchive;
221 
233  class QuietException {};
234 
254  template <class T, unsigned int N = 100>
255  using small_vector = boost::container::small_vector<T, N>;
256 
261  namespace LinearAlgebra
262  {
263 #ifdef ASPECT_USE_TPETRA
264 
268 
274 
279 
285 #else
286 
290 
296 
301 
307 #endif
308  }
309 
315  template <class Stream>
316  void print_aspect_header(Stream &stream);
317 }
318 
319 
320 
321 #endif
constexpr double surface_gravity
Definition: global.h:198
constexpr double radians_to_degree
Definition: global.h:79
constexpr double year_in_seconds
Definition: global.h:64
constexpr double mantle
Definition: global.h:120
::TrilinosWrappers::MPI::BlockVector BlockVector
Definition: global.h:295
boost::archive::binary_iarchive iarchive
Definition: global.h:213
constexpr double gas_constant
Definition: global.h:84
::TrilinosWrappers::MPI::Vector Vector
Definition: global.h:289
#define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
::TrilinosWrappers::BlockSparseMatrix BlockSparseMatrix
Definition: global.h:306
constexpr double degree_to_radians
Definition: global.h:74
void print_aspect_header(Stream &stream)
constexpr double core
Definition: global.h:193
constexpr double celsius_to_kelvin
Definition: global.h:69
boost::archive::binary_oarchive oarchive
Definition: global.h:220
#define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
boost::container::small_vector< T, N > small_vector
Definition: global.h:255
::TrilinosWrappers::SparseMatrix SparseMatrix
Definition: global.h:300
constexpr double avogadro
Definition: global.h:88
constexpr double big_g
Definition: global.h:96
constexpr double planet
Definition: global.h:189