FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
marenv::seafloor::ParametricBathymetry Class Reference

#include <ParametricBathymetry.h>

+ Inheritance diagram for marenv::seafloor::ParametricBathymetry:
+ Collaboration diagram for marenv::seafloor::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 GetSoilState (const double pos[3], SoilState &soilOut) override
 
double DepthAt (double x, double y) const
 
- Public Member Functions inherited from marenv::seafloor::BathymetryField
virtual ~BathymetryField ()=default
 Virtual destructor.
 
virtual Status ComputeRayIntersection (const double origin[3], const double direction[3], double &distanceOut, double maxSearchDistance=100, double startSearchDistance=-1.0, double stepSize=1.0, double convergenceTolerance=0.01)
 

Additional Inherited Members

- Protected Member Functions inherited from marenv::seafloor::BathymetryField
 BathymetryField ()=default
 Constructor is empty.
 
- Static Protected Member Functions inherited from marenv::seafloor::BathymetryField
static bool IsValidRay (const double origin[3], double directionNorm, double maxSearchDistance)
 True for an origin with finite coordinates, and a direction norm and a maximum search distance that ComputeRayIntersection accepts: positive and finite.
 
static double ValidTolerance (double convergenceTolerance)
 The convergence tolerance ComputeRayIntersection uses: convergenceTolerance, raised to 1e-12 if smaller or NaN.
 

Detailed Description

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. The normal points out of the soil into the water (owner ruling D15): 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).

Constructor & Destructor Documentation

◆ ParametricBathymetry()

marenv::seafloor::ParametricBathymetry::ParametricBathymetry ( parametric::Spec  spec)
explicit

Construct from a fully-populated specification.

Parameters
[in]specParametric seabed specification.

Member Function Documentation

◆ ComputeSurfaceUnitNormal()

marenv::Status marenv::seafloor::ParametricBathymetry::ComputeSurfaceUnitNormal ( const double  pos[2],
double  unitNormalOut[3] 
)
overridevirtual

Returns the unit normal vector of the seafloor at a specific position.

The normal points out of the soil, into the water (owner ruling D15). With z down (NED) that is up: (0, 0, -1) on flat ground, and (d_x, d_y, -1) / norm on the surface z = depth(x, y).

Parameters
[in]posPosition (x,y) for which the unit normal surface vector is desired.
[out]unitNormalOutThe unit normal surface vector at pos, pointing into the water.
Returns
marenv::Status::OK on success. See marenv::Status for other values.flag

Implements marenv::seafloor::BathymetryField.

◆ DepthAt()

double marenv::seafloor::ParametricBathymetry::DepthAt ( double  x,
double  y 
) const

Direct depth query used internally and by tests.

Parameters
[in]xNorth coordinate [m].
[in]yEast coordinate [m].
Returns
Seabed depth [m] (positive downward).

◆ GetDepth()

marenv::Status marenv::seafloor::ParametricBathymetry::GetDepth ( const double  pos[2],
double &  depthOut 
)
overridevirtual

Returns the seafloor depth at a specific position.

Parameters
[in]posPosition (x,y) for which depth is desired.
[out]depthOutDepth at pos.
Returns
marenv::Status::OK on success. See marenv::Status for other values.flag

Implements marenv::seafloor::BathymetryField.

◆ GetSoilState()

marenv::Status marenv::seafloor::ParametricBathymetry::GetSoilState ( const double  pos[3],
SoilState &  soilOut 
)
overridevirtual

The default soil profile (SoilState), with the density of material.rho of the specification.

Implements marenv::seafloor::BathymetryField.


The documentation for this class was generated from the following file: