Module containing some numerical routines. More...
Data Types | |
| interface | echange | 
| interface | encadre | 
| interface | intercale | 
| interface | interp | 
| interface | interp_function | 
| interface | intervalle | 
| interface | is_finite | 
| interface | monotone | 
| interface | p_norm | 
| interface | partition | 
| interface | sum_data | 
| interface | trapeze | 
| interface | tri | 
Public Member Functions | |
| subroutine | intervalle_s (x, dx) | 
| subroutine | intervalle_d (x, dx) | 
| subroutine | intervalle_i (x, dx) | 
| real *8 function, dimension(size(x)) | interpolt_d (flg_log, x0, y0, x) | 
| real function, dimension(size(x)) | interpolt_s (flg_log, x0, y0, x) | 
| real function | interpolr_s (flg_log, x0, y0, x) | 
| real *8 function | interpolr_d (flg_log, x0, y0, x) | 
| subroutine | interpt_s (flg_log, x0, y0, x, y) | 
| subroutine | interpt_d (flg_log, x0, y0, x, y) | 
| subroutine | interpr_s (flg_log, x0, y0, x, y) | 
| subroutine | interpr_d (flg_log, x0, y0, x, y) | 
| subroutine | echange_s (x1, x2) | 
| subroutine | echange_d (x1, x2) | 
| subroutine | echange_i (x1, x2) | 
| subroutine | encadre_s (xmin, xmax, xtab, ind_inf, ind_sup, sens) | 
| subroutine | encadre_d (xmin, xmax, xtab, ind_inf, ind_sup, sens) | 
| subroutine | encadre_i (xmin, xmax, xtab, ind_inf, ind_sup, sens) | 
| recursive subroutine | tri_s (tab, ind) | 
| Recursive ordering routines.  | |
| recursive subroutine | tri_d (tab, ind) | 
| recursive subroutine | tri_i (tab, ind) | 
| integer function | partition_s (ind_pvt, tab, ind) | 
| Separate elements of an array into 2 partitions and modify this array.  | |
| integer function | partition_d (ind_pvt, tab, ind) | 
| integer function | partition_i (ind_pvt, tab, ind) | 
| subroutine | intercale_s (tab1, tab2, tab_out, isize, ind) | 
| subroutine | intercale_d (tab1, tab2, tab_out, isize, ind) | 
| subroutine | intercale_i (tab1, tab2, tab_out, isize, ind) | 
| subroutine | monotone_s (x, y, npt) | 
| subroutine | monotone_d (x, y, npt) | 
| subroutine | monotone_i (x, y, npt) | 
| subroutine | sum_data_s (x1, y1, x2, y2, x3, y3, npt) | 
| subroutine | sum_data_d (x1, y1, x2, y2, x3, y3, npt) | 
| subroutine | tri2 (tabx, taby, indxy, dx) | 
| real function | trapeze_s (x, y, x0, x1) | 
| real *8 function | trapeze_d (x, y, x0, x1) | 
| type(quadrature) function | ts_coef (nquad) | 
| type(quadrature) function | borne_quad (x1, x2) | 
| subroutine | profil_exponentiel (x, x0, y0, yinf, h, y) | 
| subroutine | profil_tanh (x, x0, ymax, ymin, h, y) | 
| real *8 function, dimension(n) | profil_linear (n, z1, z2) | 
| Return a linear profil.  More... | |
| real *8 function, dimension(2 *n+1) | profil_mid_exp (n, z1, zmid, z2) | 
| Return a profil with exponential dz at mid index.  More... | |
| real *8 function, dimension(npt) | profil_lavarra_2018 (npt, zmin, zmax) | 
| Famous vertical profile used in ISAM Coronal simulations.  More... | |
| subroutine | spline (x, y, b, c, d, n) | 
| Calculate the coefficients b(i), c(i), and d(i), i=1,2,...,n for cubic spline interpolation.  More... | |
| double precision function | ispline (u, x, y, b, c, d, n) | 
| Evaluates the cubic spline interpolation at point z.  More... | |
| real function | p_norm_s (p, x) | 
| Compute the p-norm of a vector. Only for p in N*.  More... | |
| real *8 function | p_norm_d (p, x) | 
| logical function | is_finite_s (x) | 
| Check if all values of an array is finite (not NaN neither Infinity)  | |
| logical function | is_finite_d (x) | 
| subroutine | deallocate_3d (arr0, arr1, arr2, arr3, arr4, arr5, arr6, arr7, arr8, arr9, arr10, arr11, arr12, arr13, arr14, arr15, arr16, arr17, arr18, arr19) | 
| Deallocate 3d-arrays.  | |
Module containing some numerical routines.
| subroutine toolbox_num::encadre_d | ( | real*8 | xmin, | 
| real*8 | xmax, | ||
| real*8, dimension(:) | xtab, | ||
| integer | ind_inf, | ||
| integer | ind_sup, | ||
| integer | sens | ||
| ) | 
| ind_inf | cette fonction encadre l'intervalle [xmin,xmax] par le tableau xtab. ind_inf est l'indice de la plus grande valeur de xtab <= xmin ind_sup est l'indice de la plus petite valeur de xtab > xmax sens donne le sens de variation de xtab: sens = 1 si tableau croissant sens = -1 si tableau decroissant | 
| ind_sup | cette fonction encadre l'intervalle [xmin,xmax] par le tableau xtab. ind_inf est l'indice de la plus grande valeur de xtab <= xmin ind_sup est l'indice de la plus petite valeur de xtab > xmax sens donne le sens de variation de xtab: sens = 1 si tableau croissant sens = -1 si tableau decroissant | 
| sens | cette fonction encadre l'intervalle [xmin,xmax] par le tableau xtab. ind_inf est l'indice de la plus grande valeur de xtab <= xmin ind_sup est l'indice de la plus petite valeur de xtab > xmax sens donne le sens de variation de xtab: sens = 1 si tableau croissant sens = -1 si tableau decroissant | 
| subroutine toolbox_num::encadre_i | ( | integer | xmin, | 
| integer | xmax, | ||
| integer, dimension(:) | xtab, | ||
| integer | ind_inf, | ||
| integer | ind_sup, | ||
| integer | sens | ||
| ) | 
| ind_inf | cette fonction encadre l'intervalle [xmin,xmax] par le tableau xtab. ind_inf est l'indice de la plus grande valeur de xtab <= xmin ind_sup est l'indice de la plus petite valeur de xtab > xmax sens donne le sens de variation de xtab: sens = 1 si tableau croissant sens = -1 si tableau decroissant | 
| ind_sup | cette fonction encadre l'intervalle [xmin,xmax] par le tableau xtab. ind_inf est l'indice de la plus grande valeur de xtab <= xmin ind_sup est l'indice de la plus petite valeur de xtab > xmax sens donne le sens de variation de xtab: sens = 1 si tableau croissant sens = -1 si tableau decroissant | 
| sens | cette fonction encadre l'intervalle [xmin,xmax] par le tableau xtab. ind_inf est l'indice de la plus grande valeur de xtab <= xmin ind_sup est l'indice de la plus petite valeur de xtab > xmax sens donne le sens de variation de xtab: sens = 1 si tableau croissant sens = -1 si tableau decroissant | 
| subroutine toolbox_num::encadre_s | ( | real | xmin, | 
| real | xmax, | ||
| real, dimension(:) | xtab, | ||
| integer | ind_inf, | ||
| integer | ind_sup, | ||
| integer | sens | ||
| ) | 
| ind_inf | cette fonction encadre l'intervalle [xmin,xmax] par le tableau xtab. ind_inf est l'indice de la plus grande valeur de xtab <= xmin ind_sup est l'indice de la plus petite valeur de xtab > xmax sens donne le sens de variation de xtab: sens = 1 si tableau croissant sens = -1 si tableau decroissant | 
| ind_sup | cette fonction encadre l'intervalle [xmin,xmax] par le tableau xtab. ind_inf est l'indice de la plus grande valeur de xtab <= xmin ind_sup est l'indice de la plus petite valeur de xtab > xmax sens donne le sens de variation de xtab: sens = 1 si tableau croissant sens = -1 si tableau decroissant | 
| sens | cette fonction encadre l'intervalle [xmin,xmax] par le tableau xtab. ind_inf est l'indice de la plus grande valeur de xtab <= xmin ind_sup est l'indice de la plus petite valeur de xtab > xmax sens donne le sens de variation de xtab: sens = 1 si tableau croissant sens = -1 si tableau decroissant | 
| double precision function toolbox_num::ispline | ( | double precision | u, | 
| double precision, dimension(n) | x, | ||
| double precision, dimension(n) | y, | ||
| double precision, dimension(n) | b, | ||
| double precision, dimension(n) | c, | ||
| double precision, dimension(n) | d, | ||
| integer | n | ||
| ) | 
Evaluates the cubic spline interpolation at point z.
ispline = y(i)+b(i)*(u-x(i))+c(i)*(u-x(i))**2+d(i)*(u-x(i))**3
 where x(i) <= u <= x(i+1)
| [in] | u | the abscissa at which the spline is to be evaluated | 
| [in] | x,y | the arrays of given data points | 
| [in] | b,c,d | arrays of spline coefficients computed by spline | 
| [in] | n | the number of data points | 
| [out] | ispline | interpolated value at point u | 

| real function toolbox_num::p_norm_s | ( | integer | p, | 
| real, dimension(:), intent(in) | x | ||
| ) | 
Compute the p-norm of a vector. Only for p in N*.
| [in] | p | norm order | 
| [in] | x | N-dimensional vector | 
| real*8 function, dimension(npt) toolbox_num::profil_lavarra_2018 | ( | integer, intent(in) | npt, | 
| real*8, intent(in) | zmin, | ||
| real*8, intent(in) | zmax | ||
| ) | 
Famous vertical profile used in ISAM Coronal simulations.
(cf Lavarra et al., 2018)

| real*8 function, dimension(n) toolbox_num::profil_linear | ( | integer, intent(in) | n, | 
| real*8, intent(in) | z1, | ||
| real*8, intent(in) | z2 | ||
| ) | 
Return a linear profil.
Goes from z1 to z2, increasing or decreasing, with N points.

| real*8 function, dimension(2*n+1) toolbox_num::profil_mid_exp | ( | integer, intent(in) | n, | 
| real*8, intent(in) | z1, | ||
| real*8, intent(in) | zmid, | ||
| real*8, intent(in) | z2 | ||
| ) | 
Return a profil with exponential dz at mid index.
From z1 to zmid, n points such that z_{i+1} = z1 + z_{i}*q 
 From z2>z1 to zmid, n points such that z_{i-1} = z2 - z_{i}*q 

| subroutine toolbox_num::spline | ( | double precision, dimension(n) | x, | 
| double precision, dimension(n) | y, | ||
| double precision, dimension(n) | b, | ||
| double precision, dimension(n) | c, | ||
| double precision, dimension(n) | d, | ||
| integer | n | ||
| ) | 
Calculate the coefficients b(i), c(i), and d(i), i=1,2,...,n for cubic spline interpolation.
s(x) = y(i) + b(i)*(x-x(i)) + c(i)*(x-x(i))**2 + d(i)*(x-x(i))**3
 for x(i) <= x <= x(i+1)
 
| [in] | x | the arrays of data abscissas (in strictly increasing order) | 
| [in] | y | the arrays of data ordinates | 
| [in] | n | size of the arrays xi() and yi() (n>=2) | 
| [out] | b,c,d | arrays of spline coefficients | 
spline.f90 program is based on fortran version of program spline.f
 the accompanying function fspline can be used for interpolation 
 1.8.5