ASPECT
global.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2023 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 
27 #include <deal.II/base/mpi.h>
28 
29 DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
30 
31 #include <deal.II/lac/generic_linear_algebra.h>
32 
33 #include <boost/archive/binary_oarchive.hpp>
34 #include <boost/archive/binary_iarchive.hpp>
35 
36 DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
37 
38 
39 #include <aspect/compat.h>
40 
41 namespace aspect
42 {
47  namespace constants
48  {
52  constexpr double year_in_seconds = 60*60*24*365.2425;
53 
57  constexpr double celsius_to_kelvin = 273.15;
58 
62  constexpr double degree_to_radians = ::numbers::PI / 180.;
63 
67  constexpr double radians_to_degree = 180. / ::numbers::PI;
68 
72  constexpr double gas_constant = 8.3144621;
76  constexpr double avogadro = 6.02214129e23;
84  constexpr double big_g = 6.67430e-11;
85 
89  namespace earth
90  {
91 
95  namespace masses
96  {
100  constexpr double planet = 5.9736e24;
104  constexpr double core = 1.932e24;
108  constexpr double mantle = 4.043e24;
109  }
110 
114  namespace iasp91_radii
115  {
119  constexpr double inner_core = 1.2171e6;
123  constexpr double core = 3.482e6;
127  constexpr double lower_mantle = 5.711e6;
131  constexpr double planet = 6.371e6;
132  }
133 
137  namespace prem_gravity
138  {
142  constexpr double icb = 4.4002;
146  constexpr double cmb = 10.6823;
150  constexpr double ulmb = 10.0143;
154  constexpr double surface = 9.8156;
155  }
156 
161  constexpr double surface_gravity = 9.80665;
162  }
163 
167  namespace mars
168  {
172  namespace radii
173  {
177  constexpr double planet = 3.3895e6;
181  constexpr double core = 1.794e6;
182  }
186  constexpr double surface_gravity = 3.711;
187  }
188  }
189 
194 
195 
201  using iarchive = boost::archive::binary_iarchive;
202 
208  using oarchive = boost::archive::binary_oarchive;
209 
221  class QuietException {};
222 
223 
228  namespace LinearAlgebra
229  {
234 
240 
245 
251 
256 
262 
268 
274 
280 
284  using BlockDynamicSparsityPattern = ::TrilinosWrappers::BlockSparsityPattern;
285 
289  using DynamicSparsityPattern = ::TrilinosWrappers::SparsityPattern;
290  }
291 }
292 
293 
299 template <class Stream>
300 void print_aspect_header(Stream &stream);
301 
308 #define ASPECT_INSTANTIATE(INSTANTIATIONS) \
309  INSTANTIATIONS(2) \
310  INSTANTIATIONS(3)
311 
312 #endif
constexpr double radians_to_degree
Definition: global.h:67
constexpr double planet
Definition: global.h:100
constexpr double year_in_seconds
Definition: global.h:52
constexpr double surface_gravity
Definition: global.h:161
constexpr double mantle
Definition: global.h:108
::TrilinosWrappers::MPI::BlockVector BlockVector
Definition: global.h:239
void print_aspect_header(Stream &stream)
::TrilinosWrappers::PreconditionBase PreconditionBase
Definition: global.h:255
boost::archive::binary_iarchive iarchive
Definition: global.h:201
constexpr double gas_constant
Definition: global.h:72
::TrilinosWrappers::MPI::Vector Vector
Definition: global.h:233
::TrilinosWrappers::BlockSparseMatrix BlockSparseMatrix
Definition: global.h:250
::TrilinosWrappers::PreconditionAMG PreconditionAMG
Definition: global.h:261
::TrilinosWrappers::BlockSparsityPattern BlockDynamicSparsityPattern
Definition: global.h:284
::TrilinosWrappers::PreconditionIC PreconditionIC
Definition: global.h:267
constexpr double degree_to_radians
Definition: global.h:62
::TrilinosWrappers::SparsityPattern DynamicSparsityPattern
Definition: global.h:289
constexpr double celsius_to_kelvin
Definition: global.h:57
::TrilinosWrappers::PreconditionJacobi PreconditionJacobi
Definition: global.h:279
boost::archive::binary_oarchive oarchive
Definition: global.h:208
::TrilinosWrappers::SparseMatrix SparseMatrix
Definition: global.h:244
constexpr double avogadro
Definition: global.h:76
constexpr double big_g
Definition: global.h:84
::TrilinosWrappers::PreconditionILU PreconditionILU
Definition: global.h:273