Marine systems simulation
Loading...
Searching...
No Matches
marenv::wave::WaveComponents Class Reference

#include <WaveComponents.h>

+ Inheritance diagram for marenv::wave::WaveComponents:
+ Collaboration diagram for marenv::wave::WaveComponents:

Public Member Functions

 WaveComponents (std::vector< double > amplitude, std::vector< double > phaseAngle, std::vector< double > frequency, std::vector< double > direction, SpectrumType spectrumType)
 
 ~WaveComponents ()=default
 Default destructor.
 
std::shared_ptr< WaveComponentsBlend (WaveComponentData &other, double alpha) const
 
void Sort ()
 Sorts the wave components.
 
std::string GetSpectrumType () const
 Spectrum type.
 
WaveField::InsecureDatapointers GetInsecureDatapointers () const
 Gives access to temporary pointers to internal structures, for performance reasons.
 

Friends

class WaveEnergySpectrum
 

Detailed Description

Container for discrete wave component data representing a sea state.

Stores amplitudes, frequencies, directions, and phase angles for multiple wave components. Used by wave field implementations (Airy, Gerstner) to compute wave kinematics and dynamics.

Constructor & Destructor Documentation

◆ WaveComponents()

marenv::wave::WaveComponents::WaveComponents ( std::vector< double >  amplitude,
std::vector< double >  phaseAngle,
std::vector< double >  frequency,
std::vector< double >  direction,
SpectrumType  spectrumType 
)

Constructor

Parameters
[in]amplitudeAn array of wave component amplitudes.
[in]phaseAngleAn array of wave component phase angles in radians.
[in]frequencyAn array of wave component frequencies in rad/s.
[in]directionAn array of wave component directions in radians.
[in]spectrumTypeThe spectrum type used for the realisation.

Member Function Documentation

◆ Blend()

std::shared_ptr< WaveComponents > marenv::wave::WaveComponents::Blend ( WaveComponentData other,
double  alpha 
) const

Returns a new WaveComponents that is this blended towards other by alpha.

Parameters
[in]otherThe target set of wave components.
[in]alphaBlend factor: 0 = keep current, 1 = use other.
Returns
A newly allocated WaveComponents representing the blended state.
   This object is not modified.  Thread-safe: can be called concurrently with
   GetInsecureDatapointers() on the same instance.

◆ GetInsecureDatapointers()

WaveField::InsecureDatapointers marenv::wave::WaveComponents::GetInsecureDatapointers ( ) const
Returns
Temporary pointers to internal data structures.

◆ GetSpectrumType()

std::string marenv::wave::WaveComponents::GetSpectrumType ( ) const
Returns
Spectrum type.

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