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

#include <BathymetryWaves.h>

+ Inheritance diagram for marenv::seafloor::BathymetryWaves:
+ Collaboration diagram for marenv::seafloor::BathymetryWaves:

Public Member Functions

 BathymetryWaves (double averageDepth, int numComponents, double sumAmplitudes, double minWavelength, double maxWavelength, uint32_t seed)
 
 ~BathymetryWaves () override=default
 Default destructor.
 
Status GetDepth (const double pos[2], double &depthOut) override
 
Status ComputeSurfaceUnitNormal (const double pos[2], double unitNormalOut[3]) override
 
std::shared_ptr< BathymetryWavesSpec > GetSpec ()
 
Status GetSeabedSigma (const double pos[3], double &sigmaOut) override
 
Status GetSeabedTau (const double pos[3], double &tauOut) override
 
Status GetSeabedRho (const double pos[3], double &rhoOut) override
 
- 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

Bathymetry wave components representing a seafloor.

This class implements the BathymetryField using a set of bathymetry waves to model seafloor variations. It provides methods to query depth, surface normals, and seabed material properties at given positions.

Example usage:

double averageDepth = 200.0;
int numComponents = 5;
double sumAmplitudes = 5.0;
double minWavelength = 10.0;
double maxWavelength = 100.0;
auto bathymetry = std::make_shared<marenv::seafloor::BathymetryWaves>(
averageDepth, numComponents, sumAmplitudes, minWavelength, maxWavelength, 42);
double pos[2] = {0.0, 0.0};
double depth;
bathymetry->GetDepth(pos, depth);

Constructor & Destructor Documentation

◆ BathymetryWaves()

marenv::seafloor::BathymetryWaves::BathymetryWaves ( double  averageDepth,
int  numComponents,
double  sumAmplitudes,
double  minWavelength,
double  maxWavelength,
uint32_t  seed 
)

Constructs a bathymetry wave model.

Parameters
[in]averageDepthAverage water depth [m].
[in]numComponentsNumber of bathymetry wave components.
[in]sumAmplitudesTotal sum of amplitudes across all components [m].
[in]minWavelengthMinimum wavelength [m].
[in]maxWavelengthMaximum wavelength [m].
[in]seedRandom seed for reproducibility.

Member Function Documentation

◆ ComputeSurfaceUnitNormal()

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

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

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

Implements marenv::seafloor::BathymetryField.

◆ GetDepth()

Status marenv::seafloor::BathymetryWaves::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 [m].
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Implements marenv::seafloor::BathymetryField.

◆ GetSeabedRho()

Status marenv::seafloor::BathymetryWaves::GetSeabedRho ( const double  pos[3],
double &  rhoOut 
)
overridevirtual

Returns the seabed rho property at a specific position.

Parameters
[in]posPosition (x,y,z) in meters.
[out]rhoOutRho value at pos.
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Typically represents density or resistivity depending on implementation.

Implements marenv::seafloor::BathymetryField.

◆ GetSeabedSigma()

Status marenv::seafloor::BathymetryWaves::GetSeabedSigma ( const double  pos[3],
double &  sigmaOut 
)
overridevirtual

Returns the seabed sigma property at a specific position.

Parameters
[in]posPosition (x,y,z) in meters.
[out]sigmaOutSigma value at pos.
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Typically represents stress or material property depending on implementation.

Implements marenv::seafloor::BathymetryField.

◆ GetSeabedTau()

Status marenv::seafloor::BathymetryWaves::GetSeabedTau ( const double  pos[3],
double &  tauOut 
)
overridevirtual

Returns the seabed tau property at a specific position.

Parameters
[in]posPosition (x,y,z) in meters.
[out]tauOutTau value at pos.
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Typically represents shear stress or related property depending on implementation.

Implements marenv::seafloor::BathymetryField.

◆ GetSpec()

std::shared_ptr< BathymetryWavesSpec > marenv::seafloor::BathymetryWaves::GetSpec ( )
inline

Retrieves the bathymetry wave specification used by this model.

Returns
Shared pointer to BathymetryWavesSpec.

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