Parent class for linear wave theories used to simulate gravity waves.
#include <LinearWaveTheory.h>
|
| | LinearWaveTheory (std::shared_ptr< WaveComponents > waveComponents, std::string waveTheoryName) |
| |
| WaveField::InsecureDatapointers | GetWaveComponents () const override |
| |
| std::string | SpectrumName () const override |
| |
| std::string | WaveTheoryName () const override |
| |
| WaveComponentData | GetWaveComponentsCopy () const override |
| |
| void | BlendInPlace (WaveComponentData &other, double alpha) override |
| |
|
virtual | ~WaveField ()=default |
| | Virtual destructor.
|
| |
| virtual marenv::Status | ComputeSurfaceElevation (double time, const double pos[2], double &elevationOut)=0 |
| |
| virtual marenv::Status | ComputeDynamicPressure (double time, const double pos[3], double &pressureOut)=0 |
| |
| virtual marenv::Status | ComputeTotalPressure (double time, const double pos[3], double &pressureOut)=0 |
| |
| virtual marenv::Status | ComputeSurfaceUnitNormal (double time, const double pos[2], double unitNormalOut[3])=0 |
| |
| virtual marenv::Status | ComputeParticleVelocity (double time, const double pos[3], double velOut[3])=0 |
| |
| virtual marenv::Status | ComputeParticleAcceleration (double time, const double pos[3], double accOut[3])=0 |
| |
| virtual marenv::Status | ComputePointQuery (double time, const double pos[3], double &surface_elevation, double surface_unit_normal[3], double particle_velocity[3], double particle_acceleration[3], double &pressure)=0 |
| |
| virtual marenv::wave::WaveComponentData | GetWaveComponentsCopy (double time, size_t maxComponents=0) const |
| |
|
|
std::string | m_spectrumName |
| | The name of the wave spectrum.
|
| |
|
std::string | m_waveTheoryName |
| | The name of the wave theory.
|
| |
◆ LinearWaveTheory()
| marenv::wave::LinearWaveTheory::LinearWaveTheory |
( |
std::shared_ptr< WaveComponents > |
waveComponents, |
|
|
std::string |
waveTheoryName |
|
) |
| |
Constructor
- Parameters
-
| waveComponents | The wave components in terms of amplitudes etc. |
| waveTheoryName | The wavetheory used. Gerstner or Airy. |
◆ BlendInPlace()
| void marenv::wave::LinearWaveTheory::BlendInPlace |
( |
WaveComponentData & |
other, |
|
|
double |
alpha |
|
) |
| |
|
overridevirtual |
Interpolates the wave components towards another set of wave components
- Parameters
-
| [in] | other | The other set of wave components |
| [in] | alpha | The blend factor, the relative weight of the other wave components |
Implements marenv::wave::WaveField.
◆ GetWaveComponents()
Getter for wave component pointers.
- Returns
- A structure with pointers to wave component data.
Their use focus on efficiency. Care should be taken to only use these pointers while they are valid.
Implements marenv::wave::WaveField.
◆ GetWaveComponentsCopy()
Getter for a copy of wave component specifications.
- Returns
- A structure with wave component data.
Implements marenv::wave::WaveField.
◆ LoadSnapshot()
| std::shared_ptr< WaveSnapshot > marenv::wave::LinearWaveTheory::LoadSnapshot |
( |
| ) |
const |
|
inlineprotected |
Atomically loads and returns the current snapshot.
All Compute* methods must call this once at entry and use the returned shared_ptr for their entire duration — never access m_snapshot twice.
◆ SpectrumName()
| std::string marenv::wave::LinearWaveTheory::SpectrumName |
( |
| ) |
const |
|
overridevirtual |
Getter for the name of the wave spectrum used for the realisation of the waves.
- Returns
- Ittc or Jonswap.
Implements marenv::wave::WaveField.
◆ StoreSnapshot()
| void marenv::wave::LinearWaveTheory::StoreSnapshot |
( |
std::shared_ptr< WaveSnapshot > |
snap | ) |
|
|
inlineprotected |
Atomically publishes a new snapshot. Old snapshot is kept alive until
all in-flight Compute* calls that hold a local copy of it finish.
◆ WaveTheoryName()
| std::string marenv::wave::LinearWaveTheory::WaveTheoryName |
( |
| ) |
const |
|
overridevirtual |
Getter for the name of the wave theory used for the realisation of the waves.
- Returns
- Airy or Gerstner.
Implements marenv::wave::WaveField.
The documentation for this class was generated from the following file: