World Builder  1.1.0-pre
A geodynamic initial conditions generator
uniform.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_PLUME_MODELS_GRAINS_UNIFORM_H
21 #define WORLD_BUILDER_FEATURES_PLUME_MODELS_GRAINS_UNIFORM_H
22 
23 
26 
27 namespace WorldBuilder
28 {
29  namespace Features
30  {
31  namespace PlumeModels
32  {
33  namespace Grains
34  {
41  class Uniform final : public Interface
42  {
43  public:
48 
52  ~Uniform() override final;
53 
58  static void declare_entries(Parameters &prm,
59  const std::string &parent_name = "");
60 
66  Parameters &prm, const std::string &parent_name,
67  const std::vector<std::string> &required_entries);
68 
73  static void
75  const std::string &parent_name = "");
76 
81  void parse_entries(Parameters &prm) override final;
82 
88  get_grains(const Point<3> &position,
89  const Objects::NaturalCoordinate &position_in_natural_coordinates,
90  const double depth,
91  const unsigned int composition_number,
93  const double feature_min_depth,
94  const double feature_max_depth) const override final;
95 
96  private:
97  // uniform grains submodule parameters
98  double min_depth;
99  double max_depth;
100  std::vector<unsigned int> grains;
101  std::vector<unsigned int> compositions;
102  std::string operation;
103  std::vector<std::array<std::array<double, 3>, 3>> rotation_matrices;
104  std::vector<double> grain_sizes;
105  };
106  } // namespace Grains
107  } // namespace PlumeModels
108  } // namespace Features
109 } // namespace WorldBuilder
110 
111 #endif
static void declare_fixed_size_model_entries(Parameters &prm, const std::string &parent_name="")
static void declare_entries(Parameters &prm, const std::string &parent_name="")
Definition: uniform.cc:57
WorldBuilder::grains get_grains(const Point< 3 > &position, const Objects::NaturalCoordinate &position_in_natural_coordinates, const double depth, const unsigned int composition_number, WorldBuilder::grains grains, const double feature_min_depth, const double feature_max_depth) const override final
Definition: uniform.cc:137
std::vector< std::array< std::array< double, 3 >, 3 > > rotation_matrices
Definition: uniform.h:103
static void declare_grain_size_model_entries(Parameters &prm, const std::string &parent_name, const std::vector< std::string > &required_entries)
void parse_entries(Parameters &prm) override final
Definition: uniform.cc:92