deriv_10th
Module
Description
$Id$
** AUTOMATIC CPARAM.INC GENERATION ************************ Declare (for generation of cparam.inc) the number of f array variables and auxiliary variables added by this module
CPARAM integer, parameter :: nghost = 5
Quick access
- Variables:
bval_from_3rd,bval_from_3rd_arr,bval_from_3rd_scl,bval_from_4th,bval_from_4th_arr,bval_from_4th_scl,bval_from_neumann,bval_from_neumann_arr,bval_from_neumann_scl,der,der2,der2_coef0,der2_coef1,der2_coef2,der2_coef3,der2_coef4,der2_coef5,der2_main,der2_other,der6,der6_main,der6_other,der_main,der_onesided_4_slice,der_onesided_4_slice_main,der_onesided_4_slice_main_pt,der_onesided_4_slice_other_pt,der_other,deri,deri_2d,deri_3d,derij,derij_main,derij_other,derivative_1,set_ghosts_for_onesided_ders_1d,test- Routines:
calc_coeffs_1(),der2_minmod(),der2_pencil(),der2_x(),der2_z(),der2i2j2k(),der3(),der3i2j1k(),der3i3j(),der4(),der4i1j1k(),der4i2j(),der5(),der5_single(),der5i1j(),der6(),der6_pencil(),der_onesided_4_slice_other(),der_pencil(),der_upwind1st(),der_x(),der_z(),deri_3d_inds(),distr_der(),finalize_deriv(),heatflux_deriv_x(),initialize_deriv(),set_ghosts_for_onesided_ders()
Needed modules
cdata: $Id$messages(fatal_error(),warning(),not_implemented()): $Id$cparam(lactive_dimension(),nxgrid(),nygrid(),nzgrid()): $Id$general(keep_compiler_quiet(),loptest()): $Id$
Variables
- deriv/bval_from_3rd [public]
- deriv/bval_from_3rd_arr [private]
- deriv/bval_from_3rd_scl [private]
- deriv/bval_from_4th [public]
- deriv/bval_from_4th_arr [private]
- deriv/bval_from_4th_scl [private]
- deriv/bval_from_neumann [public]
- deriv/bval_from_neumann_arr [private]
- deriv/bval_from_neumann_scl [private]
- deriv/der [public]
- deriv/der2 [public]
- deriv/der2_coef0 [real,private]
- deriv/der2_coef1 [real,private]
- deriv/der2_coef2 [real,private]
- deriv/der2_coef3 [real,private]
- deriv/der2_coef4 [real,private]
- deriv/der2_coef5 [real,private]
- deriv/der2_main [private]
- deriv/der2_other [private]
- deriv/der6 [public]
- deriv/der6_main [private]
- deriv/der6_other [private]
- deriv/der_main [private]
- deriv/der_onesided_4_slice [public]
- deriv/der_onesided_4_slice_main [private]
- deriv/der_onesided_4_slice_main_pt [private]
- deriv/der_onesided_4_slice_other_pt [private]
- deriv/der_other [private]
- deriv/derij [public]
- deriv/derij_main [private]
- deriv/derij_other [private]
Subroutines and functions
- subroutine deriv/initialize_deriv()
Initialize stencil coefficients
- Call to:
fatal_error(),warning(),not_implemented(),der5_single(),der6(),heatflux_deriv_x()
- subroutine deriv/calc_coeffs_1(grid, coeffs)
dummy
real, dimension(-2:3), intent(in ) :: grid real, dimension(-3:3), intent(out) :: coeffs
- Parameters:
grid (2) [real,in]
coeffs (3) [real,out]
- Call to:
not_implemented(),fatal_error(),warning(),der5_single(),der6(),heatflux_deriv_x()
- subroutine deriv/der_pencil(j, pencil, df)
Calculate first derivative of any x, y or z pencil.
01-nov-07/anders: adapted from der 25-aug-09/axel: adapted from deriv 13-Sep-2024/PABourdin: fixed computation
- Parameters:
j [integer,in]
pencil (*) [real,in]
df (*) [real,out]
- Call to:
fatal_error(),not_implemented(),warning(),der5_single(),der6(),heatflux_deriv_x()
- subroutine deriv/distr_der(arr, idir, der[, order])
Dummy
- Parameters:
arr (,) [real,in]
idir [integer,in]
der (,) [real,out]
order [integer,in,]
- Call to:
not_implemented(),fatal_error(),warning(),der5_single(),der6(),heatflux_deriv_x()
- subroutine deriv/der2_pencil(j, pencil, df2)
Calculate 2nd derivative of any x, y or z pencil.
01-nov-07/anders: adapted from der2 25-aug-09/axel: adapted from deriv
- Parameters:
j [integer,in]
pencil (*) [real,in]
df2 (*) [real,out]
- Call to:
fatal_error(),not_implemented(),warning(),der5_single(),der6(),heatflux_deriv_x()
- subroutine deriv/der3(f, k, df, j[, ignoredx])
Calculate 3rd derivative of a scalar, get scalar
10-feb-06/anders: adapted from der5 25-aug-09/axel: copied from deriv, but not adapted yet
- Parameters:
f (,,*,*) [real,in,contiguous]
k [integer,in]
df (nx) [real,out]
j [integer,in]
ignoredx [logical,in,]
- Call to:
not_implemented(),warning(),fatal_error(),der5_single(),der6(),heatflux_deriv_x()
- subroutine deriv/der4(f, k, df, j[, ignoredx[, upwind]])
- Calculate 4th derivative of a scalar, get scalar
Used for hyperdiffusion that affects small wave numbers as little as
- possible (useful for density).
The optional flag IGNOREDX is useful for numerical purposes, where
you want to affect the Nyquist scale in each direction, independent of the ratios dx:dy:dz.
8-jul-02/wolf: coded 9-dec-03/nils: adapted from der6
10-feb-06/anders: corrected sign and factor 25-aug-09/axel: copied from deriv, but not adapted yet
- Parameters:
f (,,*,*) [real,in,contiguous]
k [integer,in]
df (nx) [real,out]
j [integer,in]
ignoredx [logical,in,]
upwind [logical]
- Call to:
not_implemented(),warning(),fatal_error(),der5_single(),der6(),heatflux_deriv_x()
- subroutine deriv/der5(f, k, df, j[, ignoredx])
- Calculate 5th derivative of a scalar, get scalar
Used for hyperdiffusion that affects small wave numbers as little as
- possible (useful for density).
The optional flag IGNOREDX is useful for numerical purposes, where
you want to affect the Nyquist scale in each direction, independent of the ratios dx:dy:dz.
29-oct-04/anders: adapted from der6 25-aug-09/axel: copied from deriv, but not adapted yet
- Parameters:
f (,,*,*) [real,in,contiguous]
k [integer,in]
df (nx) [real,out]
j [integer,in]
ignoredx [logical,in,]
- Call to:
not_implemented(),fatal_error(),der5_single(),der6(),heatflux_deriv_x()
- subroutine deriv/der6_pencil(j, pencil, df6[, ignoredx[, upwind]])
Calculate 6th derivative of any x, y or z pencil.
- Parameters:
j [integer,in]
pencil (*) [real,in]
df6 (*) [real,out]
ignoredx [logical]
upwind [logical]
- Call to:
not_implemented(),der5_single(),der6(),fatal_error(),heatflux_deriv_x()
- function deriv/der5_single(f, j, dc1)
computes 5th order derivative of function given by f at position j
3-oct-12/MR: coded
- Parameters:
f (*) [real,in]
j [integer,in]
dc1 (*) [real,in]
- Return:
der5_single [real]
- Call to:
not_implemented(),der6(),fatal_error(),heatflux_deriv_x()
- subroutine deriv/der5i1j(f, k, df, i, j)
Calculate 6th derivative with respect to two different directions.
05-dec-06/anders: adapted from derij 25-aug-09/axel: copied from deriv, but not adapted yet
- Parameters:
f (,,*,*) [real,contiguous]
k [integer]
df (nx) [real]
i [integer]
j [integer]
- Call to:
der6(),fatal_error(),not_implemented(),heatflux_deriv_x()
- subroutine deriv/der4i2j(f, k, df, i, j)
Calculate 6th derivative with respect to two different directions.
02-apr-17/wlyra: adapted from der5i1j
- Parameters:
f (,,*,*) [real,contiguous]
k [integer]
df (nx) [real]
i [integer]
j [integer]
- Call to:
- subroutine deriv/der2i2j2k(f, k, df)
Mixed 6th derivative of der2x(der2y(der2z(f))). Worked out symbolically in python. Result as spit from the python routine.
02-apr-17/wlyra: coded
- Parameters:
f (,,*,*) [real,in,contiguous]
k [integer,in]
df (nx) [real,out]
- Call to:
- subroutine deriv/der3i3j(f, k, df, i, j)
- Parameters:
f (,,*,*) [real,contiguous]
k [integer,in]
df (nx) [real,out]
i [integer,in]
j [integer,in]
- Call to:
- subroutine deriv/der3i2j1k(f, ik, df, i, j, k)
- Parameters:
f (,,*,*) [real,contiguous]
ik [integer,in]
df (nx) [real,out]
i [integer,in]
j [integer,in]
k [integer,in]
- Call to:
- subroutine deriv/der4i1j1k(f, ik, df, i, j, k)
- Parameters:
f (,,*,*) [real,contiguous]
ik [integer,in]
df (nx) [real,out]
i [integer,in]
j [integer,in]
k [integer,in]
- Call to:
- subroutine deriv/der_upwind1st(f, uu, k, df, j)
First order upwind derivative of variable Useful for advecting non-logarithmic variables
25-aug-09/axel: copied from deriv, but not adapted yet
- Parameters:
- Call to:
- subroutine deriv/der_onesided_4_slice_other(f, sgn, df, pos, j)
Calculate x/y/z-derivative on a yz/xz/xy-slice at gridpoint pos. Uses a one-sided 4th order stencil. sgn = +1 for forward difference, sgn = -1 for backwards difference.
Because of its original intended use in relation to solving characteristic equations on boundaries (NSCBC), this sub should return only PARTIAL derivatives, NOT COVARIANT. Applying the right scaling factors and connection terms should instead be done when solving the characteristic equations.
7-jul-08/arne: coded.
25-aug-09/axel: copied from deriv, but not adapted yet
- Parameters:
- Call to:
- subroutine deriv/der_z(f, df)
Dummy routine.
- Parameters:
- Call to:
- subroutine deriv/der2_z(f, df2)
Dummy routine.
- Parameters:
- Call to:
- subroutine deriv/der_x(f, df)
dummy routine
- Parameters:
- Use :
- Call to:
- subroutine deriv/der2_x(f, df2)
dummy routine
- Parameters:
- Use :
- Call to:
- subroutine deriv/der2_minmod(f, j, delfk, delfkp1, delfkm1, k)
Dummy routine
- Parameters:
- Call to:
- subroutine deriv/finalize_deriv()
Dummy
- Call to:
- subroutine deriv/deri_3d_inds(f, df, inds, j[, lignored[, lnometric]])
dummy routine for compatibility
26-mar-12/MR: coded
use General, only: keep_compiler_quiet
- Parameters:
- Call to:
- function deriv/heatflux_deriv_x(f, inh, fac, topbot)
dummy routine
17-apr-12/MR: coded
- subroutine deriv/set_ghosts_for_onesided_ders(f, topbot, j, idir[, l2nd])
Calculates the ghost point value. The coefficients are derived from two FD formulae: 1) derivative is evaluated at point 4 for the given grid -1 0 1 2 3 |4| 5 6 7 8 9 2) derivative is evaluated at point 4 for the other grid 0 1 2 3 |4| 5 6 7 8 9 10 the second expression is substituted into the first equation and then solved for f(i-1) resulting in onesided formula for the ghost point.
24-jan-17/Ivan: coded.