deriv_4th
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 = 2
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
messages(fatal_error(),warning(),not_implemented()): $Id$cdata: $Id$general(keep_compiler_quiet()): $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_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 (dummy routine)
- subroutine deriv/calc_coeffs_1(grid, coeffs)
dummy
- Parameters:
grid (2) [real,in]
coeffs (3) [real,out]
- Call to:
fatal_error(),not_implemented(),warning(),der5_single(),heatflux_deriv_x()
- subroutine deriv/der_x(f, df)
x derivative operating on an x-dependent 1-D array
09-Sep-2024/PABourdin: adapted from 6th-order
- Parameters:
- Call to:
fatal_error(),not_implemented(),warning(),der5_single(),heatflux_deriv_x()
- subroutine deriv/der2_x(f, df2)
Second x derivative operating on an x-dependent 1-D array
09-Sep-2024/PABourdin: adapted from 6th-order
- Parameters:
- Call to:
fatal_error(),not_implemented(),warning(),der5_single(),heatflux_deriv_x()
- subroutine deriv/der_z(f, df)
z derivative operating on a z-dependent 1-D array
09-Sep-2024/PABourdin: adapted from 6th-order
- Parameters:
- Call to:
fatal_error(),not_implemented(),warning(),der5_single(),heatflux_deriv_x()
- subroutine deriv/der2_z(f, df2)
z derivative operating on a z-dependent 1-D array
09-Sep-2024/PABourdin: adapted from 6th-order
- Parameters:
- Call to:
fatal_error(),not_implemented(),warning(),der5_single(),heatflux_deriv_x()
- subroutine deriv/der_pencil(j, pencil, df)
Calculate first derivative of any x, y or z pencil.
09-Sep-2024/PABourdin: adapted from 6th-order
- Parameters:
j [integer,in]
pencil (*) [real,in]
df (*) [real,out]
- Use :
- Call to:
fatal_error(),not_implemented(),warning(),der5_single(),heatflux_deriv_x()
- subroutine deriv/distr_der(arr, idir, der[, order])
Calculates 1st or 2nd derivative of a 1D array (of vectors, so 2nd dim for components), which is distributed across the procs of its dimension. At the moment only for z-direction (idir=IZBEAM=3).
09-Sep-2024/PABourdin: copied from 2nd-order
- Parameters:
arr (,) [real,in]
idir [integer,in]
der (,) [real,out]
order [integer,in,]
- Call to:
not_implemented(),fatal_error(),warning(),der5_single(),heatflux_deriv_x()
- subroutine deriv/der2_pencil(j, pencil, df2)
Calculate 2nd derivative of any x, y or z pencil.
09-Sep-2024/PABourdin: adapted from 6th-order
- Parameters:
j [integer,in]
pencil (*) [real,in]
df2 (*) [real,out]
- Call to:
- subroutine deriv/der3(f, k, df, j[, ignoredx])
Calculate 3rd derivative of a scalar, get scalar
09-Sep-2024/PABourdin: adapted from 6th-order
- Parameters:
- Call to:
- 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.
09-Sep-2024/PABourdin: adapted from 6th-order
- Parameters:
- Call to:
- 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.
09-Sep-2024/PABourdin: copied from 2nd-order
- Parameters:
- Call to:
- subroutine deriv/der2_minmod(f, j, delfk, delfkp1, delfkm1, k)
Dummy routine
09-Sep-2024/PABourdin: copied from 2nd-order
- Parameters:
- Call to:
- subroutine deriv/der6_pencil(j, pencil, df6[, ignoredx[, upwind]])
Calculate 6th derivative of any x, y or z pencil.
09-Sep-2024/PABourdin: copied from 2nd-order
- Parameters:
j [integer,in]
pencil (*) [real,in]
df6 (*) [real,out]
ignoredx [logical,in,]
upwind [logical,in,]
- Call to:
- function deriv/der5_single(f, j, dc1)
computes 5th order derivative of function given by f at position j
09-Sep-2024/PABourdin: adapted from 2nd-order
- Parameters:
f (*) [real,in]
j [integer,in]
dc1 (*) [real,in]
- Return:
der5_single [real]
- Call to:
- subroutine deriv/der5i1j(f, k, df, i, j)
Calculate 6th derivative with respect to two different directions.
09-Sep-2024/PABourdin: copied from 2nd-order
- Parameters:
- Call to:
- subroutine deriv/der4i2j(f, k, df, i, j)
Calculate 6th derivative with respect to two different directions.
09-Sep-2024/PABourdin: copied from 2nd-order
- Parameters:
- 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.
09-Sep-2024/PABourdin: copied from 2nd-order
- Parameters:
- Call to:
- subroutine deriv/der3i3j(f, k, df, i, j)
09-Sep-2024/PABourdin: copied from 2nd-order
- Parameters:
- Call to:
- subroutine deriv/der3i2j1k(f, ik, df, i, j, k)
09-Sep-2024/PABourdin: copied from 2nd-order
- Parameters:
- Call to:
- subroutine deriv/der4i1j1k(f, ik, df, i, j, k)
09-Sep-2024/PABourdin: copied from 2nd-order
- Parameters:
- Call to:
- subroutine deriv/der_upwind1st(f, uu, k, df, j)
First order upwind derivative of variable Useful for advecting non-logarithmic variables
09-Sep-2024/PABourdin: adapted from 6th-order
- 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.
09-Sep-2024/PABourdin: copied from 2nd-order
- 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
09-Sep-2024/PABourdin: copied from 2nd-order
- Parameters:
- Call to:
- function deriv/heatflux_deriv_x(f, inh, fac, topbot)
dummy routine
09-Sep-2024/PABourdin: copied from 2nd-order
- subroutine deriv/set_ghosts_for_onesided_ders(f, topbot, j, idir[, l2nd_])
Dummy.
09-Sep-2024/PABourdin: copied from 2nd-order
- Parameters:
- Call to: