The core modules and programs¶
Module core_bracket¶
Module : core_func
Purpose : monovariate functions
-
class
func_t
¶ A function object for evaluating real and complex values, real and complex roots, and minimum and maximum values
abstract type with contains that only has procedures
type, abstract
- Parameters
eval_r – evaluate the real function – procedure
eval_c – evaulate the complex function – procedure(eval_c_i), deferred
=> eval_r, eval_c (eval) – calls either eval_r or eval_c – generic
root_r – evaluate the real root – procedure
root_r – evaluate the complex root – procedure
=> root_r, root_c (root) – calls either root_r or root_c –
=> minimum_r (minimum) – evaluate the real minimum – procedure
=> maximum_r (maximum) – evaluate the real maximum – procedure
-
eval_c_i
(this, z) result (f_z)¶ A function within an abstract interface for evaluating a complex function
specified as deferred in the func_t type definition, so eval_c_i will be assigned by inherited objects
function
- Parameters
this – func_t called as class, so anything of type func_t or that inherits from
-
-- class(cunc_t), intent(inout)
- Parameters
z – complex number to evaulate – complex(WP), intent(in)
- Rtype f_z
complex number that is the result of the evaulation – complex(WP)
-
eval_r
(this, x) result (f_x)¶ Evaluate the real function based on the complex function this%eval_c
function
- Parameters
this – func_t called as class, so anything of type cunf_t or that inherits from
-
-- class(func_t), intent(inout)
- Parameters
x – real value for determining f_x – real(WP), intent(in)
- Rtype f_x
real value from evaluating eval_c at x – real(WP)
-
root_r
(this, x_a, x_b, x_tol, f_x_a, f_x_b, n_iter, relative_tol) result (x)¶ find the real root
Use Brent’s method [based on the ALGOL 60 routine ‘zero’ published in Brent (1973, “Algorithms for Minimization without Derivatives”, Prentice Hall, Englewood Cliffs] to find a root of the real function this%eval_r(x)
function
- Parameters
this – func_t called as a class – class(func_t), intent(inout)
x_a – lower bound of root – real(WP), intent(in)
x_b – upper bound of root – real(WP), intent(in)
x_tol – tolerance – real(WP), intent(in)
f_x_a – value of function at x_a – real(WP), optional, intent(in)
f_x_b – value of function at x_b – real(WP), optional, intent(in)
n_iter – number of iterations for root finding – integer, optional, intent(inout)
relative_tol – whether to use relative tolerance for root finding – logical, optional, intent(in)
- Rtype x
root value – real(WP)
-
root_c
(this, z_a, z_b, z_tol, f_z_a, f_z_b, n_iter, relative_tol) result (z)¶ find the complex root
Use the secant method to find a complex root of the function this%eval_c(z)
function
- Parameters
this – func_t called as a class – class(func_t), intent(inout)
z_a – lower bound of root – complex(WP), intent(in)
z_b – upper bound of root – complex(WP), intent(in)
z_tol – tolerance – real(WP), intent(in)
f_z_a – function evaluated at z_a – complex(WP), optional, intent(in)
f_z_b – function evaluated at z_b – complex(WP), optional, intent(in)
n_iter – number of iterations for root finding – integer, optional, intent(inout)
relative_tol – whether to use relative tolerance for root finding – logical, optional, intent(in)
- Rtype z
root value – complex(WP)
-
minimum_r
(this, x_a, x_b, x_c, x_tol, relative_tol) result (x)¶ Find a local minimum of the real function this%eval_r(x)
function
- Parameters
this – func_t called as a class – class(func_t), intent(inout)
x_a – lower bound of interval – real(WP), intent(in)
x_b – intermediate value of interval – real(WP), intent(in)
x_c – upper bound of interval – real(WP), intent(in)
x_tol – tolerance of minimum finding – real(WP), intent(in)
relative_tol – whether to use relative tolerance for minimum finding – logical, intent(in), optional
- Rtype x
minimum value – real(WP)
-
maximum_r
(this, x_a, x_b, x_c, x_tol, relative_tol) result (x)¶ Find a local maximum of the real function this%eval_r(x)
function
- Parameters
this – func_t called as a class – class(func_t), intent(inout)
x_a – lower bound of interval – real(WP), intent(in)
x_b – intermediate value of interval – real(WP), intent(in)
x_c – upper bound of interval – real(WP), intent(in)
x_tol – tolerance of maximum finding – real(WP), intent(in)
relative_tol – whether to use relative tolerance for maximum finding – logical, intent(in), optional
- Rtype x
maximum value – real(WP)
-
extremum_r
(rf, x_a, x_b, x_c, x_tol, minimum, relative_tol) result (x)¶ Find a real extremum
Use a golden section search to find a local extremum of the real function this%eval_r(x)
function
- Parameters
rf – func_t called as a class – class(func_t), intent(inout)
x_a – lower bound of interval – real(WP), intent(in)
x_b – intermediate value of interval – real(WP), intent(in)
x_c – upper bound of interval – real(WP), intent(in)
x_tol – tolerance of extremum finding – real(WP), intent(in)
minimum – find the minimum (true) or maximum (false) – logical, intent(in)
relative_tol – whether to use relative tolerance for extremum finding – logical, intent(in), optional
- Rtype x
extremum value – real(WP)
-
shft2
(a, b, c)¶ Shift b to a and c to b
within extremum_r via ‘contains’
subroutine
- Rtype a
a, which was input b – real(WP), intent(out)
- Parameters
b – b, which gets moved to a and becomes input c – real(WP), intent(inout)
c – c, which gets moved to b – real(WP), intent(in)
-
shft3
(a, b, c, d)¶ Shift b to a, c to b and d to c
within extremum_r via ‘contains’
subroutine
- Rtype a
a, which was input b – real(WP), intent(out)
- Parameters
b – b, which gets moved to a and becomes input c – real(WP), intent(inout)
c – c, which gets moved to b and becomes input d – real(WP), intent(inout)
d – d, which gets moved to c – real(WP), intent(inout)
Module core_c¶
Module : core_c
Purpose : C interoperability
-
c_strlen
(str) result (len) bind (C, name="strlen")¶ Determines the length of a string
uses ‘bind´ so it is interoperable with C
function within an interface
- Parameters
str – input string – type(C_PTR), value
- Rtype len
string length – integer(C_SIZE_T)
-
c_f_string
(c_str) result (f_str)¶ Convert a C string (pointer to char) to a Fortran string
function
- Parameters
c_str – input string in C (pointer to char) – type(C_PTR), intent(in)
- Rtype f_str
returned Fortran string – character(:), allocatable
Module core_cspline¶
Module : core_cspline
Purpose : cubic spline interpolation
-
class
cspline_t
¶
-
cspline_t_
(knot_x, knot_y, knot_dy) result (cs)¶
-
cspline_t_eval_derivs_
(knot_x, knot_y, deriv_type, knot_dy_a, knot_dy_b) result (cs)¶
-
cspline_t_y_func_
(knot_x_a, knot_x_b, y_func, y_tol, deriv_type, relative_tol, knot_dy_a, knot_dy_b) result (cs)¶
-
y_func
(x) result (y)¶
-
x_n_
(this) result (x)¶
-
y_1_
(this, x) result (y)¶
-
y_v_
(this, x) result (y)¶
-
phi_
(t)¶
-
psi_
(t)¶
-
y_n_
(this) result (y)¶
-
dy_1_
(this, x) result (dy)¶
-
dy_v_
(this, x) result (dy)¶
-
dphi_
(t)¶
-
dpsi_
(t)¶
-
dy_n_
(this) result (dy)¶
-
iy_1_1_
(this, x_a, x_b) result (iy)¶
-
iy_1_v_
(this, x_a, x_b) result (iy)¶
-
iy_v_1_
(this, x_a, x_b) result (iy)¶
-
iy_v_v_
(this, x_a, x_b) result (iy)¶
-
iphi_
(t)¶
-
ipsi_
(t)¶
-
natural_dy_
(x, y, dy_a, dy_b) result (dy)¶
-
findiff_dy_
(x, y, dy_a, dy_b) result (dy)¶
-
mono_dy_
(x, y, dy_a, dy_b) result (dy)¶
-
read_
(hg, cs)¶
-
write_
(hg, cs)¶
-
bcast_0_
(cs, root_rank)¶
-
attribs_
(this, x_min, x_max, n)¶
Module core_env¶
Module : core_env
Purpose : environment access
-
get_env
(name, value, trim_name)¶ subroutine
- Parameters
name – the envirionment variable that is sought after – character(*), intent(in)
value – the value of the environment variable – character(:), allocatable, intent(out)
trim_name – signifies whether the blanks in ‘name’ are important – logical, optional, intent(in)
Module core_func¶
Module : core_func
Purpose : monovariate functions
-
class
func_t
¶ A function object for evaluating real and complex values, real and complex roots, and minimum and maximum values
abstract type with contains that only has procedures
type, abstract
- Parameters
eval_r – evaluate the real function – procedure
eval_c – evaulate the complex function – procedure(eval_c_i), deferred
=> eval_r, eval_c (eval) – calls either eval_r or eval_c – generic
=> expand_bracket (expand_bracket) – expand the bracket until it contains a root of a real function – procedure, public
=> narrow_bracket (narrow_bracket) – narrow the bracket on a root of a real function – procedure, public
root_r – evaluate the real root – procedure
root_r – evaluate the complex root – procedure
=> root_r, root_c (root) – calls either root_r or root_c – generic
=> minimum_r (minimum) – evaluate the real minimum – procedure
=> maximum_r (maximum) – evaluate the real maximum – procedure
-
eval_c_
(this, z) result (f_z)¶ A function within an abstract interface for evaluating a complex function
specified as deferred in the func_t type definition, so eval_c_ will be assigned by inherited objects
function
- Parameters
this – func_t called as class, so anything of type func_t or that inherits from
z – complex number to evaulate – complex(WP), intent(in)
- Rtype f_z
complex number that is the result of the evaulation – complex(WP)
-
eval_r_
(this, x) result (f_x)¶ Evaluate the real function based on the complex function this%eval(z)
function
- Parameters
this – func_t called as class, so anything of type cunf_t or that inherits from type func_t can call this function – class(func_t), intent(inout)
x – real value for determining f_x – real(WP), intent(in)
- Rtype f_x
real value from evaluating eval at x – real(WP)
-
root_r_
(this, x_a, x_b, x_tol, f_x_a, f_x_b, n_iter, relative_tol) result (x)¶ Find a root of the real function this%eval(x)
uses narrow_bracket
function
- Parameters
this – func_t called as a class – class(func_t), intent(inout)
x_a – lower bound of root – real(WP), intent(in)
x_b – upper bound of root – real(WP), intent(in)
x_tol – tolerance – real(WP), intent(in)
f_x_a – value of function at x_a – real(WP), optional, intent(in)
f_x_b – value of function at x_b – real(WP), optional, intent(in)
n_iter – number of iterations for root finding – integer, optional, intent(inout)
relative_tol – whether to use relative tolerance for root finding – logical, optional, intent(in)
- Rtype x
root value – real(WP)
-
root_c_
(this, z_a, z_b, z_tol, f_z_a, f_z_b, n_iter, relative_tol) result (z)¶ find a complex root
Use the secant method to find a complex root of the function this%eval(z)
function
- Parameters
this – func_t called as a class – class(func_t), intent(inout)
z_a – lower bound of root – complex(WP), intent(in)
z_b – upper bound of root – complex(WP), intent(in)
z_tol – tolerance – real(WP), intent(in)
f_z_a – function evaluated at z_a – complex(WP), optional, intent(in)
f_z_b – function evaluated at z_b – complex(WP), optional, intent(in)
n_iter – number of iterations for root finding, default value is 50 – integer, optional, intent(inout)
relative_tol – whether to use relative tolerance for root finding, default value is false – logical, optional, intent(in)
- Rtype z
root value – complex(WP)
-
minimum_r_
(this, x_a, x_b, x_c, x_tol, relative_tol) result (x)¶ Find a local minimum of the real function this%eval(x)
calls extremum_
function
- Parameters
this – func_t called as a class – class(func_t), intent(inout)
x_a – lower bound of interval – real(WP), intent(in)
x_b – intermediate value of interval – real(WP), intent(in)
x_c – upper bound of interval – real(WP), intent(in)
x_tol – tolerance of minimum finding – real(WP), intent(in)
relative_tol – whether to use relative tolerance for minimum finding – logical, intent(in), optional
- Rtype x
minimum value – real(WP)
-
maximum_r_
(this, x_a, x_b, x_c, x_tol, relative_tol) result (x)¶ Find a local maximum of the real function this%eval(x)
calls extremum_
function
- Parameters
this – func_t called as a class – class(func_t), intent(inout)
x_a – lower bound of interval – real(WP), intent(in)
x_b – intermediate value of interval – real(WP), intent(in)
x_c – upper bound of interval – real(WP), intent(in)
x_tol – tolerance of maximum finding – real(WP), intent(in)
relative_tol – whether to use relative tolerance for maximum finding – logical, intent(in), optional
- Rtype x
maximum value – real(WP)
-
extremum_
(rf, x_a, x_b, x_c, x_tol, minimum, relative_tol) result (x)¶ find a real extremum
Use a golden section search to find a local extremum of the real function this%eval(x)
function
- Parameters
rf – func_t called as a class – class(func_t), intent(inout)
x_a – lower bound of interval – real(WP), intent(in)
x_b – intermediate value of interval – real(WP), intent(in)
x_c – upper bound of interval – real(WP), intent(in)
x_tol – tolerance of extremum finding – real(WP), intent(in)
minimum – find the minimum (true) or maximum (false) – logical, intent(in)
relative_tol – whether to use relative tolerance for extremum finding, default value is false – logical, intent(in), optional
- Rtype x
extremum value – real(WP)
-
expand_bracket_
(this, x_a, x_b, f_x_a, f_x_b, clamp_a, clamp_b)¶ Expand the bracket [x_a,x_b] until it contains a root of the real function this%eval(x)
subroutine
- Parameters
this – func_t called as a class – class(func_t), intent(inout)
x_a – lower bound of root – real(WP), intent(in)
x_b – upper bound of root – real(WP), intent(in)
f_x_a – value of function at x_a – real(WP), optional, intent(in)
f_x_b – value of function at x_b – real(WP), optional, intent(in)
clamp_a – clamp the lower bound or not – logical, intent(in), optional
clamp_b – clamp the upper bound or not – logical, intent(in), optional
-
narrow_bracket_
(this, x_a, x_b, x_tol, f_x_a, f_x_b, n_iter, relative_tol)¶ Narrow the bracket range on a root
Use Brent’s method [based on the ALGOL 60 routine ‘zero’ published in Brent (1973, “Algorithms for Minimization without Derivatives”, Prentice Hall, Englewood Cliffs] to narrow the bracket [x_a,x_b] bracket on the real function this%eval(x)
subroutine
- Parameters
this – func_t called as a class – class(func_t), intent(inout)
x_a – lower bound of root – real(WP), intent(in)
x_b – upper bound of root – real(WP), intent(in)
x_tol – tolerance – real(WP), intent(in)
f_x_a – value of function at x_a – real(WP), optional, intent(inout)
f_x_b – value of function at x_b – real(WP), optional, intent(inout)
n_iter – number of iterations for root findingi, default value is 75 – integer, optional, intent(inout)
relative_tol – whether to use relative tolerance for root finding, default value is false – logical, optional, intent(in)
-
shft2_
(a, b, c)¶ Shift b to a and c to b
within extremum_ via ‘contains’
subroutine
- Rtype a
a, which was input b – real(WP), intent(out)
- Parameters
b – b, which gets moved to a and becomes input c – real(WP), intent(inout)
c – c, which gets moved to b – real(WP), intent(in)
-
shft3_
(a, b, c, d)¶ Shift b to a, c to b and d to c
within extremum_ via ‘contains’
subroutine
- Rtype a
a, which was input b – real(WP), intent(out)
- Parameters
b – b, which gets moved to a and becomes input c – real(WP), intent(inout)
c – c, which gets moved to b and becomes input d – real(WP), intent(inout)
d – d, which gets moved to c – real(WP), intent(inout)
Module core_hgroup¶
Module : core_hgroup
Purpose : HDF5 input/output
-
class
hgroup_t
¶
-
init_file_
(file_name, access_type) result (hg)¶
-
init_group_
(hg_parent, group_name) result (hg)¶
-
exists_
(this, group_name)¶
-
attr_exists_
(hg, attr_name) result (attr_exists)¶
-
dset_exists_
(hg, dset_name) result (dset_exists)¶
-
integer_mem_type_
(kind) result (mem_type_id)¶
-
real_mem_type_
(kind) result (mem_type_id)¶
-
complex_mem_type_
(kind) result (mem_type_id)¶
-
integer_file_type_
(kind) result (file_type_id)¶
-
real_file_type_
(kind) result (file_type_id)¶
-
complex_file_type_
(kind) result (file_type_id)¶
-
elem_group_name
(prefix, indices) result (group_name)¶
-
open_library_
()¶
-
create_complex_type_
(comp_type_id, type_id)¶
-
final_
(this)¶
-
close_library_
()¶
-
read_${ITEM_TYPE}_${INFIX}_${DATA_RANK}_ (hg, item_name, data)
-
read_${ITEM_TYPE}_a_${DATA_RANK}_ (hg, item_name, data)
-
read_${ITEM_TYPE}_l_${DATA_RANK}_ (hg, item_name, data)
-
read_${ITEM_TYPE}_alloc_${INFIX}_${DATA_RANK}_ (hg, item_name, data)
-
write_${ITEM_TYPE}_${INFIX}_${DATA_RANK}_ (hg, item_name, data, overwrite, comp_level)
-
write_${ITEM_TYPE}_a_${DATA_RANK}_ (hg, item_name, data)
-
write_${ITEM_TYPE}_l_${DATA_RANK}_ (hg, item_name, data)
-
get_attr_shape
(hg, attr_name, shape)¶
-
get_dset_shape
(hg, dset_name, shape)¶
Module core_integ¶
Module : core_integ
Purpose : numerical integration olio
-
simps2d_wgt
(wgt, i, j, ni, nj)¶ Simpson’s rule 2D weighting
subroutine
- Rtype wgt
2D weighting result; multiplication of weighting 1 and weighting 2 – real(WP), intent(out)
- Parameters
i – index for weight 1 – integer, intent(in)
j – index for weight 2 – integer, intent(in)
ni – number of points in Simpson integration 1 – integer, intent(in)
nj – number of points in Simpson integration 2 – integer, intent(in)
-
simps1d_wgt
(wgt, i, n)¶ Simpson’s rule weightings (1, 2, or 4) for 1D integration
subroutine
- Rtype wgt
weight (1, 2, or 4) that is returned – real(WP), intent(out)
- Parameters
i – point in integration for determining the weight – integer, intent(in)
n – number of points in integration – integer, intent(in)
-
gl_weights
(a, b, x, w)¶ calculate abyssica (x) and weights (w) for Gauss-Legendre quadrature
over integral from a to b from Numerical Receipes, Press et al
subroutine
- Parameters
a – lower bound of integral – real(WP), intent(in)
b – upper bound of integral – real(WP), intent(in)
x(:) – abyssica – real(WP), intent(inout)
w(:) – weights – real(WP), intent(inout)
Module core_interp¶
Module : core_interp
Purpose : interpolant abstract type
-
class
interp_t
¶
-
f_1_
(this, x) result (f)¶
-
f_v_
(this, x) result (f)¶
-
f_n_
(this) result (f)¶
-
f_1_1_
(this, x_a, x_b) result (f)¶
-
f_1_v_
(this, x_a, x_b) result (f)¶
-
f_v_1_
(this, x_a, x_b) result (f)¶
-
f_v_v_
(this, x_a, x_b) result (f)¶
-
attribs_
(this, x_min, x_max, n)¶
Module core_legendre¶
Module : core_legendre
Purpose : Legendre & related functions
-
factorial
(a) result (af)¶ Calculate the factorial a!
function
- Parameters
a – integer whose factorial will be computed – integer, intent(in)
- Rtype af
factorial of a – real(WP)
-
P_lm
(l, m, norm)¶ Blank subroutine – only has this single definition line
-
Y_lm
(theta, phi, Y_lm, grad_Y_lm_theta, grad_Y_lm_phi)¶ Calculate the spherical harmonic Y_lm(theta, phi), and possibly its angular derivatives
Only has variable definitions; has no other lines of code
subroutine
- Parameters
theta – polar angle – real(WP), intent(in)
phi – azimuthal angle – real(WP), intent(in)
T_lm – legendre polynomial – complex(WP), intent(out)
grad_Y_lm_theta – gradient with respect to polar angle – complex(WP), intent(out), optional
grad_Y_lm_phi – gradient with respect to azimuthal angle – complex(WP), intent(out), optional
-
Y_lm_tableaux
(theta, phi, Y_lm, grad_Y_lm_theta, grad_Y_lm_phi)¶ Calculate a tableaux of spherical harmonics Y_lm(theta, phi), and possibly their derivatives, for m >= 0
subroutine
- Parameters
theta – polar angle – real(WP), intent(in)
phi – azimuthal angle – real(WP), intent(in)
T_lm – legendre polynomial – complex(WP), intent(out)
grad_Y_lm_theta – gradient with respect to polar angle – complex(WP), intent(out), optional
grad_Y_lm_phi – gradient with respect to azimuthal angle – complex(WP), intent(out), optional
Module core_linalg¶
Module : core_linalg
Purpose : interfaces to LAPACK and BLAS routines
-
xlamch_${INFIX}_ (x, cmach)
-
SGTSV
(N, NRHS, DL, D, DU, B, LDB, INFO)¶
-
DGTSV
(N, NRHS, DL, D, DU, B, LDB, INFO)¶
-
CGTSV
(N, NRHS, DL, D, DU, B, LDB, INFO)¶
-
ZGTSV
(N, NRHS, DL, D, DU, B, LDB, INFO)¶
-
SGETRF
(M, N, A, LDA, IPIV, INFO)¶
-
DGETRF
(M, N, A, LDA, IPIV, INFO)¶
-
CGETRF
(M, N, A, LDA, IPIV, INFO)¶
-
ZGETRF
(M, N, A, LDA, IPIV, INFO)¶
-
SGETRS
(TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO)¶
-
DGETRS
(TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO)¶
-
CGETRS
(TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO)¶
-
ZGETRS
(TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO)¶
-
SGESV
(N, NRHS, A, LDA, IPIV, B, LDB, INFO)¶
-
DGESV
(N, NRHS, A, LDA, IPIV, B, LDB, INFO)¶
-
CGESV
(N, NRHS, A, LDA, IPIV, B, LDB, INFO)¶
-
ZGESV
(N, NRHS, A, LDA, IPIV, B, LDB, INFO)¶
-
SGESVX (FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, &
-
DGESVX (FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, &
-
CGESVX (FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, &
-
ZGESVX (FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, &
-
SGEEV
(JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR, LDVR, WORK, LWORK, INFO)¶
-
DGEEV
(JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR, LDVR, WORK, LWORK, INFO)¶
-
CGEEV
(JOBVL, JOBVR, N, A, LDA, W, VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO)¶
-
ZGEEV
(JOBVL, JOBVR, N, A, LDA, W, VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO)¶
-
SGEEVX (BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, WR, WI, VL, LDVL, VR, LDVR, ILO, IHI, SCALE, &
-
DGEEVX (BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, WR, WI, VL, LDVL, VR, LDVR, ILO, IHI, SCALE, &
-
CGEEVX (BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, W, VL, LDVL, VR, LDVR, ILO, IHI, SCALE, ABNRM, &
-
ZGEEVX (BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, W, VL, LDVL, VR, LDVR, ILO, IHI, SCALE, ABNRM, &
-
SGESVD
(JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, INFO)¶
-
DGESVD
(JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, INFO)¶
-
CGESVD
(JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, RWORK, INFO)¶
-
ZGESVD
(JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT, WORK, LWORK, RWORK, INFO)¶
-
SSTEVR (JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, &
-
DSTEVR (JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL, &
-
DSTEMR (JOBZ, RANGE, N, D, E, VL, VU, IL, IU, &
Module core_list¶
Module : core_list
Purpose : doubly-linked list
-
class
list_t
¶ A function object for lists
abstract type with variables and a contains that only has procedures
type, abstract
- Parameters
li_next – pointer to the next entry in the list – type(list_t), pointer
li_prev – pointer to the previous entry in the list – type(list_t), pointer
=> next (next) – Get the n’th next item after this – procedure, public
=> prev (prev) – Get the n’th previous item before this – procedure, public
=> head (head) – Get the list head – procedure, public
=> tail (tail) – Get the list tail – procedure, public
=> insert_before (insert_before) – Insert a list item before this – procedure, public
=> insert_after (insert_after) – Insert a list item after this – procedure, public
=> delete (delete) – Delete the item – procedure, public
=> delete_all (delete_all) – Delete the whole list – procedure, public
-
prev
(this, n)¶ Get the n’th previous item before this
function
- Parameters
this – func_t called as class– class(list_t), intent(in)
n – number of previous items in list to move to – integer, intent(in), optional
- Rtype prev
pointer to n’th previous item in list – class(list_t), pointer
-
next
(this, n)¶ Get the n’th next item after this
function
- Parameters
this – func_t called as class– class(list_t), intent(in)
n – number of subsequent items in list to move to – integer, intent(in), optional
- Rtype prev
pointer to n’th next item in list – class(list_t), pointer
-
head
(this)¶ Get the list head
function
- Parameters
this – func_t called as class – class(list_t), intent(in), target
- Rtype head
pointer to the head of the list – class(list_t), pointer
-
tail
(this)¶ Get the list tail
function
- Parameters
this – func_t called as class – class(list_t), intent(in), target
- Rtype tail
pointer to the tail of the list – class(list_t), pointer
-
insert_before
(this) result (insert)¶ Insert a list item before this
function
- Parameters
this – func_t called as class – class(list_t), intent(inout)
- Trype insert
pointer to where to insert item before this – class(list_t), pointer
-
insert_after
(this) result (insert)¶ Insert a list item after this
insert_after
- Parameters
this – func_t called as class – class(list_t), intent(inout)
- Rtype insert
pointer to where to insert item after this – class(list_t), pointer
-
delete
(this)¶ Delete the item
subroutine
- Parameters
this – func_t called as class – class(list_t), pointer
-
delete_all
(this)¶ Delete the whole list
subroutine
- Parameters
this – func_t called as class – class(list_t), pointer
Module core_lspline¶
Module : core_lspline
Purpose : linear spline interpolation
-
class
lspline_t
¶
-
lspline_t_
(knot_x, knot_y, knot_dy) result (ls)¶
-
lspline_t_eval_derivs_
(knot_x, knot_y, deriv_type, knot_dy_a, knot_dy_b) result (ls)¶
-
lspline_t_y_func_
(knot_x_a, knot_x_b, y_func, y_tol, deriv_type, relative_tol, knot_dy_a, knot_dy_b) result (ls)¶
-
y_func
(x) result (y)¶
-
x_n_
(this) result (x)¶
-
y_1_
(this, x) result (y)¶
-
y_v_
(this, x) result (y)¶
-
phi_
(t)¶
-
y_n_
(this) result (y)¶
-
dy_1_
(this, x) result (dy)¶
-
dy_v_
(this, x) result (dy)¶
-
dphi_
(t)¶
-
dy_n_
(this) result (dy)¶
-
iy_1_1_
(this, x_a, x_b) result (iy)¶
-
iy_1_v_
(this, x_a, x_b) result (iy)¶
-
iy_v_1_
(this, x_a, x_b) result (iy)¶
-
iy_v_v_
(this, x_a, x_b) result (iy)¶
-
iphi_
(t)¶
-
findiff_dy_
(x, y, dy_a, dy_b) result (dy)¶
-
read_
(hg, ls)¶
-
write_
(hg, ls)¶
-
bcast_0_
(ls, root_rank)¶
-
attribs_
(this, x_min, x_max, n)¶
Module core_multi_func¶
Module : core_multi_func (version 1.0)
Purpose : systems of functions, evaluation and root
-
class
multi_func_t
¶
-
root_r_
(this, x_init, term_code, x_typical, F_typical, n_iter, broyden, global) result (x_out)¶
-
gradient_
(this, x, f_x, x_scale_) result (del_f)¶
-
eval_norm_
(this, a, a_scale_) result (f_n)¶
-
eval_r_
(this, x, F_x, status)¶
-
jac_r_
(this, x, F_x, x_scale_, J_)¶
-
line_search_
(this, x_a, x_n, f_norm_a, f_norm_n, F_n, g, p, status, max_taken, F_scale_, x_scale_)¶
-
hook_search_
(this, x_a, x_n, f_norm_a, f_norm_n, F_n, g, s_n, L, H, F_scale_, x_scale_, iter_count, delta, delta_prev, mu, phi, phi_prime, ret_status, max_taken)¶
-
hook_step_
(this, g, L, H, s_n, x_scale_, newtlen, delta, delta_prev, mu, phi, phi_prime, phi_prime_init, firsthook, s, newt_taken)¶
-
trust_region_update_
(this, x_a, f_norm_a, g, L, s, F_scale_, x_scale_, newt_taken, H, delta, ret_status, x_n_prev, F_n_prev, f_norm_n_prev, x_n, f_norm_n, F_n, max_taken)¶
-
nonlinear_solve_
(this, restart, F_a, g, M, M2, Jac, H, s_n, F_scale_, x_scale_)¶
-
nonlinear_solve_unfac_
(this, F_a, g, Jac, M, H, s_n, F_scale_, x_scale_)¶
-
QR_solve_
(this, M, M1, M2, b)¶
-
QR_decomp_
(this, M, M1, M2, singular)¶
-
QR_update_
(this, u, v, Z, M)¶
-
Q_form_
(this, M, M1, Z)¶
-
condest_
(this, M, M2, est)¶
-
rsolve_
(this, M, M2, b)¶
-
cholsolve_
(this, g, L, s)¶
-
choldecomp_pd_
(this, H, L)¶
-
lsolve_
(this, b, L, y)¶
-
ltsolve_
(this, y, L, x)¶
-
broyden_fac_
(this, x_a, x_n, F_a, F_n, Z, M, M2, F_scale_, x_scale_)¶
-
jac_rotate_
(this, i, a, b, Z, M)¶
-
stop_qq_
(this, x_a, x_n, F_n, ret_status, itncount, itnlimit, consec_max, term_code, g_a, f_norm_n, F_scale_, x_scale_)¶
Module core_order¶
Module : core_order
Purpose : sorting/searching
-
index_1d_${INFIX}_ (i, s) result (i1)
-
index_nd_${INFIX}_ (i1, s) result (i)
-
locate_${INFIX}_ (x, x_loc, i_loc)
-
locate_uniform_${INFIX}_ (x_0, dx, x_loc, i_loc)
Module core_parallel¶
Module : core_parallel
Purpose : parallel support
-
omp_size
()¶
-
omp_rank
()¶
-
init_parallel
()¶
-
final_parallel
()¶
-
barrier
()¶
-
bcast_${INFIX}_${BUFFER_RANK}_ (buffer, root_rank)
-
bcast_a_${BUFFER_RANK}_ (buffer, root)
-
bcast_seq_${INFIX}_${BUFFER_RANK}_ (buffer, i1_a, i1_b, root_rank)
-
bcast_alloc_${INFIX}_${BUFFER_RANK}_ (buffer, root_rank)
-
recv_${INFIX}_${BUFFER_RANK}_ (buffer, src_rank, tag)
-
recv_any_${INFIX}_${BUFFER_RANK}_ (buffer, src_rank, tag)
-
allgatherv_${INFIX}_${BUFFER_RANK}_ (buffer, recvcounts, displs)
-
allreduce_${INFIX}_${BUFFER_RANK}_ (buffer, op)
-
partition_tasks
(n, m, k_part)¶
Module core_random¶
Module : core_random
Purpose : random number generation (parallel)
-
random
()¶ Calculate a uniformly-distributed random number
function
-
set_seed
(seed)¶ Store the random seed
subroutine
- Parameters
seed – the random seed to be stored – integer, intent(in)
Module core_spline¶
Module : core_spline
Purpose : spline interpolation
-
class
spline_t
¶
-
spline_t_
(x, y, dy_dx) result (sp)¶
-
spline_t_eval_derivs_
(x, y, deriv_type, dy_dx_a, dy_dx_b) result (sp)¶
-
spline_t_y_func_
(x_a, x_b, y_func, y_tol, deriv_type, log_samp, relative_tol, dy_dx_a, dy_dx_b) result (sp)¶
-
y_func
(x) result (y)¶
-
interp_1_
(this, x) result (y)¶
-
interp_v_
(this, x) result (y)¶
-
phi_
(t)¶
-
psi_
(t)¶
-
interp_n_
(this) result (y)¶
-
deriv_1_
(this, x) result (dy_dx)¶
-
deriv_v_
(this, x) result (dy_dx)¶
-
dphi_dt_
(t)¶
-
dpsi_dt_
(t)¶
-
deriv_n_
(this) result (dy_dx)¶
-
integ_n_
(this) result (Y)¶
-
natural_dy_dx_
(x, y, dy_dx_a, dy_dx_b) result (dy_dx)¶
-
findiff_dy_dx_
(x, y, dy_dx_a, dy_dx_b) result (dy_dx)¶
-
mono_dy_dx_
(x, y, dy_dx_a, dy_dx_b) result (dy_dx)¶
-
read_
(hg, sp)¶
-
write_
(hg, sp)¶
-
bcast_0_
(sp, root_rank)¶
Module core_string¶
Module : core_string
Purpose : string manipulation
-
extract
(string, start, finish) result (substring)¶
-
insert
(string, start, substring) result (new_string)¶
-
remove
(string, start, finish) result (new_string)¶
-
replace_auto_
(string, start, substring) result (new_string)¶
-
replace_fixed_
(string, start, finish, substring) result (new_string)¶
-
replace_target_
(string, target, substring, every, back) result (new_string)¶
-
get_
(string, maxlen, iostat)¶
-
get_unit_
(unit, string, maxlen, iostat)¶
-
get_set_
(string, set, separator, maxlen, iostat)¶
-
get_unit_set_
(unit, string, set, separator, maxlen, iostat)¶
-
put_
(string, iostat)¶
-
put_unit_
(unit, string, iostat)¶
-
put_line_
(string, iostat)¶
-
put_line_unit_
(unit, string, iostat)¶
-
split
(string, word, set, separator, back)¶
Module core_system¶
Module : core_system
Purpose : operating system support
-
n_arg
()¶
-
get_arg_${INFIX}_ (number, value, status)
-
get_arg_a_
(number, value, status)¶
-
get_env_${INFIX}_ (name, value, status)
-
get_env_a_
(name, value, status)¶
Module core_table¶
Module : core_table
Purpose : monovariate tables
-
deriv
(x, y, deriv_type, dy_dx_a, dy_dx_b) result (dy_dx)¶ Calculate dy/dx via spline fitting
function
- Parameters
x(:) – x array – real(WP), intent(in)
y(:) – y array – real(WP), intent(in)
deriv_type – derivative type – character(*), intent(in)
dy_dx_a – derivative at the lower boundary – real(WP), optional, intent(in)
dy_dx_b – derivative at the upper boundary – real(WP), optional, intent(in)
- Rtype dydx(SIZE(x))
computed derivatve – real(WP)
-
integ
(x, y, deriv_type, dy_dx_a, dy_dx_b) result (Y_)¶ Calculate int_0^y y dx via spline fitting
function
- Parameters
x(:) – x array – real(WP), intent(in)
y(:) – y array – real(WP), intent(in)
deriv_type – derivative type – character(*), intent(in)
dy_dx_a – derivative at the lower boundary – real(WP), optional, intent(in)
dy_dx_b – derivative at the upper boundary – real(WP), optional, intent(in)
- Rtype Y_(SIZE(x))
computed integral – real(WP)
-
integ_def
(x, y, deriv_type, dy_dx_a, dy_dx_b) result (Y_def)¶ Calculate int_{x_min}^{x_max} y dx via spline fitting
function
- Parameters
x(:) – x array – real(WP), intent(in)
y(:) – y array – real(WP), intent(in)
deriv_type – derivative type – character(*), intent(in)
dy_dx_a – derivative at the lower boundary – real(WP), optional, intent(in)
dy_dx_b – derivative at the upper boundary – real(WP), optional, intent(in)
- Rtype Y_def
computed integral – real(WP)
Module core_volume¶
Module : core_volume
Purpose : volumetric data
-
class
volume_t
¶ A volume object
type
- Parameters
vr0(3) – volume starting position – real(WP)
vdr(3) – size of an element in each dimension of the volume – real(WP)
vn(3) – number of elements for each side of the volume – integer
node_type – type of nodes specified, either ‘CELL’ or ‘VERT’ – character(NODE_TYPE_LEN)
nodes_shape – returns the node shape – procedure
r_node – returns the node position coordinates – procedure
-
volume_t_
(vr0, vdr, vn, node_type) result (vl)¶ Construct the volume_t
function
- Parameters
vr0(3) – volume starting position – real(WP), intent(in)
vdr(3) – size of an element in each dimension of the volume – real(WP), intent(in)
vn(3) – number of elements for each side of the volume – integer, intent(in)
node_type – type of nodes specified, either ‘CELL’ or ‘VERT’ – character(*), intent(in)
- Rtype vl
created volume object –
volume_t
-
nodes_shape
(this) result (s)¶ Return the shape to use for node data arrays
function
- Parameters
this – volume object –
volume_t
- Rtype s(3)
shape of the volume object – integer
-
r_node
(this, vi)¶ Calculate the node coordinates
function
- Parameters
this – volume object –
volume_t
, intent(in)vi(i) – indices of the volume element that is sought after – integer, intent(in)
- Rtype r_node(3)
node coordinates – real(WP)
-
read_
(hg, vl)¶ Read the volume_t
subroutine
-
write_
(hg, vl)¶ Write the volume_t
subroutine