The interface for an representing waves.
#include <WaveField.h>
|
|
virtual | ~WaveField ()=default |
| | Virtual destructor.
|
| |
| virtual std::string | SpectrumName () const =0 |
| |
| virtual std::string | WaveTheoryName () const =0 |
| |
| 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 InsecureDatapointers | GetWaveComponents () const =0 |
| |
| virtual marenv::wave::WaveComponentData | GetWaveComponentsCopy () const =0 |
| |
| virtual marenv::wave::WaveComponentData | GetWaveComponentsCopy (double time, size_t maxComponents=0) const |
| |
| virtual double | MaxWaveElevation () const |
| |
| virtual void | BlendInPlace (WaveComponentData &other, double alpha)=0 |
| |
|
|
| WaveField ()=default |
| | Constructor.
|
| |
◆ BlendInPlace()
| virtual void marenv::wave::WaveField::BlendInPlace |
( |
WaveComponentData & |
other, |
|
|
double |
alpha |
|
) |
| |
|
pure virtual |
◆ ComputeDynamicPressure()
| virtual marenv::Status marenv::wave::WaveField::ComputeDynamicPressure |
( |
double |
time, |
|
|
const double |
pos[3], |
|
|
double & |
pressureOut |
|
) |
| |
|
pure virtual |
◆ ComputeParticleAcceleration()
| virtual marenv::Status marenv::wave::WaveField::ComputeParticleAcceleration |
( |
double |
time, |
|
|
const double |
pos[3], |
|
|
double |
accOut[3] |
|
) |
| |
|
pure virtual |
◆ ComputeParticleVelocity()
| virtual marenv::Status marenv::wave::WaveField::ComputeParticleVelocity |
( |
double |
time, |
|
|
const double |
pos[3], |
|
|
double |
velOut[3] |
|
) |
| |
|
pure virtual |
◆ ComputePointQuery()
| virtual marenv::Status marenv::wave::WaveField::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 |
|
) |
| |
|
pure virtual |
◆ ComputeSurfaceElevation()
| virtual marenv::Status marenv::wave::WaveField::ComputeSurfaceElevation |
( |
double |
time, |
|
|
const double |
pos[2], |
|
|
double & |
elevationOut |
|
) |
| |
|
pure virtual |
◆ ComputeSurfaceUnitNormal()
| virtual marenv::Status marenv::wave::WaveField::ComputeSurfaceUnitNormal |
( |
double |
time, |
|
|
const double |
pos[2], |
|
|
double |
unitNormalOut[3] |
|
) |
| |
|
pure virtual |
◆ ComputeTotalPressure()
| virtual marenv::Status marenv::wave::WaveField::ComputeTotalPressure |
( |
double |
time, |
|
|
const double |
pos[3], |
|
|
double & |
pressureOut |
|
) |
| |
|
pure virtual |
◆ GetWaveComponents()
◆ GetWaveComponentsCopy() [1/2]
◆ GetWaveComponentsCopy() [2/2]
Getter for a copy of wave component specifications at a given time.
- Parameters
-
| [in] | time | Simulation time used to evaluate the interpolation factor. |
| [in] | maxComponents | Maximum number of components to return (0 = all). |
- Returns
- A structure with wave component data.
During a transition this may return the merged components from both source and destination fields with amplitudes scaled by the interpolation factor. The default implementation ignores time and delegates to the time-independent overload. When limited, the components with the largest amplitudes are kept.
◆ MaxWaveElevation()
| virtual double marenv::wave::WaveField::MaxWaveElevation |
( |
| ) |
const |
|
virtual |
Returns an upper bound of |elevation| at every position and time (owner ruling R66).
- Returns
- B >= |eta(t, x, y)| for the wave components published at the call; a later BlendInPlace() voids it. A point at depth z > B + h (NED, z down), with h the half-size of a body around it, is submerged whatever the waves, so its wave elevation need not be evaluated.
The linear theories (AiryWavesScalar, AiryWavesSimd, GerstnerWaves) return the sum of the component amplitudes |zeta_A|, with a relative margin of 1e-10 for rounding; the Gerstner surface is the same sum at the Lagrangian point. NullWaveField returns 0. The default, for a wave field that cannot tell (an imported or gridded surface), is +infinity, which never skips an evaluation. Cheap: one pass over the components.
0 means no waves: no elevation, particle velocity or particle acceleration anywhere, so a caller may skip evaluating them (MENV-0064). A wave field that returns 0 must give zero for all three.
Reimplemented in marenv::wave::LinearWaveTheory, and marenv::wave::NullWaveField.
◆ SpectrumName()
| virtual std::string marenv::wave::WaveField::SpectrumName |
( |
| ) |
const |
|
pure virtual |
◆ WaveTheoryName()
| virtual std::string marenv::wave::WaveField::WaveTheoryName |
( |
| ) |
const |
|
pure virtual |
The documentation for this class was generated from the following file:
- webfhsim/reloadrepos/marenv/include/marenv/wave/WaveField.h