World Builder  1.1.0-pre
A geodynamic initial conditions generator
mantle_layer.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_MANTLE_LAYER_H
21 #define WORLD_BUILDER_FEATURES_MANTLE_LAYER_H
22 
23 
26 
27 
28 namespace WorldBuilder
29 {
30  class Parameters;
31  class World;
32 
33  namespace Features
34  {
35  namespace MantleLayerModels
36  {
37  namespace Composition
38  {
39  class Interface;
40  } // namespace Composition
41  namespace Grains
42  {
43  class Interface;
44  } // namespace Grains
45  namespace Temperature
46  {
47  class Interface;
48  } // namespace Temperature
49  namespace Velocity
50  {
51  class Interface;
52  } // namespace Velocity
53  } // namespace MantleLayerModels
54 
61  class MantleLayer final: public Interface
62  {
63  public:
68 
72  ~MantleLayer() override final;
73 
77  static
78  void declare_entries(Parameters &prm,
79  const std::string &parent_name = "",
80  const std::vector<std::string> &required_entries = {});
81 
85  static
86  void make_snippet(Parameters &prm);
87 
91  void parse_entries(Parameters &prm) override final;
92 
93 
120  void
121  properties(const Point<3> &position_in_cartesian_coordinates,
122  const Objects::NaturalCoordinate &position_in_natural_coordinates,
123  const double depth,
124  const std::vector<std::array<unsigned int,3>> &properties,
125  const double gravity,
126  const std::vector<size_t> &entry_in_output,
127  std::vector<double> &output) const override final;
128 
129  private:
136  std::vector<std::unique_ptr<Features::MantleLayerModels::Temperature::Interface> > temperature_models;
137 
144  std::vector<std::unique_ptr<Features::MantleLayerModels::Composition::Interface> > composition_models;
145 
152  std::vector<std::unique_ptr<Features::MantleLayerModels::Grains::Interface> > grains_models;
153 
160  std::vector<std::unique_ptr<Features::MantleLayerModels::Velocity::Interface> > velocity_models;
161 
162  double min_depth;
164  double max_depth;
166 
167  };
168 
169 
170  } // namespace Features
171 } // namespace WorldBuilder
172 
173 #endif
std::vector< std::unique_ptr< Features::MantleLayerModels::Grains::Interface > > grains_models
Definition: mantle_layer.h:152
std::vector< std::unique_ptr< Features::MantleLayerModels::Velocity::Interface > > velocity_models
Definition: mantle_layer.h:160
std::vector< std::unique_ptr< Features::MantleLayerModels::Temperature::Interface > > temperature_models
Definition: mantle_layer.h:136
std::vector< std::unique_ptr< Features::MantleLayerModels::Composition::Interface > > composition_models
Definition: mantle_layer.h:144