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 #include <boost/container/small_vector.hpp>
39 
40 #include <aspect/compat.h>
41 
42 namespace aspect
43 {
48  namespace constants
49  {
53  constexpr double year_in_seconds = 60*60*24*365.2425;
54 
58  constexpr double celsius_to_kelvin = 273.15;
59 
63  constexpr double degree_to_radians = ::numbers::PI / 180.;
64 
68  constexpr double radians_to_degree = 180. / ::numbers::PI;
69 
73  constexpr double gas_constant = 8.3144621;
77  constexpr double avogadro = 6.02214129e23;
85  constexpr double big_g = 6.67430e-11;
86 
90  namespace earth
91  {
92 
96  namespace masses
97  {
101  constexpr double planet = 5.9736e24;
105  constexpr double core = 1.932e24;
109  constexpr double mantle = 4.043e24;
110  }
111 
115  namespace iasp91_radii
116  {
120  constexpr double inner_core = 1.2171e6;
124  constexpr double core = 3.482e6;
128  constexpr double lower_mantle = 5.711e6;
132  constexpr double planet = 6.371e6;
133  }
134 
138  namespace prem_gravity
139  {
143  constexpr double icb = 4.4002;
147  constexpr double cmb = 10.6823;
151  constexpr double ulmb = 10.0143;
155  constexpr double surface = 9.8156;
156  }
157 
162  constexpr double surface_gravity = 9.80665;
163  }
164 
168  namespace mars
169  {
173  namespace radii
174  {
178  constexpr double planet = 3.3895e6;
182  constexpr double core = 1.794e6;
183  }
187  constexpr double surface_gravity = 3.711;
188  }
189  }
190 
195 
196 
202  using iarchive = boost::archive::binary_iarchive;
203 
209  using oarchive = boost::archive::binary_oarchive;
210 
222  class QuietException {};
223 
243  template <class T, unsigned int N = 100>
244  using small_vector = boost::container::small_vector<T, N>;
245 
250  namespace LinearAlgebra
251  {
256 
262 
267 
273 
278 
284 
290 
296 
302 
306  using BlockDynamicSparsityPattern = ::TrilinosWrappers::BlockSparsityPattern;
307 
311  using DynamicSparsityPattern = ::TrilinosWrappers::SparsityPattern;
312  }
313 }
314 
315 
321 template <class Stream>
322 void print_aspect_header(Stream &stream);
323 
330 #define ASPECT_INSTANTIATE(INSTANTIATIONS) \
331  INSTANTIATIONS(2) \
332  INSTANTIATIONS(3)
333 
334 #endif
constexpr double radians_to_degree
Definition: global.h:68
constexpr double planet
Definition: global.h:101
constexpr double year_in_seconds
Definition: global.h:53
constexpr double surface_gravity
Definition: global.h:162
constexpr double mantle
Definition: global.h:109
::TrilinosWrappers::MPI::BlockVector BlockVector
Definition: global.h:261
void print_aspect_header(Stream &stream)
::TrilinosWrappers::PreconditionBase PreconditionBase
Definition: global.h:277
boost::archive::binary_iarchive iarchive
Definition: global.h:202
constexpr double gas_constant
Definition: global.h:73
::TrilinosWrappers::MPI::Vector Vector
Definition: global.h:255
::TrilinosWrappers::BlockSparseMatrix BlockSparseMatrix
Definition: global.h:272
::TrilinosWrappers::PreconditionAMG PreconditionAMG
Definition: global.h:283
::TrilinosWrappers::BlockSparsityPattern BlockDynamicSparsityPattern
Definition: global.h:306
::TrilinosWrappers::PreconditionIC PreconditionIC
Definition: global.h:289
constexpr double degree_to_radians
Definition: global.h:63
::TrilinosWrappers::SparsityPattern DynamicSparsityPattern
Definition: global.h:311
Definition: compat.h:59
constexpr double celsius_to_kelvin
Definition: global.h:58
::TrilinosWrappers::PreconditionJacobi PreconditionJacobi
Definition: global.h:301
boost::archive::binary_oarchive oarchive
Definition: global.h:209
boost::container::small_vector< T, N > small_vector
Definition: global.h:244
::TrilinosWrappers::SparseMatrix SparseMatrix
Definition: global.h:266
constexpr double avogadro
Definition: global.h:77
constexpr double big_g
Definition: global.h:85
::TrilinosWrappers::PreconditionILU PreconditionILU
Definition: global.h:295