World Builder  1.1.0-pre
A geodynamic initial conditions generator
mass_conserving.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2018-2024 by the authors of the World Builder code.
3 
4  This file is part of the World Builder.
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program 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 Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef WORLD_BUILDER_FEATURES_SUBDUCTING_PLATE_MODELS_TEMPERATURE_MASS_CONSERVING_H
21 #define WORLD_BUILDER_FEATURES_SUBDUCTING_PLATE_MODELS_TEMPERATURE_MASS_CONSERVING_H
22 
23 
26 
27 
28 namespace WorldBuilder
29 {
30 
31  namespace Features
32  {
33  namespace SubductingPlateModels
34  {
35  namespace Temperature
36  {
56  class MassConserving final: public Interface
57  {
58  public:
63 
67  ~MassConserving() override final;
68 
72  static
73  void declare_entries(Parameters &prm, const std::string &parent_name = "");
74 
78  void parse_entries(Parameters &prm) override final;
79 
80 
85  double get_temperature(const Point<3> &position,
86  const double depth,
87  const double gravity,
88  double temperature,
89  const double feature_min_depth,
90  const double feature_max_depth,
92  const AdditionalParameters &additional_parameters) const override final;
93 
99  double get_temperature_analytic(const double top_heat_content,
100  const double min_temperature,
101  const double background_temperature,
102  const double temperature_,
103  const double plate_velocity,
104  const double effective_plate_age,
105  const double adjusted_distance) const;
106 
107 
108  private:
109  // temperature submodule parameters
110  double min_depth;
111  double max_depth;
112  double density;
113  std::vector<std::vector<double>> subducting_velocities;
114  std::pair<std::vector<double>,std::vector<double>> ridge_spreading_velocities;
115  std::vector<std::vector<double>> ridge_spreading_velocities_at_each_ridge_point;
126  std::vector<std::vector<Point<2>>> mid_oceanic_ridges;
129  {
132  };
134  const int plate_model_summation_number = 100; // for the plate model
136  unsigned int spline_n_points;
137  };
138  } // namespace Temperature
139  } // namespace SubductingPlateModels
140  } // namespace Features
141 } // namespace WorldBuilder
142 
143 #endif
static void declare_entries(Parameters &prm, const std::string &parent_name="")
double get_temperature(const Point< 3 > &position, const double depth, const double gravity, double temperature, const double feature_min_depth, const double feature_max_depth, const WorldBuilder::Utilities::PointDistanceFromCurvedPlanes &distance_from_planes, const AdditionalParameters &additional_parameters) const override final
std::pair< std::vector< double >, std::vector< double > > ridge_spreading_velocities
double get_temperature_analytic(const double top_heat_content, const double min_temperature, const double background_temperature, const double temperature_, const double plate_velocity, const double effective_plate_age, const double adjusted_distance) const