|
FhSim
3.1.0
Marine systems simulation
|
#include <LinearWaveTheory.h>
Inheritance diagram for marenv::wave::LinearWaveTheory:
Collaboration diagram for marenv::wave::LinearWaveTheory:Public Member Functions | |
| 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 |
| double | MaxWaveElevation () const override |
| Sum of |zeta_A| over the published components, times 1 + 1e-10 (see WaveField::MaxWaveElevation). | |
Public Member Functions inherited from marenv::wave::WaveField | |
| virtual | ~WaveField ()=default |
| 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 |
Protected Member Functions | |
| std::shared_ptr< WaveSnapshot > | LoadSnapshot () const |
| void | StoreSnapshot (std::shared_ptr< WaveSnapshot > snap) |
Protected Member Functions inherited from marenv::wave::WaveField | |
| WaveField ()=default | |
| Constructor. | |
Protected Attributes | |
| std::string | m_spectrumName |
| The name of the wave spectrum. | |
| std::string | m_waveTheoryName |
| The name of the wave theory. | |
Parent class for linear wave theories used to simulate gravity waves.
Deep-water dispersion and decay (k = omega^2/g, e^{-kz}); valid for kh > pi.
| marenv::wave::LinearWaveTheory::LinearWaveTheory | ( | std::shared_ptr< WaveComponents > | waveComponents, |
| std::string | waveTheoryName | ||
| ) |
Constructor
| waveComponents | The wave components in terms of amplitudes etc. |
| waveTheoryName | The wavetheory used. Gerstner or Airy. |
| std::invalid_argument | if waveComponents is null (MENV-0091). |
|
overridevirtual |
Getter for wave component pointers.
Their use focus on efficiency. The views live as long as the field: its component snapshot is set only in the constructor, so the pointers stay valid until the field is destroyed. Do not use them after that.
Implements marenv::wave::WaveField.
|
overridevirtual |
Getter for a copy of wave component specifications.
Implements marenv::wave::WaveField.
|
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.
|
overridevirtual |
Reimplemented from marenv::wave::WaveField.
|
overridevirtual |
Getter for the name of the wave spectrum used for the realisation of the waves.
Implements marenv::wave::WaveField.
|
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.
|
overridevirtual |
Getter for the name of the wave theory used for the realisation of the waves.
Implements marenv::wave::WaveField.