36 using namespace Utilities;
40 namespace MantleLayerModels
46 min_depth(NaN::
DSNAN),
50 this->
name =
"uniform";
62 "Uniform compositional model. Sets constant compositional field.");
66 "The depth in meters from which the composition of this feature is present.");
68 "The depth in meters to which the composition of this feature is present.");
70 "A list with the labels of the composition which are present there.");
72 "TA list of compositional fractions corresponding to the compositions list.");
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.");
92 "There are not the same amount of compositions and fractions.");
100 const unsigned int composition_number,
105 if (depth <= max_depth && depth >=
min_depth)
109 if (depth <= max_depth_local && depth >= min_depth_local)
Operations string_operations_to_enum(const std::string &operation)
Point< 2 > get_surface_point() const
#define WBAssertThrow(condition, message)
SurfaceValueInfo local_value(const Point< 2 > &check_point) const
WorldBuilder::World * world
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)
#define WB_REGISTER_FEATURE_MANTLE_LAYER_COMPOSITION_MODEL(classname, name)