36 using namespace Utilities;
40 namespace SubductingPlateModels
46 min_distance(NaN::
DSNAN),
47 side_distance(NaN::
DSNAN),
51 this->
name =
"smooth";
64 "The distance in meters from which the composition of this layer is present.");
66 "The distance in meters from which the composition of this layer is present.");
68 "The composition fraction at the top of the slab (layer).");
70 "The composition fraction at the bottom of the slab (layer).");
72 "A list with the labels of the composition which are present there.");
73 prm.
declare_entry(
"operation",
Types::String(
"replace", std::vector<std::string> {
"replace",
"replace defined only",
"add",
"subtract"}),
74 "Whether the value should replace any value previously defined at this location (replace) or " 75 "add the value to the previously define value. Replacing implies that all compositions not " 76 "explicitly defined are set to zero. To only replace the defined compositions use the replace only defined option.");
96 const unsigned int composition_number,
103 double composition = composition_;
std::vector< unsigned int > compositions
double get_composition(const Point< 3 > &position, const double depth, const unsigned int composition_number, double composition, const double feature_min_depth, const double feature_max_depth, const WorldBuilder::Utilities::PointDistanceFromCurvedPlanes &distance_from_planes, const AdditionalParameters &additional_parameters) const override final
static void declare_entries(Parameters &prm, const std::string &parent_name="")
Operations string_operations_to_enum(const std::string &operation)
std::vector< double > top_fraction
WorldBuilder::World * world
double distance_from_plane
std::vector< double > bottom_fraction
#define WB_REGISTER_FEATURE_SUBDUCTING_PLATE_COMPOSITION_MODEL(classname, name)
void parse_entries(Parameters &prm) override final
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)