World Builder  1.1.0-pre
A geodynamic initial conditions generator
random_uniform_distribution_deflected.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_RANDOM_UNIFORM_DISTRIBUTION_DEFLECTED_H
21 #define WORLD_BUILDER_FEATURES_PLUME_MODELS_GRAINS_RANDOM_UNIFORM_DISTRIBUTION_DEFLECTED_H
22 
23 
26 
27 namespace WorldBuilder
28 {
29  namespace Features
30  {
31  namespace PlumeModels
32  {
33  namespace Grains
34  {
42  {
43  public:
48 
52  ~RandomUniformDistributionDeflected() 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  double min_depth;
98  double max_depth;
99  std::vector<unsigned int> grains;
100  std::vector<unsigned int> compositions;
101  std::string operation;
102  std::vector<double> grain_sizes;
103  std::vector<bool> normalize_grain_sizes;
104  std::vector<double> deflections;
105  std::vector<std::array<std::array<double, 3>, 3>> basis_rotation_matrices;
106  };
107  } // namespace Grains
108  } // namespace PlumeModels
109  } // namespace Features
110 } // namespace WorldBuilder
111 
112 #endif
static void declare_grain_size_model_entries(Parameters &prm, const std::string &parent_name, const std::vector< std::string > &required_entries)
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
static void declare_fixed_size_model_entries(Parameters &prm, const std::string &parent_name="")