ASPECT
global.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2021 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 gas_constant = 8.3144621;
66  constexpr double avogadro = 6.02214129e23;
74  constexpr double big_g = 6.67430e-11;
75 
79  namespace earth
80  {
81 
85  namespace masses
86  {
90  constexpr double planet = 5.9736e24;
94  constexpr double core = 1.932e24;
98  constexpr double mantle = 4.043e24;
99  }
100 
104  namespace iasp91_radii
105  {
109  constexpr double inner_core = 1.2171e6;
113  constexpr double core = 3.482e6;
117  constexpr double lower_mantle = 5.711e6;
121  constexpr double planet = 6.371e6;
122  }
123 
127  namespace prem_gravity
128  {
132  constexpr double icb = 4.4002;
136  constexpr double cmb = 10.6823;
140  constexpr double ulmb = 10.0143;
144  constexpr double surface = 9.8156;
145  }
146 
151  constexpr double surface_gravity = 9.80665;
152  }
153 
157  namespace mars
158  {
162  namespace radii
163  {
167  constexpr double planet = 3.3895e6;
171  constexpr double core = 1.794e6;
172  }
176  constexpr double surface_gravity = 3.711;
177  }
178  }
179 
184 
185 
191  using iarchive = boost::archive::binary_iarchive;
192 
198  using oarchive = boost::archive::binary_oarchive;
199 
211  class QuietException {};
212 
213 
218  namespace LinearAlgebra
219  {
224 
230 
235 
241 
246 
252 
258 
264 
270 
274  using BlockDynamicSparsityPattern = ::TrilinosWrappers::BlockSparsityPattern;
275 
279  using DynamicSparsityPattern = ::TrilinosWrappers::SparsityPattern;
280  }
281 }
282 
283 
289 template <class Stream>
290 void print_aspect_header(Stream &stream);
291 
298 #define ASPECT_INSTANTIATE(INSTANTIATIONS) \
299  INSTANTIATIONS(2) \
300  INSTANTIATIONS(3)
301 
302 #endif
constexpr double planet
Definition: global.h:90
constexpr double year_in_seconds
Definition: global.h:52
constexpr double surface_gravity
Definition: global.h:151
constexpr double mantle
Definition: global.h:98
::TrilinosWrappers::MPI::BlockVector BlockVector
Definition: global.h:229
void print_aspect_header(Stream &stream)
::TrilinosWrappers::PreconditionBase PreconditionBase
Definition: global.h:245
boost::archive::binary_iarchive iarchive
Definition: global.h:191
constexpr double gas_constant
Definition: global.h:62
::TrilinosWrappers::MPI::Vector Vector
Definition: global.h:223
constexpr double core
Definition: global.h:94
::TrilinosWrappers::BlockSparseMatrix BlockSparseMatrix
Definition: global.h:240
::TrilinosWrappers::PreconditionAMG PreconditionAMG
Definition: global.h:251
::TrilinosWrappers::BlockSparsityPattern BlockDynamicSparsityPattern
Definition: global.h:274
::TrilinosWrappers::PreconditionIC PreconditionIC
Definition: global.h:257
::TrilinosWrappers::SparsityPattern DynamicSparsityPattern
Definition: global.h:279
constexpr double celsius_to_kelvin
Definition: global.h:57
::TrilinosWrappers::PreconditionJacobi PreconditionJacobi
Definition: global.h:269
boost::archive::binary_oarchive oarchive
Definition: global.h:198
::TrilinosWrappers::SparseMatrix SparseMatrix
Definition: global.h:234
constexpr double avogadro
Definition: global.h:66
constexpr double big_g
Definition: global.h:74
::TrilinosWrappers::PreconditionILU PreconditionILU
Definition: global.h:263