|
Virtual Testbed
Ship dynamics simulator for extreme conditions
|
Core components. More...
Classes | |
| class | Amplitude |
| class | ANLT_wind_solver |
| class | ANLT_wind_solver_opencl |
| class | ANLT_wind_solver_openmp |
| class | AR_wavy_surface_generator |
| Based on autoregerssive model. More... | |
| class | ARMA_wavy_surface_generator_base |
| class | ARMA_wind_solver |
| class | Assumptions |
| class | Autocovariance_matrix_generator |
| Autocovariate matrix generator that reduces the size of ACF to match AR model order. More... | |
| class | Autocovariance_matrix_generator< T, 3 > |
| class | Autocovariance_matrix_generator< T, 4 > |
| class | Barycentric_function |
| class | Bisection |
| class | Bisection< T, 1 > |
| class | Calm_sea_generator |
| Calm sea generator. More... | |
| class | Chirp_Z_transform |
| class | Choi_yule_walker_solver |
| Computes AR model coefficients using an order-recursvive method from [Choi1999]. More... | |
| class | Circular_buffer |
| Fixed-size circular buffer. Used as time series storage. More... | |
| class | Compartment |
| class | Compartment_array |
| class | Convolution |
| Multidimensional convolution based on Fourier transform. More... | |
| class | Direction |
| class | Euler_solver |
| Euler initial value problem solver. More... | |
| class | Fixed_point_iteration_yule_walker_solver |
| Multi-dimensional solver that determines MA model coefficients from ACF. More... | |
| class | Flooding_solver |
| class | Fourier_transform |
| \(N\)-dimensional Fourier transform. More... | |
| class | Fourier_transform_base |
| Base class for all Fourier transforms. More... | |
| class | Frequency |
| class | Gauss_yule_walker_solver |
| class | Gerstner_solver |
| Trochoidal irrotational waves solves named after Gerstner. More... | |
| class | Gerstner_solver_opencl |
| class | Gerstner_solver_openmp |
| class | Grid |
| A region defined by start and end index and lower and upper bound for each dimension. More... | |
| class | Grid_interpolation |
| class | Hull |
| class | Invalid_ARMA_process |
| class | Irregular_wave_surface_generator |
| Wavy surface generator that produces elevation grid for multiple waves. More... | |
| struct | is_complex |
| struct | is_complex< std::complex< T > > |
| class | Length |
| class | Linear_function |
| class | Linear_function_irregular |
| Nearest neighbour weighted interpolation for 3-d fields. More... | |
| class | Linear_interpolation |
| class | Linear_velocity_potential_solver |
| Uses formulae from linear wavy theory. More... | |
| class | Linear_velocity_potential_solver_base |
| Base class for linear velocity potential solver. More... | |
| class | Linear_velocity_potential_solver_opencl |
| class | Linear_wave |
| class | LIPO_solver |
| Multi-dimensional optimisation of non-convex functions. More... | |
| class | MA_wavy_surface_generator |
| Based on moving-average model. More... | |
| struct | Mass |
| Mass attached to specified point in space. More... | |
| class | Mass_array |
| class | No_wave |
| Calm sea. More... | |
| class | Plain_wave_generator |
| Wavy surface generator that produces elevation grid for individual wave. More... | |
| class | Plain_wave_generator_opencl |
| class | Plain_wave_generator_openmp |
| class | Polynomial |
| class | Propagating_cosine_wave |
| Propagating plain wave which has cosine shape. More... | |
| class | Propagating_stokes_wave |
| Propagating third-order Stokes wave. More... | |
| class | Propeller |
| class | Propulsor |
| class | Radial_basis_function |
| Radial basis function interpolation. More... | |
| class | RKF45 |
| Runge—Khutta—Fehlberg initial value problem solver. More... | |
| class | Rudder |
| class | Shallow_water_wave |
| class | Ship |
| Rigid ship with a mass and translational and angular velocity. More... | |
| class | Ship_hull_panel |
| Triangular ship hull panel (face). More... | |
| class | Ship_motion_equation |
| System of ordinary differential equations of translational and angular ship motion. More... | |
| class | Ship_motion_solver |
| class | Standing_cosine_wave |
| Standing plain wave which has cosine shape. More... | |
| class | Statistics |
| class | Statistics_base |
| class | Testbed |
| Main class for interacting with virtual testbed. More... | |
| class | Velocity_potential_solver |
| Base class for all velocity potential solvers. More... | |
| class | Volume |
| class | Wave_base |
| Base class for water waves. More... | |
| struct | Wave_half |
| A half of the wave with length, number and height of the full wave. More... | |
| class | Wave_pressure_solver |
| Base class for all wave pressure solvers. More... | |
| class | Wave_pressure_solver_opencl |
| class | Wave_pressure_solver_openmp |
| struct | Wave_statistics |
| class | Wave_table |
| class | Wave_table< std::complex< T > > |
| class | Wave_table_base |
| class | Wavy_surface_generator |
| Base class for wavy surface generators. More... | |
| class | Wetted_surface_solver |
| class | Wetted_surface_solver_opencl |
| class | Wetted_surface_solver_openmp |
| class | Wind_generator |
| class | Wind_param |
| class | Yule_walker_solver |
Typedefs | |
| typedef ::vtb::base::bstream | bstream |
| template<class T , int N> | |
| using | Vector = blitz::TinyVector< T, N > |
| template<class T > | |
| using | Vector1 = Vector< T, 1 > |
| template<class T > | |
| using | Vector2 = Vector< T, 2 > |
| template<class T > | |
| using | Vector3 = Vector< T, 3 > |
| template<class T > | |
| using | Vector4 = Vector< T, 4 > |
| using | int1 = Vector< int, 1 > |
| using | int2 = Vector< int, 2 > |
| using | int3 = Vector< int, 3 > |
| using | int4 = Vector< int, 4 > |
| template<class T , int N> | |
| using | Array = ::blitz::Array< T, N > |
| template<class T > | |
| using | Array1 = Array< T, 1 > |
| template<class T > | |
| using | Array2 = Array< T, 2 > |
| template<class T > | |
| using | Array3 = Array< T, 3 > |
| template<class T > | |
| using | Array4 = Array< T, 4 > |
| using | rect2 = blitz::RectDomain< 2 > |
| using | rect3 = blitz::RectDomain< 3 > |
| using | rect4 = blitz::RectDomain< 4 > |
| using | mask_array = std::vector< bool > |
| template<class T , int N> | |
| using | Wave_statistics_vector = blitz::TinyVector< Wave_statistics< T >, N > |
Enumerations | |
| enum | Policy { OpenMP, OpenCL } |
| enum | Solver_type { regular_solver, gerstner_solver } |
Functions | |
| template<class T , Policy P> | |
| std::unique_ptr< ANLT_wind_solver< T > > | make_anlt_wind_solver () |
| template<class T > | |
| std::unique_ptr< T > | copy (const std::unique_ptr< T > &ptr) |
| template<class T , int N> | |
| void | validate_process (blitz::Array< T, N > phi) |
| Check AR (MA) process stationarity (invertibility). More... | |
| template<class T , int N> | |
| blitz::Array< T, N > | auto_covariance (const blitz::Array< T, N > &rhs) |
| Computes autocovariance function of three-dimensional field. More... | |
| template<class T , int N> | |
| blitz::Array< T, N > | covariance (blitz::Array< T, N > lhs, blitz::Array< T, N > rhs, Chirp_Z_transform< std::complex< T >, N > &fft) |
| template<class T , int N> | |
| blitz::Array< T, N > | covariance (blitz::Array< T, N > lhs, blitz::Array< T, N > rhs) |
| template<class T , int N> | |
| blitz::Array< T, N > | correlation (blitz::Array< T, N > lhs, blitz::Array< T, N > rhs, Chirp_Z_transform< std::complex< T >, N > &fft) |
| template<class T , int N> | |
| blitz::Array< T, N > | correlation (blitz::Array< T, N > lhs, blitz::Array< T, N > rhs) |
| template<class T , int N, class F > | |
| blitz::TinyVector< T, N > | bisection (blitz::TinyVector< T, N > a, blitz::TinyVector< T, N > b, F func, const blitz::TinyVector< T, N > &arg_eps, const blitz::TinyVector< T, N > &func_eps, int max_iter) |
| template<class T , class F > | |
| T | bisection (T a, T b, F func, T arg_eps, T func_eps, int max_iter) |
| One-dimensional bisection. More... | |
| template<class T , int N> | |
| std::unique_ptr< Wavy_surface_generator< T, N > > | make_calm_sea_generator () |
| template<class T > | |
| void | swap (Circular_buffer< T > &lhs, Circular_buffer< T > &rhs) |
| template<class T > | |
| std::ostream & | operator<< (std::ostream &out, const Compartment< T > &rhs) |
| template<class T , int N> | |
| void | derivative (Array< T, N > func, const T delta, int dimension, Array< T, N > &result) |
| template<class T , int N> | |
| Array< T, N > | derivative (Array< T, N > func, const T delta, int dimension) |
| template<class T , int N> | |
| T | derivative (const blitz::TinyVector< int, N > &idx, int idx_min, int idx_max, int dimension, const T delta, const Array< T, N > &func) |
| template<class T , int N> | |
| T | derivative (const blitz::TinyVector< int, N > &idx, int dimension, const T delta, const Array< T, N > &func) |
| template<class T , int N> | |
| blitz::TinyVector< T, N > | gradient (const blitz::TinyVector< int, N > &idx, const blitz::TinyVector< T, N > &delta, const Array< T, N > &func) |
| template<class T > | |
| blitz::TinyVector< T, 4 > | gradient (const blitz::TinyVector< int, 4 > &idx, const blitz::TinyVector< T, 4 > &delta, const Array< T, 4 > &func) |
| template<class T , int N> | |
| void | fourier_transform (blitz::Array< T, N > &x, int sign, Wave_table< T > waves[N]) |
| template<class T , int N, Policy P> | |
| std::unique_ptr< Gerstner_solver< T, N > > | make_gerstner_solver () |
| template<class T , int N> | |
| std::unique_ptr< Gerstner_solver< T, N > > | make_gerstner_solver (Policy policy) |
| template<class T > | |
| blitz::Array< T, 1 > | generate (const Grid< T, 1 > &grid) |
| template<class T , int N> | |
| blitz::TinyVector< T, N > | clamp (const blitz::TinyVector< T, N > x, const Grid< T, N > &grid) |
| template<class T , int N, class Function > | |
| void | generate (const Grid< T, N > &grid, blitz::Array< T, N > &result, Function func) |
| template<class T , int N, class Function > | |
| blitz::Array< T, N > | generate (const Grid< T, N > &grid, Function func) |
| template<class T , int N> | |
| Frequency< T > | linear_wave_angular_frequency (const blitz::TinyVector< T, N > &k) |
| template<class T , int N> | |
| Frequency< T > | linear_wave_angular_frequency (Length< T > length, Direction< T > angle) |
| template<class T , class ... Args> | |
| Mass_array< T > | flatten (const Args &... args) |
| template<class T > | |
| bool | is_positive_infinity (T x) noexcept |
| template<class T > | |
| bool | is_negative_infinity (T x) noexcept |
| template<class T , int N> | |
| T | scale (blitz::Array< T, N > x) |
| Return the difference between largest and smallest value in the array. More... | |
| template<class T > | |
| T | fma (T a, T x, T b) |
| float | pow2 (float x) |
| double | pow2 (double x) |
| template<class T > | |
| std::complex< T > | pow2 (const std::complex< T > &x) |
| template<class T , int N> | |
| std::unique_ptr< Wavy_surface_generator< T, N > > | make_plain_wave_generator_openmp (std::any wave) |
| template<class T , int N> | |
| std::unique_ptr< Wavy_surface_generator< T, N > > | make_plain_wave_generator_opencl (std::any wave) |
| template<class T , int N, class Wave > | |
| void | generate_wave (const Grid< T, N > &grid, Array< T, N > &result, Wave wave) |
Generate wavy surface for specified wave and spatio-temporal grid. More... | |
| template<class T , int N, class Wave > | |
| Array< T, N > | generate_wave (const Grid< T, N > &grid, Wave wave) |
| template<class T , int N, class Wave , Policy P> | |
| std::unique_ptr< Plain_wave_generator< T, N, Wave, P > > | make_plain_wave_generator (const Wave &wave) |
| template<class T , int N, class Wave , Policy P> | |
| std::unique_ptr< Plain_wave_generator< T, N, Wave, P > > | make_plain_wave_generator () |
| template<class T , int N> | |
| std::unique_ptr< Wavy_surface_generator< T, N > > | make_plain_wave_generator (std::any wave, Policy policy) |
| template<class T > | |
| void | swap (Polynomial< T > &lhs, Polynomial< T > &rhs) |
| template<class T > | |
| auto | schur_transform (const Polynomial< T > &p) -> typename std::enable_if< is_complex< T >::value, Polynomial< T >>::type |
| Schur transform for polynomials with complex coefficients. More... | |
| template<class T > | |
| int | num_roots_inside_unit_disk (Polynomial< T > p) |
| Finds the number of polynomial roots inside the unit disk. More... | |
| template<class T , int N> | |
| Frequency< T > | shallow_water_wave_angular_frequency (const blitz::TinyVector< T, N > &k, T depth) |
| template<class T , int N> | |
| Frequency< T > | shallow_water_wave_angular_frequency (Length< T > length, Direction< T > angle, T depth) |
| template<class T > | |
| vtb::geometry::Basis< T, 3 > | angular_velocity_matrix_zyx (const Vector< T, 3 > &sin, const Vector< T, 3 > &cos) |
| template<class T > | |
| vtb::geometry::Basis< T, 3 > | angular_velocity_matrix_zyx (const Vector< T, 3 > &euler_angles) |
| A matrix that transforms Euler angles time derivatives to angular velocity. More... | |
| template<class T > | |
| vtb::geometry::Basis< T, 3 > | angular_velocity_matrix_xyz (const Vector< T, 3 > &sin, const Vector< T, 3 > &cos) |
| template<class T > | |
| vtb::geometry::Basis< T, 3 > | angular_velocity_matrix_xyz (const Vector< T, 3 > &euler_angles) |
| template<class T > | |
| blitz::TinyMatrix< T, 3, 4 > | angular_velocity_matrix_quaternion (const vtb::geometry::Quaternion< T > &q) |
| template<class T > | |
| vtb::geometry::Basis< T, 3 > | euler_angles_matrix_zyx (const Vector< T, 3 > &sin, const Vector< T, 3 > &cos, const T tan_theta) |
| template<class T > | |
| vtb::geometry::Basis< T, 3 > | euler_angles_matrix_zyx (const Vector< T, 3 > &euler_angles) |
| A matrix that transforms angular velocity to Euler angles time derivatives. More... | |
| template<class T > | |
| vtb::geometry::Basis< T, 3 > | euler_angles_matrix_xyz (const Vector< T, 3 > &sin, const Vector< T, 3 > &cos, const T tan_theta) |
| template<class T > | |
| vtb::geometry::Basis< T, 3 > | euler_angles_matrix_xyz (const Vector< T, 3 > &euler_angles) |
| template<class T > | |
| Vector< T, 3 > | euler_angles_residual_vector_zyx (const Vector< T, 3 > &sin, const Vector< T, 3 > &cos, const T tan_theta, const Vector< T, 3 > &angvelocity) |
| template<class T > | |
| Vector< T, 3 > | euler_angles_residual_vector_xyz (const Vector< T, 3 > &sin, const Vector< T, 3 > &cos, const T tan_theta, const Vector< T, 3 > &angvelocity) |
| template<class T > | |
| blitz::TinyMatrix< T, 4, 3 > | quaternion_matrix (const vtb::geometry::Quaternion< T > &q) |
| template<class T > | |
| std::ostream & | operator<< (std::ostream &out, const Ship< T > &rhs) |
| template<class T > | |
| bstream & | operator<< (bstream &out, const Ship< T > &rhs) |
| template<class T > | |
| bstream & | operator>> (bstream &in, Ship< T > &rhs) |
| template<class T > | |
| Grid< T, 3 > | clamp (const Grid< T, 3 > &grid_xyz, const std::vector< Ship_hull_panel< T, 3 >> &panels) |
| Determine minimum and maximum indices for calculating derivatives using panels and slice velocity potential field. | |
| template<class T , int N> | |
| Frequency< T > | stokes_wave_angular_frequency (const blitz::TinyVector< T, N > &k, Amplitude< T > amplitude) |
| template<class T , int N, Policy P> | |
| std::unique_ptr< Velocity_potential_solver< T, N > > | make_velocity_potential_solver () |
| template<class T , int N> | |
| blitz::TinyVector< T, N > | wave_number (Length< T > length, Direction< T > angle) |
| template<class T , int N, class Wave > | |
| T | courant_number_sum (const Wave &wave, const Grid< T, N > &grid) |
| template<class T , int N, class Wave > | |
| T | courant_number (const Wave &wave, const Grid< T, N > &grid) |
| template<class T > | |
| std::ostream & | operator<< (std::ostream &out, const Wave_statistics< T > &rhs) |
| template<class T > | |
| std::ostream & | operator<< (std::ostream &out, const Wave_half< T > &rhs) |
| template<class T > | |
| std::vector< blitz::TinyVector< T, 2 > > | find_extrema (blitz::Array< T, 1 > func, const Grid< T, 1 > &grid) |
| Find coordinates of minima and maxima of a function. More... | |
| template<class T > | |
| std::vector< Wave_half< T > > | find_wave_halves (const std::vector< blitz::TinyVector< T, 2 >> &extrema) |
| Find wave halves from function extrema computed previously. More... | |
| template<class T > | |
| void | find_wave_number_range (const std::vector< Wave_half< T >> &halves, T &min_wave_number, T &max_wave_number) |
| Find minimum and maximum wave number from wave halves computed previously. More... | |
| template<class T > | |
| Grid< T, 1 > | find_wave_number_range (const std::vector< Wave_half< T >> &halves) |
| template<class T , int N> | |
| Grid< T, N > | wave_number_grid (const Wave_statistics_vector< T, N > &waves) |
| template<class T > | |
| Wave_statistics_vector< T, 2 > | wave_statistics (blitz::Array< T, 2 > surface, const Grid< T, 2 > &grid) |
| template<class T > | |
| Wave_statistics< T > | temporal_wave_statistics (blitz::Array< T, 1 > surface, const Grid< T, 1 > &grid) |
| template<class T > | |
| Grid< T, 2 > | find_wave_number_range (blitz::Array< T, 2 > surface, const Grid< T, 2 > &grid) |
| Find minimum and maximum wave number for two-dimensional surface. More... | |
| template<class T , Policy P> | |
| std::unique_ptr< Wave_pressure_solver< T > > | make_wave_pressure_solver () |
| template<class T , int N, Policy P> | |
| std::unique_ptr< Wetted_surface_solver< T, N > > | make_wetted_surface_solver () |
| template<class T > | |
| blitz::TinyVector< int, 3 > | chop_right (const blitz::Array< T, 3 > &rhs, T eps) |
| template<class T > | |
| blitz::TinyVector< int, 4 > | chop_right (const blitz::Array< T, 4 > &rhs, T eps) |
| template<class T , int N> | |
| T | autoregression_white_noise_variance (const blitz::Array< T, N > &acf, const blitz::Array< T, N > &phi) |
| template<class T , int N> | |
| T | moving_average_white_noise_variance (const blitz::Array< T, N > &acf, const blitz::Array< T, N > &theta) |
| template<class T , int N> | |
| T | acf_variance (const blitz::Array< T, N > &acf) |
Variables | |
| constexpr const Policy | default_policy = Policy::OpenMP |
Core components.
|
inline |
A matrix that transforms Euler angles time derivatives to angular velocity.
Definition at line 43 of file core/ship.hh.
| blitz::Array< T, N > vtb::core::auto_covariance | ( | const blitz::Array< T, N > & | rhs | ) |
Computes autocovariance function of three-dimensional field.
| [in] | rhs | symmetric three-dimensional field |
\[ \gamma_{i,j,k} = \frac{1}{n_1 n_2 n_3} \sum\limits_{i_1=0}^{n_1-1} \sum\limits_{i_1=0}^{n_2-1} \sum\limits_{k_1=0}^{n_3-1} \zeta_{i_1,j_1,k_1} \zeta_{(i_1+i) \bmod n_1,(j_1+i) \bmod n_2,(k_1+k) \bmod n_3} \]
Assumes, that the field is symmetric and periodic in each dimension. Uses fast Fourier transforms to speed up the computation:\[ \gamma = \mathcal{F}^{-1}\left\{ \left| \mathcal{F}\left\{\zeta\right\} \right|^2 \right\}. \]
| T vtb::core::bisection | ( | T | a, |
| T | b, | ||
| F | func, | ||
| T | arg_eps, | ||
| T | func_eps, | ||
| int | max_iter | ||
| ) |
One-dimensional bisection.
| [in] | a | lower bound |
| [in] | b | upper bound |
| [in] | func | objective function |
| [in] | max_iter | maximum number of iterations |
| [in] | arg_eps | argument precision |
| [in] | func_eps | return value precision |
Definition at line 97 of file bisection.hh.
| T vtb::core::derivative | ( | const blitz::TinyVector< int, N > & | idx, |
| int | idx_min, | ||
| int | idx_max, | ||
| int | dimension, | ||
| const T | delta, | ||
| const Array< T, N > & | func | ||
| ) |
\[ f'_i = \frac{-f_{i+2} + 4f_{i+1} - 3f_{i}}{2\Delta f} \]
\[ f'_i = \frac{3f_{i} - 4f_{i-1} + f_{i-2}}{2\Delta f} \]
\[ f'_i = \frac{f_{i+1} - f_{i-1}}{2\Delta f} \]
Definition at line 29 of file core/derivative.hh.
|
inline |
A matrix that transforms angular velocity to Euler angles time derivatives.
Definition at line 94 of file core/ship.hh.
| std::vector< blitz::TinyVector< T, 2 > > vtb::core::find_extrema | ( | blitz::Array< T, 1 > | func, |
| const Grid< T, 1 > & | grid | ||
| ) |
Find coordinates of minima and maxima of a function.
Uses parabola to find precise location of the peak.
Definition at line 48 of file wave_numbers.cc.
References vtb::core::Grid< T, N >::delta().
| std::vector<Wave_half<T> > vtb::core::find_wave_halves | ( | const std::vector< blitz::TinyVector< T, 2 >> & | extrema | ) |
| void vtb::core::find_wave_number_range | ( | const std::vector< Wave_half< T >> & | halves, |
| T & | min_wave_number, | ||
| T & | max_wave_number | ||
| ) |
Find minimum and maximum wave number from wave halves computed previously.
Definition at line 114 of file wave_numbers.cc.
| Grid<T,2> vtb::core::find_wave_number_range | ( | blitz::Array< T, 2 > | surface, |
| const Grid< T, 2 > & | grid | ||
| ) |
Find minimum and maximum wave number for two-dimensional surface.
|
inline |
Generate wavy surface for specified wave and spatio-temporal grid.
| Wave | a function that returns wavy surface elevation for given point |
Definition at line 33 of file plain_wave_generator.hh.
References vtb::core::Grid< T, N >::begin(), vtb::core::Grid< T, N >::delta(), vtb::core::Grid< T, N >::end(), and vtb::core::Grid< T, N >::shape().
| T vtb::core::moving_average_white_noise_variance | ( | const blitz::Array< T, N > & | acf, |
| const blitz::Array< T, N > & | theta | ||
| ) |
Compute white noise variance via the formula
\[ \sigma_\alpha^2 = \frac{\gamma_0}{ \sum\limits_{i=0}^{n_1-1} \sum\limits_{i=0}^{n_2-1} \sum\limits_{k=0}^{n_3-1} \theta_{i,j,k}^2 } \]
assuming \(\theta_0 \equiv -1\).
Definition at line 47 of file yule_walker_solver.hh.
Referenced by vtb::core::Fixed_point_iteration_yule_walker_solver< T, N >::solve().
|
inline |
Finds the number of polynomial roots inside the unit disk.
Definition at line 286 of file polynomial.hh.
Referenced by validate_process().
|
inline |
Return the difference between largest and smallest value in the array.
Definition at line 35 of file core/math.hh.
Referenced by vtb::core::Gerstner_solver_openmp< T >::generate_field().
|
inline |
Schur transform for polynomials with complex coefficients.
Schur transform for polynomials with real coefficients.
Definition at line 243 of file polynomial.hh.
| void vtb::core::validate_process | ( | blitz::Array< T, N > | phi | ) |
Check AR (MA) process stationarity (invertibility).
Definition at line 64 of file arma.cc.
References num_roots_inside_unit_disk().
1.8.15