A class to manage sampling depths from a wave field. More...
#include <Wavefield.hh>
Static Public Member Functions | |
static double | ComputeDepthDirectly (const WaveParameters &_waveParams, const ignition::math::Vector3d &_point, double time, double time_init=0) |
Compute the depth at a point directly. More... | |
static double | ComputeDepthSimply (const WaveParameters &_waveParams, const ignition::math::Vector3d &_point, double time, double time_init=0) |
A class to manage sampling depths from a wave field.
Definition at line 197 of file Wavefield.hh.
|
static |
Compute the depth at a point directly.
(no sampling or interpolation). This method solves for (x, y) that when input into the Gerstner wave function gives the coordinates of the supplied parameter _point (_point.x(), _point.y()), and also computes the wave height pz at this point. The depth h = pz - point.z(). This is a numerical method that uses a multi-variate Newton solver to solve the two dimensional non-linear system. In general it is not as fast as sampling from a discretised wave field with an efficient line intersection algorithm.
[in] | _waveParams | Gerstner wave parameters. |
[in] | _point | The point at which we want the depth. |
Definition at line 539 of file Wavefield.cc.
|
static |
A simpler version of determining wave height at a point. This method enforces that q (steepness) = 0 which allows us to caculate the wave height exactly for a given 2D point without the need to interatively solve for the position/height.
Definition at line 514 of file Wavefield.cc.