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 
30 DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
31 
32 #include <deal.II/lac/generic_linear_algebra.h>
33 
34 #include <boost/archive/binary_oarchive.hpp>
35 #include <boost/archive/binary_iarchive.hpp>
36 
37 DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
38 
39 #include <boost/container/small_vector.hpp>
40 
41 #include <aspect/compat.h>
42 
43 namespace aspect
44 {
49  namespace constants
50  {
54  constexpr double year_in_seconds = 60*60*24*365.2425;
55 
59  constexpr double celsius_to_kelvin = 273.15;
60 
64  constexpr double degree_to_radians = ::numbers::PI / 180.;
65 
69  constexpr double radians_to_degree = 180. / ::numbers::PI;
70 
74  constexpr double gas_constant = 8.3144621;
78  constexpr double avogadro = 6.02214129e23;
86  constexpr double big_g = 6.67430e-11;
87 
91  namespace earth
92  {
93 
97  namespace masses
98  {
102  constexpr double planet = 5.9736e24;
106  constexpr double core = 1.932e24;
110  constexpr double mantle = 4.043e24;
111  }
112 
116  namespace iasp91_radii
117  {
121  constexpr double inner_core = 1.2171e6;
125  constexpr double core = 3.482e6;
129  constexpr double lower_mantle = 5.711e6;
133  constexpr double planet = 6.371e6;
134  }
135 
139  namespace prem_gravity
140  {
144  constexpr double icb = 4.4002;
148  constexpr double cmb = 10.6823;
152  constexpr double ulmb = 10.0143;
156  constexpr double surface = 9.8156;
157  }
158 
163  constexpr double surface_gravity = 9.80665;
164  }
165 
169  namespace mars
170  {
174  namespace radii
175  {
179  constexpr double planet = 3.3895e6;
183  constexpr double core = 1.794e6;
184  }
188  constexpr double surface_gravity = 3.711;
189  }
190  }
191 
196 
197 
203  using iarchive = boost::archive::binary_iarchive;
204 
210  using oarchive = boost::archive::binary_oarchive;
211 
223  class QuietException {};
224 
244  template <class T, unsigned int N = 100>
245  using small_vector = boost::container::small_vector<T, N>;
246 
251  namespace LinearAlgebra
252  {
257 
263 
268 
274 
279 
285 
291 
297 
303 
307  using BlockDynamicSparsityPattern = ::TrilinosWrappers::BlockSparsityPattern;
308 
312  using DynamicSparsityPattern = ::TrilinosWrappers::SparsityPattern;
313  }
314 }
315 
316 
322 template <class Stream>
323 void print_aspect_header(Stream &stream);
324 
331 #define ASPECT_INSTANTIATE(INSTANTIATIONS) \
332  INSTANTIATIONS(2) \
333  INSTANTIATIONS(3)
334 
335 #endif
constexpr double radians_to_degree
Definition: global.h:69
constexpr double planet
Definition: global.h:102
constexpr double year_in_seconds
Definition: global.h:54
constexpr double surface_gravity
Definition: global.h:163
constexpr double mantle
Definition: global.h:110
::TrilinosWrappers::MPI::BlockVector BlockVector
Definition: global.h:262
void print_aspect_header(Stream &stream)
::TrilinosWrappers::PreconditionBase PreconditionBase
Definition: global.h:278
boost::archive::binary_iarchive iarchive
Definition: global.h:203
constexpr double gas_constant
Definition: global.h:74
::TrilinosWrappers::MPI::Vector Vector
Definition: global.h:256
::TrilinosWrappers::BlockSparseMatrix BlockSparseMatrix
Definition: global.h:273
::TrilinosWrappers::PreconditionAMG PreconditionAMG
Definition: global.h:284
::TrilinosWrappers::BlockSparsityPattern BlockDynamicSparsityPattern
Definition: global.h:307
::TrilinosWrappers::PreconditionIC PreconditionIC
Definition: global.h:290
constexpr double degree_to_radians
Definition: global.h:64
::TrilinosWrappers::SparsityPattern DynamicSparsityPattern
Definition: global.h:312
Definition: compat.h:59
constexpr double celsius_to_kelvin
Definition: global.h:59
::TrilinosWrappers::PreconditionJacobi PreconditionJacobi
Definition: global.h:302
boost::archive::binary_oarchive oarchive
Definition: global.h:210
boost::container::small_vector< T, N > small_vector
Definition: global.h:245
::TrilinosWrappers::SparseMatrix SparseMatrix
Definition: global.h:267
constexpr double avogadro
Definition: global.h:78
constexpr double big_g
Definition: global.h:86
::TrilinosWrappers::PreconditionILU PreconditionILU
Definition: global.h:296