|
FhSim
3.1.0
Marine systems simulation
|
#include <ConstantScalarField.h>
Inheritance diagram for marenv::field::ConstantScalarField:
Collaboration diagram for marenv::field::ConstantScalarField:Public Member Functions | |
| ConstantScalarField (std::string name, Quantity quantity, std::string unit, double value, std::vector< Property > properties={}) | |
| ~ConstantScalarField () override=default | |
| Default destructor. | |
| marenv::Status | GetValue (double time, const double position[3], double &value) const override |
| bool | IsTimeInvariant () const override |
| bool | IsThreadSafe () const override |
Public Member Functions inherited from marenv::field::ScalarField | |
| virtual | ~ScalarField ()=default |
| Virtual destructor. | |
| virtual void | GetValues (double time, std::span< const std::array< double, 3 > > positions, std::span< double > values, std::span< marenv::Status > statuses) const |
| const std::string & | Name () const |
| Quantity | GetQuantity () const |
| const std::string & | Unit () const |
| const std::vector< Property > & | Properties () const |
| bool | Has (const std::string &key) const |
| double | Get (const std::string &key, double fallback=0.0) const |
| const std::string & | Species () const |
| void | SetSpecies (std::string species) |
Additional Inherited Members | |
Protected Member Functions inherited from marenv::field::ScalarField | |
| ScalarField (std::string name, Quantity quantity, std::string unit, std::vector< Property > properties) | |
A scalar field with the same value at every position and time.
Used for a uniform temperature, salinity or species concentration, and as the simplest field to register from a SimObject that has no profile to offer.
|
inline |
Constructs a uniform scalar field.
| [in] | name | Unique field name. Must not be empty. |
| [in] | quantity | Advisory tag describing what the field measures. |
| [in] | unit | Unit of value, e.g. "degC". May be empty. |
| [in] | value | The value returned for every position and time. Must be finite. |
| [in] | properties | Static properties. Keys must be unique and non-empty. |
| std::invalid_argument | if name is empty, if a property key is empty or repeated, or if value is not finite (ENV-0060). |
|
inlineoverridevirtual |
Returns the constant value, always with marenv::Status::OK.
Returns the scalar value at a given position and time.
| [in] | time | Simulation time [s]. |
| [in] | position | Position in the NED frame [x, y, z] [m]. |
| [out] | value | The value at the given time and position. |
Implements marenv::field::ScalarField.
|
inlineoverridevirtual |
GetValue reads only the immutable configured value.
Reimplemented from marenv::field::ScalarField.
|
inlineoverridevirtual |
The value is the same at all times.
Reimplemented from marenv::field::ScalarField.