ASPECT
S40RTS_perturbation.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2019 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_initial_temperature_S40RTS_perturbation_h
23 #define _aspect_initial_temperature_S40RTS_perturbation_h
24 
26 #include <aspect/utilities.h>
27 
28 namespace aspect
29 {
30  namespace InitialTemperature
31  {
32  using namespace dealii;
33 
34  namespace internal
35  {
36  namespace S40RTS
37  {
39  {
40  public:
41  SphericalHarmonicsLookup(const std::string &filename,
42  const MPI_Comm comm);
43 
45  const std::vector<double> &
46  cos_coeffs() const;
47 
49  const std::vector<double> &
50  sin_coeffs() const;
51 
52  unsigned int maxdegree() const;
53 
54  private:
55  unsigned int order;
56  std::vector<double> a_lm;
57  std::vector<double> b_lm;
58  };
59 
61  {
62  public:
63  SplineDepthsLookup(const std::string &filename,
64  const MPI_Comm comm);
65 
66  const std::vector<double> &
67  spline_depths() const;
68 
69  private:
70  std::vector<double> depths;
71  };
72  }
73  }
74 
75  template <int dim>
77 
78 
88  template <int dim>
89  class S40RTSPerturbation : public Interface<dim>, public ::aspect::SimulatorAccess<dim>
90  {
91  public:
96 
101  void
102  initialize () override;
103 
107  virtual
108  double get_Vs (const Point<dim> &position) const;
109 
113  double initial_temperature (const Point<dim> &position) const override;
114 
118  static
119  void
120  declare_parameters (ParameterHandler &prm);
121 
125  void
126  parse_parameters (ParameterHandler &prm) override;
127 
128  private:
129 
134  {
137  };
138 
143 
147  std::string data_directory;
149 
158 
173 
180 
186 
191  unsigned int specified_max_degree;
192 
199 
204  std::unique_ptr<internal::S40RTS::SphericalHarmonicsLookup> spherical_harmonics_lookup;
205 
210  std::unique_ptr<internal::S40RTS::SplineDepthsLookup> spline_depths_lookup;
211 
216 
220  unsigned int vs_to_density_index;
221 
226 
227  template <int dim2> friend class PatchOnS40RTS;
228  };
229 
230  }
231 }
232 
233 #endif
void declare_parameters(ParameterHandler &prm)
aspect::Utilities::AsciiDataProfile< dim > profile
std::unique_ptr< internal::S40RTS::SphericalHarmonicsLookup > spherical_harmonics_lookup
std::unique_ptr< internal::S40RTS::SplineDepthsLookup > spline_depths_lookup
Definition: compat.h:59
Definition: compat.h:42