34 using namespace Utilities;
38 using namespace FeatureUtilities;
45 min_depth(NaN::
DSNAN),
49 this->
name =
"uniform";
61 "Uniform compositional model. Sets constant compositional field.");
65 "The distance in meters from which the composition of this feature is present.");
67 "The distance in meters to which the composition of this feature is present.");
69 "A list with the labels of the composition which are present there.");
71 "TA list of compositional fractions corresponding to the compositions list.");
72 prm.
declare_entry(
"operation",
Types::String(
"replace", std::vector<std::string> {
"replace",
"replace defined only",
"add",
"subtract"}),
73 "Whether the value should replace any value previously defined at this location (replace) or " 74 "add the value to the previously define value. Replacing implies that all compositions not " 75 "explicitly defined are set to zero. To only replace the defined compositions use the replace only defined option.");
82 min_depth = prm.
get<
double>(
"min distance fault center");
83 max_depth = prm.
get<
double>(
"max distance fault center");
89 "There are not the same amount of compositions and fractions.");
96 const unsigned int composition_number,
Operations string_operations_to_enum(const std::string &operation)
double distance_from_plane
#define WBAssertThrow(condition, message)
#define WB_REGISTER_FEATURE_FAULT_COMPOSITION_MODEL(classname, 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)
WorldBuilder::World * world