ASPECT
global.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2024 by the authors of the ASPECT code.
3 
4  This file is part of ASPECT.
5 
6  ASPECT is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2, or (at your option)
9  any later version.
10 
11  ASPECT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with ASPECT; see the file LICENSE. If not see
18  <http://www.gnu.org/licenses/>.
19 */
20 
21 
22 #ifndef _aspect_global_h
23 #define _aspect_global_h
24 
25 #include <aspect/config.h>
26 #include <aspect/citation_info.h>
27 
28 #include <deal.II/base/mpi.h>
29 #include <deal.II/base/exceptions.h>
30 
31 DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
32 
33 #include <boost/archive/binary_oarchive.hpp>
34 #include <boost/archive/binary_iarchive.hpp>
35 
36 DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
37 
38 #include <boost/container/small_vector.hpp>
39 
40 #include <deal.II/lac/trilinos_sparse_matrix.h>
41 #include <deal.II/lac/trilinos_block_sparse_matrix.h>
42 
43 #include <aspect/compat.h>
44 
45 namespace aspect
46 {
51  using namespace dealii;
52 
57  namespace constants
58  {
62  constexpr double year_in_seconds = 60*60*24*365.2425;
63 
67  constexpr double celsius_to_kelvin = 273.15;
68 
72  constexpr double degree_to_radians = ::numbers::PI / 180.;
73 
77  constexpr double radians_to_degree = 180. / ::numbers::PI;
78 
82  constexpr double gas_constant = 8.3144621;
86  constexpr double avogadro = 6.02214129e23;
94  constexpr double big_g = 6.67430e-11;
95 
99  namespace earth
100  {
101 
105  namespace masses
106  {
110  constexpr double planet = 5.9736e24;
114  constexpr double core = 1.932e24;
118  constexpr double mantle = 4.043e24;
119  }
120 
124  namespace iasp91_radii
125  {
129  constexpr double inner_core = 1.2171e6;
133  constexpr double core = 3.482e6;
137  constexpr double lower_mantle = 5.711e6;
141  constexpr double planet = 6.371e6;
142  }
143 
147  namespace prem_gravity
148  {
152  constexpr double icb = 4.4002;
156  constexpr double cmb = 10.6823;
160  constexpr double ulmb = 10.0143;
164  constexpr double surface = 9.8156;
165  }
166 
171  constexpr double surface_gravity = 9.80665;
172  }
173 
177  namespace mars
178  {
182  namespace radii
183  {
187  constexpr double planet = 3.3895e6;
191  constexpr double core = 1.794e6;
192  }
196  constexpr double surface_gravity = 3.711;
197  }
198  }
199 
204 
205 
211  using iarchive = boost::archive::binary_iarchive;
212 
218  using oarchive = boost::archive::binary_oarchive;
219 
231  class QuietException {};
232 
252  template <class T, unsigned int N = 100>
253  using small_vector = boost::container::small_vector<T, N>;
254 
259  namespace LinearAlgebra
260  {
265 
271 
276 
282  }
283 
289  template <class Stream>
290  void print_aspect_header(Stream &stream);
291 }
292 
293 
294 
295 #endif
constexpr double surface_gravity
Definition: global.h:196
constexpr double radians_to_degree
Definition: global.h:77
constexpr double year_in_seconds
Definition: global.h:62
constexpr double mantle
Definition: global.h:118
::TrilinosWrappers::MPI::BlockVector BlockVector
Definition: global.h:270
boost::archive::binary_iarchive iarchive
Definition: global.h:211
constexpr double gas_constant
Definition: global.h:82
::TrilinosWrappers::MPI::Vector Vector
Definition: global.h:264
::TrilinosWrappers::BlockSparseMatrix BlockSparseMatrix
Definition: global.h:281
constexpr double degree_to_radians
Definition: global.h:72
void print_aspect_header(Stream &stream)
constexpr double core
Definition: global.h:191
constexpr double celsius_to_kelvin
Definition: global.h:67
boost::archive::binary_oarchive oarchive
Definition: global.h:218
boost::container::small_vector< T, N > small_vector
Definition: global.h:253
::TrilinosWrappers::SparseMatrix SparseMatrix
Definition: global.h:275
constexpr double avogadro
Definition: global.h:86
constexpr double big_g
Definition: global.h:94
constexpr double planet
Definition: global.h:187