36 using namespace Utilities;
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 feature is present.");
66 "The distance over which the composition is reduced from 1 to 0.");
68 "The composition fraction at the center of the fault.");
70 "The composition fraction at the sides of this feature.");
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.");
84 WBAssert(side_distance >=
min_distance,
"distance at the side needs to be larger or equal than the min distance.");
95 const unsigned int composition_number,
102 double composition = composition_;
void parse_entries(Parameters &prm) override final
static void declare_entries(Parameters &prm, const std::string &parent_name="")
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
std::vector< double > center_fraction
std::vector< unsigned int > compositions
Operations string_operations_to_enum(const std::string &operation)
#define WBAssert(condition, message)
double distance_from_plane
std::vector< double > side_fraction
#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