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_FAULT_MODELS_GRAINS_RANDOM_UNIFORM_DISTRIBUTION_DEFLECTED_H
21 #define WORLD_BUILDER_FEATURES_FAULT_MODELS_GRAINS_RANDOM_UNIFORM_DISTRIBUTION_DEFLECTED_H
22 
23 
25 
26 namespace WorldBuilder
27 {
28 
29  namespace Features
30  {
31  using namespace FeatureUtilities;
32  namespace FaultModels
33  {
34  namespace Grains
35  {
43  {
44  public:
49 
53  ~RandomUniformDistributionDeflected() override final;
54 
59  static void declare_entries(Parameters &prm,
60  const std::string &parent_name = "");
61 
66  static void declare_grain_size_model_entries(
67  Parameters &prm, const std::string &parent_name,
68  const std::vector<std::string> &required_entries);
69 
74  static void
75  declare_fixed_size_model_entries(Parameters &prm,
76  const std::string &parent_name = "");
77 
82  void parse_entries(Parameters &prm) override final;
83 
89  get_grains(const Point<3> &position,
90  const double depth,
91  const unsigned int composition_number,
93  const double feature_min_depth,
94  const double feature_max_depth,
96  const AdditionalParameters &additional_parameters) const override final;
97 
98  private:
99  double min_depth;
100  double max_depth;
101  std::vector<unsigned int> grains;
102  std::vector<unsigned int> compositions;
103  std::string operation;
104  std::vector<double> grain_sizes;
105  std::vector<bool> normalize_grain_sizes;
106  std::vector<double> deflections;
107  std::vector<std::array<std::array<double, 3>, 3>> basis_rotation_matrices;
108  };
109  } // namespace Grains
110  } // namespace FaultModels
111  } // namespace Features
112 } // namespace WorldBuilder
113 
114 #endif