|
FhSim
3.1.0
Marine systems simulation
|
#include <ParametricBathymetry.h>
Inheritance diagram for environmentmodels::ParametricBathymetry:
Collaboration diagram for environmentmodels::ParametricBathymetry:Public Member Functions | |
| ParametricBathymetry (parametric::Spec spec) | |
| marenv::Status | GetDepth (const double pos[2], double &depthOut) override |
| marenv::Status | ComputeSurfaceUnitNormal (const double pos[2], double unitNormalOut[3]) override |
| marenv::Status | GetSeabedSigma (const double pos[3], double &sigmaOut) override |
| marenv::Status | GetSeabedTau (const double pos[3], double &tauOut) override |
| marenv::Status | GetSeabedRho (const double pos[3], double &rhoOut) override |
| marenv::Status | ComputeRayIntersection (const double origin[3], const double direction[3], double &distanceOut, double maxSearchDistance=100.0, double startSearchDistance=-1.0, double stepSize=1.0, double convergenceTolerance=0.01) override |
| double | DepthAt (double x, double y) const |
Public Member Functions inherited from marenv::seafloor::BathymetryField | |
| virtual | ~BathymetryField ()=default |
| Virtual destructor. | |
Static Public Member Functions | |
| static std::shared_ptr< ParametricBathymetry > | FromJsonString (const std::string &jsonText) |
| static std::shared_ptr< ParametricBathymetry > | FromFile (const std::string &path) |
Additional Inherited Members | |
Protected Member Functions inherited from marenv::seafloor::BathymetryField | |
| BathymetryField ()=default | |
| Constructor is empty. | |
Configurable, parameterised seabed bathymetry.
Evaluates a seabed depth field from a declarative specification of an along-track profile sequence (track) and/or general composition layers of primitive shapes with spatial validity intervals and blend operators. Intended for control-tracking reference bathymetries (constant depth, transversal incline, valley, peak, and blends thereof), but general enough for arbitrary parametric seabeds.
The depth field GetDepth is evaluated analytically; the surface normal is obtained by central finite differences, matching the convention used by the other seafloor implementations (n = (-dz/dx, -dz/dy, 1), normalised, z down). Seabed material properties are spatially constant.
Frame: SNAME (x = North, y = East, z = Down; depth positive downward).
|
explicit |
Construct from a fully-populated specification.
| [in] | spec | Parametric seabed specification. |
|
overridevirtual |
Returns the distance a ray must travel before intercepting the seafloor.
| [in] | origin | Position (x,y,z) of the origin of the ray |
| [in] | direction | The unit direction (x,y,z) of the ray |
| [out] | distanceOut | The distance the beam travelled before reaching the seabed. |
| [in] | maxSearchDistance | The maximum distance from the origin to search for an intersection. |
| [in] | startSearchDistance | The distance from the origin to start searching for an intersection (initial guess). If less then zero, the algorithm will coarsely estimate the crossing assuming a flat seabed and search from there. |
| [in] | stepSize | The search step size. |
| [in] | convergenceTolerance | The vertical error tolerance between a computed point on the ray and a point on the seafloor to consider an intersection found. |
Implements marenv::seafloor::BathymetryField.
|
overridevirtual |
Returns the unit normal vector of the seafloor at a specific position.
| [in] | pos | Position (x,y) for which the unit normal surface vector is desired. |
| [out] | unitNormalOut | The unit normal surface vector at pos. |
Implements marenv::seafloor::BathymetryField.
| double environmentmodels::ParametricBathymetry::DepthAt | ( | double | x, |
| double | y | ||
| ) | const |
Direct depth query used internally and by tests.
| [in] | x | North coordinate [m]. |
| [in] | y | East coordinate [m]. |
|
static |
Build from a JSON configuration file.
| [in] | path | Path to the JSON document. |
| std::runtime_error | if the file cannot be read or is invalid. |
|
static |
Build from a JSON configuration string.
| [in] | jsonText | JSON document describing the seabed. |
| std::runtime_error | on invalid or malformed configuration. |
|
overridevirtual |
Returns the seafloor depth at a specific position.
| [in] | pos | Position (x,y) for which depth is desired. |
| [out] | depthOut | Depth at pos. |
Implements marenv::seafloor::BathymetryField.
|
overridevirtual |
Returns seabed density (ρ) in kg/m³.
| [in] | pos | The position in question. |
| [out] | rhoOut | Density in the specified position. |
Implements marenv::seafloor::BathymetryField.
|
overridevirtual |
Returns seabed σ in Pascals (Pa).
| [in] | pos | The position in question. |
| [out] | sigmaOut | Sigma in the specified position. |
Implements marenv::seafloor::BathymetryField.
|
overridevirtual |
Returns seabed shear stress τ.
| [in] | pos | The position in question. |
| [out] | tauOut | Shear stress in the specified position. |
Implements marenv::seafloor::BathymetryField.