ASPECT
global.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2018 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 <deal.II/base/mpi.h>
26 
27 DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
28 
29 #ifdef ASPECT_USE_PETSC
30 # include <deal.II/lac/petsc_parallel_block_vector.h>
31 # include <deal.II/lac/petsc_parallel_block_sparse_matrix.h>
32 # include <deal.II/lac/petsc_precondition.h>
33 #else
34 # include <deal.II/lac/trilinos_parallel_block_vector.h>
35 # include <deal.II/lac/trilinos_block_sparse_matrix.h>
36 # include <deal.II/lac/trilinos_precondition.h>
37 #endif
38 
39 #include <deal.II/lac/generic_linear_algebra.h>
40 
41 #include <boost/archive/binary_oarchive.hpp>
42 #include <boost/archive/binary_iarchive.hpp>
43 
44 DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
45 
46 
47 #include <aspect/compat.h>
48 
49 namespace aspect
50 {
55  namespace constants
56  {
60  extern const double year_in_seconds;
61 
65  extern const double celsius_to_kelvin;
66 
70  extern const double gas_constant;
74  extern const double avogadro;
78  extern const double big_g;
79 
83  namespace earth
84  {
85 
89  namespace masses
90  {
94  extern const double planet;
98  extern const double core;
102  extern const double mantle;
103  }
104 
108  namespace iasp91_radii
109  {
113  extern const double inner_core;
117  extern const double core;
121  extern const double lower_mantle;
125  extern const double planet;
126  }
127 
131  namespace prem_gravity
132  {
136  extern const double icb;
140  extern const double cmb;
144  extern const double ulmb;
148  extern const double surface;
149  }
150 
155  extern const double surface_gravity;
156  }
157 
161  namespace mars
162  {
163 
167  namespace radii
168  {
172  extern const double planet;
176  extern const double core;
177  }
181  extern const double surface_gravity;
182  }
183  }
184 
189 
190 
196  typedef boost::archive::binary_iarchive iarchive;
197 
203  typedef boost::archive::binary_oarchive oarchive;
204 
216  class QuietException {};
217 
218 
223  namespace LinearAlgebra
224  {
225 #ifdef ASPECT_USE_PETSC
226 
230 
236 
241 
247 
251  typedef ::PETScWrappers::PreconditionerBase PreconditionBase;
252 
257  typedef ::PETScWrappers::PreconditionBoomerAMG PreconditionAMG;
258 
263  typedef ::PETScWrappers::PreconditionICC PreconditionIC;
264 
270  typedef ::PETScWrappers::PreconditionBlockJacobi PreconditionILU;
271 
277 
282 
287 #else
288 
292 
298 
303 
309 
314 
320 
326 
332 
338 
342  typedef ::TrilinosWrappers::BlockSparsityPattern BlockDynamicSparsityPattern;
343 
347  typedef ::TrilinosWrappers::SparsityPattern DynamicSparsityPattern;
348 #endif
349  }
350 }
351 
352 
358 template <class Stream>
359 void print_aspect_header(Stream &stream);
360 
367 #define ASPECT_INSTANTIATE(INSTANTIATIONS) \
368  INSTANTIATIONS(2) \
369  INSTANTIATIONS(3)
370 
371 #endif
::TrilinosWrappers::PreconditionBase PreconditionBase
Definition: global.h:313
::TrilinosWrappers::BlockSparseMatrix BlockSparseMatrix
Definition: global.h:308
::TrilinosWrappers::SparsityPattern DynamicSparsityPattern
Definition: global.h:347
boost::archive::binary_iarchive iarchive
Definition: global.h:196
const double big_g
void print_aspect_header(Stream &stream)
::TrilinosWrappers::BlockSparsityPattern BlockDynamicSparsityPattern
Definition: global.h:342
::TrilinosWrappers::PreconditionIC PreconditionIC
Definition: global.h:325
const double year_in_seconds
const double celsius_to_kelvin
LinearAlgebra::distributed::Vector< Number > Vector
const double surface_gravity
::TrilinosWrappers::SparseMatrix SparseMatrix
Definition: global.h:302
::TrilinosWrappers::PreconditionAMG PreconditionAMG
Definition: global.h:319
Definition: compat.h:37
boost::archive::binary_oarchive oarchive
Definition: global.h:203
::TrilinosWrappers::PreconditionJacobi PreconditionJacobi
Definition: global.h:337
const double avogadro
LinearAlgebra::distributed::BlockVector< Number > BlockVector
::TrilinosWrappers::PreconditionILU PreconditionILU
Definition: global.h:331
const double gas_constant