38 using namespace Utilities;
42 using namespace FeatureUtilities;
43 namespace ContinentalPlateModels
49 min_depth(NaN::
DSNAN),
53 this->
name =
"random";
65 "Uniform compositional model. Sets constant compositional field.");
69 "The depth in meters from which the composition of this feature is present.");
72 "The depth in meters to which the composition of this feature is present.");
75 "A list with the labels of the composition which are present there.");
78 "Minimum value of the range within which we want to generate a random compositional value " 79 "corresponding to the compositional field.");
82 "Maximum value of the range within which we want to generate a random compositional value " 83 "corresponding to the compositional field.");
85 prm.
declare_entry(
"operation",
Types::String(
"replace", std::vector<std::string> {
"replace",
"replace defined only",
"add",
"subtract"}),
86 "Whether the value should replace any value previously defined at this location (replace) or " 87 "add the value to the previously define value. Replacing implies that all compositions not " 88 "explicitly defined are set to zero. To only replace the defined compositions use the replace only defined option.");
111 const unsigned int composition_number,
116 if (depth <= max_depth && depth >=
min_depth)
120 if (depth <= max_depth_local && depth >= min_depth_local)
124 if (i == composition_number)
std::vector< double > min_value
double get_composition(const Point< 3 > &position, const Objects::NaturalCoordinate &position_in_natural_coordinates, const double depth, const unsigned int composition_number, double composition, const double feature_min_depth, const double feature_max_depth) const override final
WorldBuilder::World * world
std::vector< unsigned int > compositions
Objects::Surface min_depth_surface
std::mt19937 & get_random_number_engine()
Objects::Surface max_depth_surface
#define WB_REGISTER_FEATURE_CONTINENTAL_PLATE_COMPOSITION_MODEL(classname, name)
Operations string_operations_to_enum(const std::string &operation)
std::vector< double > max_value
Point< 2 > get_surface_point() const
SurfaceValueInfo local_value(const Point< 2 > &check_point) const
static void declare_entries(Parameters &prm, const std::string &parent_name="")
double apply_operation(const Operations operation, const double old_value, const double new_value)
void declare_entry(const std::string &name, const Types::Interface &type, const std::string &documentation)
std::vector< T > get_vector(const std::string &name)
T get(const std::string &name)
void parse_entries(Parameters &prm, const std::vector< Point< 2 >> &coordinates) override final