template <class T, Policy P>
class vtb::core::Linear_velocity_potential_solver

Uses formulae from linear wavy theory.

Base classes
Methods
  • solve(const Grid< T, 4 > & grid_tzxy, const Array< T, 2 > & wavy_surface) -> voidvirtual

    Calculate velocity potential for each grid point.

    grid_tzxy
    Four-dimensional grid for each point of which velocity potential is calculated. This grid includes two-dimensional wavy surface grid for each point of which wavy surface elevation is given.

    wavy_surface
    two-dimensional surface elevation array

    Date
    2018-08-10
    Author
    Ivan Gankevich
  • window_function(const Grid< T, 2 > & wngrid, const T z, Array2< T > & result) -> void
  • Linear_velocity_potential_solver()
  • window_function(const Grid< T, 2 > & wngrid, const T z, Array2< T > & result) -> void

    Computes window (first) function .

    • For infinite depth the formula is
    • For finite depth the formula is

    Date
    2018-08-14
    Author
    Ivan Gankevich
  • solve(const Grid< T, 4 > & grid_tzxy, const Array< T, 2 > & wavy_surface) -> voidvirtual

    Computes velocity potential . The integration is implemented using FFT and is done over wave number range which is computed directly from the wavy surface.The main formula for velocity potential is where is window function and is second function. For details see documentation of the corresponding methods.

    Date
    2018-08-14
    Author
    Ivan Gankevich
    See
    window_function
    See
    second_function
  • ~Linear_velocity_potential_solver()
  • Linear_velocity_potential_solver()
template <class T>
class vtb::core::Linear_velocity_potential_solver_base

Base class for linear velocity potential solver.

Base classes
Derived classes
Methods
  • store_past_values(const Array< T, 2 > & zeta, const Grid< T, 2 > & grid) -> voidprotected
  • second_function(const Grid< T, 4 > & grid_tzxy, Array< C, 2 > & result) -> void

    Computes second function.

    • For large-amplitude waves the second function is computed as where .
    • For small-amplitude waves the second function is computed as

    Date
    2018-09-15
    Author
    Ivan Gankevich
template <class T, int N>
class vtb::core::Velocity_potential_solver

Base class for all velocity potential solvers.

Fields
  • Grid< T, 2 > _elevation_grid
  • Array< T, 3 > _elevation
  • Array< T, 3 > _potential
Methods
  • clear() -> void
  • operator()(const Grid< T, 4 > & grid_tzxy, const Array< T, 2 > & wavy_surface) -> void
  • solve(const Grid< T, 4 > & grid_tzxy, const Array< T, 2 > & wavy_surface) -> voidvirtual

    Calculate velocity potential for each grid point.

    grid_tzxy
    Four-dimensional grid for each point of which velocity potential is calculated. This grid includes two-dimensional wavy surface grid for each point of which wavy surface elevation is given.

    wavy_surface
    two-dimensional surface elevation array

    Date
    2018-08-10
    Author
    Ivan Gankevich
  • elevation() const -> const Array< T, 3 > &

    Get three-dimnesional wavy surface elevation field that includes past values.

  • potential() const -> const Array< T, 3 > &

    Get velocity potential field.

  • assumptions() const -> const Assumptions &
  • assumptions(Assumptions rhs) -> void
  • wave_number_grid() const -> const Grid< T, 2 > &
  • wave_number_grid(const Grid< T, 2 > & rhs) -> void
  • depth(T rhs) -> void

    Set water depth.

  • depth() const -> T

    Get water depth.

  • ~Velocity_potential_solver()virtual
  • Velocity_potential_solver()
template <class T, int N, Policy P>
make_velocity_potential_solver() -> std::unique_ptr< Velocity_potential_solver< T, N > >