FEDEM Solver
R8.0
Source code of the dynamics solver
|
Global functions callable from C++ code. More...
Functions/Subroutines | |
subroutine | initwavefuncfromfile (fName, nWave, rSeed, rfunc, ierr) |
Initializes parameters for a wave function from given file. More... | |
subroutine | initwavefuncspectrum (iopW, nWave, nDir, sprExp, rSeed, rfunc, ierr) |
Initializes parameters for a wave function from a wave spectrum. More... | |
subroutine | initnonlinwavefunc (iopW, g, D, RFUNC, stat) |
Initializes parameters for a non-linear wave function. More... | |
subroutine | initembeddedwave (iopW, nWave, rSeed, g, D, ifunc, rfunc, ierr) |
Initializes parameters for an embedded non-linear wave function. More... | |
real(dp) function | waveprofile (iopW, ldi, ldr, nWave, nDir, ifunc, rfunc, g, d, x, t) |
Evaluates a wave profile function. More... | |
subroutine | evalwave (iopW, ldi, ldr, nWave, nDir, ifunc, rfunc, g, d, x, t, h, v, a) |
Evaluates a wave profile. More... | |
Global functions callable from C++ code.
This file contains global function wrappers of subroutines from the wavefunctionsmodule, such that they can be invoked from C++ or python.
subroutine evalwave | ( | integer, intent(in) | iopW, |
integer, intent(in) | ldi, | ||
integer, intent(in) | ldr, | ||
integer, intent(in) | nWave, | ||
nDir, | |||
integer, dimension(ldi), intent(in) | ifunc, | ||
real(dp), dimension(ldr,nwave,ndir), intent(in) | rfunc, | ||
real(dp), intent(in) | g, | ||
real(dp), intent(in) | d, | ||
real(dp), dimension(3), intent(in) | x, | ||
real(dp), intent(in) | t, | ||
real(dp), intent(out) | h, | ||
real(dp), dimension(3), intent(out) | v, | ||
real(dp), dimension(3), intent(out) | a | ||
) |
Evaluates a wave profile.
[in] | iopW | Wave model option |
[in] | ldi | Number of integer parameters |
[in] | ldr | Number of real parameters per wave component |
[in] | nWave | Number of wave components |
[in] | nDir | Number of wave directions |
[in] | ifunc | Integer wave function parameters |
[in] | rfunc | Real wave function parameters |
[in] | g | Gravity constant |
[in] | d | Water depth |
[in] | x | Position to evaluate wave profile at |
[in] | t | Time to evaluate wave profile at |
[out] | h | Wave elevation |
[out] | v | Water particle velocity |
[out] | a | Water particle acceleration |
subroutine initembeddedwave | ( | integer, intent(in) | iopW, |
integer, intent(in) | nWave, | ||
integer, intent(in) | rSeed, | ||
real(dp), intent(in) | g, | ||
real(dp), intent(in) | D, | ||
integer, dimension(*), intent(inout) | ifunc, | ||
real(dp), dimension(*), intent(inout) | rfunc, | ||
integer, intent(out) | ierr | ||
) |
Initializes parameters for an embedded non-linear wave function.
[in] | iopW | Wave model option |
[in] | nWave | Number of wave components |
[in] | rSeed | Seed for (pseudo-)random phase shift |
[in] | g | Gravity constant |
[in] | D | Water depth |
ifunc | Integer wave function parameters | |
rfunc | Real wave function parameters | |
[out] | ierr | Error flag |
subroutine initnonlinwavefunc | ( | integer, intent(in) | iopW, |
real(dp), intent(in) | g, | ||
real(dp), intent(in) | D, | ||
real(dp), dimension(*), intent(inout) | RFUNC, | ||
integer, intent(out) | stat | ||
) |
Initializes parameters for a non-linear wave function.
[in] | iopW | Wave model option |
[in] | g | Gravity constant |
[in] | D | Water depth |
RFUNC | Wave function parameters | |
[out] | stat | Error flag |
subroutine initwavefuncfromfile | ( | character(len=*), intent(in) | fName, |
integer, intent(in) | nWave, | ||
integer, intent(in) | rSeed, | ||
real(dp), dimension(3,nwave), intent(out) | rfunc, | ||
integer, intent(out) | ierr | ||
) |
Initializes parameters for a wave function from given file.
[in] | fName | Name of file to read parameters from |
[in] | nWave | Number of wave components to read |
[in] | rSeed | Seed for (pseudo-)random phase shift |
[out] | rfunc | Wave function parameters (amplitude, frequency, ...) |
[out] | ierr | Error flag |
subroutine initwavefuncspectrum | ( | integer, intent(in) | iopW, |
integer, intent(in) | nWave, | ||
integer, intent(in) | nDir, | ||
integer, intent(in) | sprExp, | ||
integer, intent(in) | rSeed, | ||
real(dp), dimension(3,nwave*ndir), intent(inout) | rfunc, | ||
integer, intent(out) | ierr | ||
) |
Initializes parameters for a wave function from a wave spectrum.
[in] | iopW | Wave spectrum model |
[in] | nWave | Number of wave components to generate |
[in] | nDir | Number of wave directions (for iopW > 4 only) |
[in] | sprExp | Wave spreading exponent (for iopW > 4 and nDir > 1) |
[in] | rSeed | Seed for (pseudo-)random phase shift |
[out] | rfunc | Wave function parameters (amplitude, frequency, ...) |
[out] | ierr | Error flag |
real(dp) function waveprofile | ( | integer, intent(in) | iopW, |
integer, intent(in) | ldi, | ||
integer, intent(in) | ldr, | ||
integer, intent(in) | nWave, | ||
nDir, | |||
integer, dimension(ldi), intent(in) | ifunc, | ||
real(dp), dimension(ldr,nwave,ndir), intent(in) | rfunc, | ||
real(dp), intent(in) | g, | ||
real(dp), intent(in) | d, | ||
real(dp), dimension(3), intent(in) | x, | ||
real(dp), intent(in) | t | ||
) |
Evaluates a wave profile function.
[in] | iopW | Wave model option |
[in] | ldi | Number of integer parameters |
[in] | ldr | Number of real parameters per wave component |
[in] | nWave | Number of wave components |
[in] | nDir | Number of wave directions |
[in] | ifunc | Integer wave function parameters |
[in] | rfunc | Real wave function parameters |
[in] | g | Gravity constant |
[in] | d | Water depth |
[in] | x | Position to evaluate wave profile at |
[in] | t | Time to evaluate wave profile at |