ASPECT
S40RTS_perturbation.h
Go to the documentation of this file.
1 // ------------------------------------------------------
2 //
3 // SPDX-License-Identifier: GPL-2.0-or-later
4 //
5 // SPDX-FileCopyrightText: Copyright (C) 2011-2026 by the ASPECT authors.
6 //
7 // This file is part of ASPECT.
8 //
9 // Detailed license information governing the source code and
10 // contributions can be found in the folder LICENSES and in
11 // LICENSE and CONTRIBUTING.md at the top level directory.
12 //
13 // ------------------------------------------------------
14 
15 
16 #ifndef _aspect_initial_temperature_S40RTS_perturbation_h
17 #define _aspect_initial_temperature_S40RTS_perturbation_h
18 
20 #include <aspect/utilities.h>
21 
22 namespace aspect
23 {
24  namespace InitialTemperature
25  {
26  namespace internal
27  {
28  namespace S40RTS
29  {
31  {
32  public:
33  SphericalHarmonicsLookup(const std::string &filename,
34  const MPI_Comm comm);
35 
37  const std::vector<double> &
38  cos_coeffs() const;
39 
41  const std::vector<double> &
42  sin_coeffs() const;
43 
44  unsigned int maxdegree() const;
45 
46  private:
47  unsigned int order;
48  std::vector<double> a_lm;
49  std::vector<double> b_lm;
50  };
51 
53  {
54  public:
55  SplineDepthsLookup(const std::string &filename,
56  const MPI_Comm comm);
57 
58  const std::vector<double> &
59  spline_depths() const;
60 
61  private:
62  std::vector<double> depths;
63  };
64  }
65  }
66 
67  template <int dim>
69 
70 
80  template <int dim>
81  class S40RTSPerturbation : public Interface<dim>, public ::aspect::SimulatorAccess<dim>
82  {
83  public:
88 
93  void
94  initialize () override;
95 
99  virtual
100  double get_Vs (const Point<dim> &position) const;
101 
105  double initial_temperature (const Point<dim> &position) const override;
106 
110  static
111  void
113 
117  void
118  parse_parameters (ParameterHandler &prm) override;
119 
120  private:
121 
126  {
128  constant
129  };
130 
135 
140  std::string data_directory;
145 
156 
178 
186 
193 
199  unsigned int specified_max_degree;
200 
208 
213  std::unique_ptr<internal::S40RTS::SphericalHarmonicsLookup> spherical_harmonics_lookup;
214 
219  std::unique_ptr<internal::S40RTS::SplineDepthsLookup> spline_depths_lookup;
220 
225 
229  unsigned int vs_to_density_index;
230 
237 
238  template <int dim2> friend class PatchOnS40RTS;
239  };
240 
241  }
242 }
243 
244 #endif
SphericalHarmonicsLookup(const std::string &filename, const MPI_Comm comm)
const std::vector< double > & sin_coeffs() const
Declare a function that returns the sine coefficients.
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
*braid_SplitCommworld & comm
const std::vector< double > & cos_coeffs() const
Declare a function that returns the cosine coefficients.