|
FhSim
3.1.0
Marine systems simulation
|
Scalar environment fields: temperature, salinity and concentration. More...
Collaboration diagram for Scalar Fields:Classes | |
| class | marenv::field::ConstantScalarField |
| class | marenv::field::DepthLayeredScalarField |
| struct | marenv::field::BeamProfileQuery |
| class | marenv::field::IntegrableField |
| class | marenv::field::ParametricScalarField |
| struct | marenv::field::Property |
| class | marenv::field::ScalarField |
Functions | |
| marenv::calc::DepthProfile | marenv::field::MakeDepthProfile (std::vector< double > depths, std::vector< double > values, const std::string &context) |
The scalar field interface with its static metadata (name, quantity, unit and properties), the constant and depth-layered fields, and the interface of a field whose beam-weighted line integral is needed.
|
strong |
Advisory tag describing what a scalar field measures.
The tag is metadata only: it is not enforced against the values a field returns, and two fields with the same quantity may use different units. Its purpose is to let a consumer discover the fields of a given kind through the field registry of fhsim_environment (EnvironmentProvider::GetScalarFieldNames) instead of hard-coding field names.
| marenv::calc::DepthProfile marenv::field::MakeDepthProfile | ( | std::vector< double > | depths, |
| std::vector< double > | values, | ||
| const std::string & | context | ||
| ) |
Builds the validated vertical profile of a scalar field (W-30).
Shared by DepthLayeredScalarField and by the depth_profile background of ParametricScalarField, so that both accept exactly the same profiles; the profile is marenv's one depth-profile type (marenv::calc::DepthProfile, owner ruling R122): linear between the layers, clamped to the shallowest or deepest layer outside them with marenv::Status::OUT_OF_RANGE_INACCURATE (a temperature of 0 degC or a salinity of 0 PSU would be misleading), and marenv::Status::ERROR_NOT_SET with the value 0 for a NaN depth.
| [in] | depths | Layer coordinates [m], strictly increasing. At least two entries. |
| [in] | values | Value at each layer. Same length as depths. |
| [in] | context | Prefix for the exception message, e.g. ‘DepthLayeredScalarField 'X’`. |
| std::invalid_argument,its | message prefixed by context, if the lists differ in length, if fewer than two layers are given, if a depth or a value is not finite (ENV-0060), or if the depths are not strictly increasing. |