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< BathymetryWavesSpecGetSpec ()
 
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
 
Status ComputeRayIntersection (const double origin[3], const double direction[3], double &distanceOut, double maxSearchDistance=100, double startSearchDistance=-1, double stepSize=1.0, double convergenceTolerance=0.01) override
 
- Public Member Functions inherited from marenv::seafloor::BathymetryField
virtual ~BathymetryField ()=default
 Virtual destructor.
 

Additional Inherited Members

- Protected Member Functions inherited from marenv::seafloor::BathymetryField
 BathymetryField ()=default
 Constructor is empty.
 

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

◆ ComputeRayIntersection()

Status marenv::seafloor::BathymetryWaves::ComputeRayIntersection ( const double  origin[3],
const double  direction[3],
double &  distanceOut,
double  maxSearchDistance = 100,
double  startSearchDistance = -1,
double  stepSize = 1.0,
double  convergenceTolerance = 0.01 
)
overridevirtual

Returns the distance a ray must travel before intercepting the seafloor.

Parameters
[in]originPosition (x,y,z) of the origin of the ray
[in]directionThe unit direction (x,y,z) of the ray
[out]distanceOutThe distance the beam travelled before reaching the seabed.
[in]maxSearchDistanceThe maximum distance from the origin to search for an intersection.
[in]startSearchDistanceThe 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]stepSizeThe search step size.
[in]convergenceToleranceThe vertical error tolerance between a computed point on the ray and a point on the seafloor to consider an intersection found.
Returns
marenv::Status::OK on success. See marenv::Status for other values.

Implements marenv::seafloor::BathymetryField.

◆ 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: