FEDEM Solver  R8.0
Source code of the dynamics solver
Functions/Subroutines
waveFunctions.f90 File Reference

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...
 

Detailed Description

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.

Function/Subroutine Documentation

◆ evalwave()

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.

Parameters
[in]iopWWave model option
[in]ldiNumber of integer parameters
[in]ldrNumber of real parameters per wave component
[in]nWaveNumber of wave components
[in]nDirNumber of wave directions
[in]ifuncInteger wave function parameters
[in]rfuncReal wave function parameters
[in]gGravity constant
[in]dWater depth
[in]xPosition to evaluate wave profile at
[in]tTime to evaluate wave profile at
[out]hWave elevation
[out]vWater particle velocity
[out]aWater particle acceleration

◆ initembeddedwave()

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.

Parameters
[in]iopWWave model option
[in]nWaveNumber of wave components
[in]rSeedSeed for (pseudo-)random phase shift
[in]gGravity constant
[in]DWater depth
ifuncInteger wave function parameters
rfuncReal wave function parameters
[out]ierrError flag

◆ initnonlinwavefunc()

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.

Parameters
[in]iopWWave model option
[in]gGravity constant
[in]DWater depth
RFUNCWave function parameters
[out]statError flag

◆ initwavefuncfromfile()

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.

Parameters
[in]fNameName of file to read parameters from
[in]nWaveNumber of wave components to read
[in]rSeedSeed for (pseudo-)random phase shift
[out]rfuncWave function parameters (amplitude, frequency, ...)
[out]ierrError flag

◆ initwavefuncspectrum()

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.

Parameters
[in]iopWWave spectrum model
[in]nWaveNumber of wave components to generate
[in]nDirNumber of wave directions (for iopW > 4 only)
[in]sprExpWave spreading exponent (for iopW > 4 and nDir > 1)
[in]rSeedSeed for (pseudo-)random phase shift
[out]rfuncWave function parameters (amplitude, frequency, ...)
[out]ierrError flag

◆ waveprofile()

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.

Parameters
[in]iopWWave model option
[in]ldiNumber of integer parameters
[in]ldrNumber of real parameters per wave component
[in]nWaveNumber of wave components
[in]nDirNumber of wave directions
[in]ifuncInteger wave function parameters
[in]rfuncReal wave function parameters
[in]gGravity constant
[in]dWater depth
[in]xPosition to evaluate wave profile at
[in]tTime to evaluate wave profile at
Returns
Wave elevation