Octopus
math.F90 File Reference

Go to the source code of this file.

Modules

module  math_oct_m
 This module is intended to contain "only mathematical" functions and procedures.
 

Data Types

interface  math_oct_m::is_close
 
interface  math_oct_m::diagonal_matrix
 
interface  math_oct_m::upper_triangular_to_hermitian
 
interface  math_oct_m::lower_triangular_to_hermitian
 
interface  math_oct_m::interpolate
 This is the common interface to a simple-minded polynomical interpolation procedure (simple use of the classical formula of Lagrange). More...
 
interface  math_oct_m::log2
 
interface  math_oct_m::pad
 

Functions/Subroutines

elemental logical function math_oct_m::dis_close_scalar (x, y, rtol, atol)
 Are \(x\) and \(y\) equal within a tolerance. More...
 
elemental logical function math_oct_m::zis_close_scalar (x, y, rtol, atol)
 Same as dis_close_scalar for complex numbers. More...
 
pure integer function, dimension(dim, dim) math_oct_m::idiagonal_matrix (dim, diag)
 Currently only returns a matrix whose diagonal elements are all the same. Note that the real and complex versions are in math_inc.F90. More...
 
recursive real(real64) function, public math_oct_m::hermite (n, x)
 
recursive integer function, public math_oct_m::factorial (n)
 
subroutine, public math_oct_m::ylmr_cmplx (xx, li, mi, ylm)
 Computes spherical harmonics ylm at position (x, y, z) More...
 
subroutine, public math_oct_m::ylmr_real (xx, li, mi, ylm)
 This is a Numerical Recipes-based subroutine computes real spherical harmonics ylm at position (x, y, z): ylm = c * plm( cos(theta) ) * sin(m*phi) for m < 0 ylm = c * plm( cos(theta) ) * cos(m*phi) for m >= 0 with (theta,phi) the polar angles of r, c a positive normalization. More...
 
subroutine, public math_oct_m::weights (N, M, cc, side)
 Compute the weights for finite-difference calculations: More...
 
real(real64) pure function, public math_oct_m::ddelta (i, j)
 
subroutine, public math_oct_m::make_idx_set (n, out, length, in)
 Construct out(1:length) = (/1, ..., n/) if in is not present, out(1:length) = in otherwise. More...
 
logical function, public math_oct_m::member (n, a)
 Considers a(1:ubound(a, 1)) as an integer set and checks if n is a member of it. More...
 
subroutine, public math_oct_m::interpolation_coefficients (nn, xa, xx, cc)
 
logical pure function, public math_oct_m::even (n)
 Returns if n is even. More...
 
logical pure function, public math_oct_m::odd (n)
 Returns if n is odd. More...
 
subroutine, public math_oct_m::cartesian2hyperspherical (x, u)
 Performs a transformation of an n-dimensional vector from Cartesian coordinates to hyperspherical coordinates. More...
 
subroutine, public math_oct_m::hyperspherical2cartesian (u, x)
 Performs the inverse transformation of cartesian2hyperspherical. More...
 
subroutine, public math_oct_m::hypersphere_grad_matrix (grad_matrix, r, x)
 Gives the hyperspherical gradient matrix, which contains the derivatives of the Cartesian coordinates with respect to the hyperspherical angles. More...
 
integer(int64) pure function math_oct_m::pad88 (size, blk)
 
integer(int64) pure function math_oct_m::pad48 (size, blk)
 
integer(int64) pure function math_oct_m::pad8 (size, blk)
 
integer pure function math_oct_m::pad4 (size, blk)
 
integer pure function, public math_oct_m::pad_pow2 (size)
 create array size, which is padded to powers of 2 More...
 
real(real64) pure function math_oct_m::dlog2 (xx)
 
integer pure function math_oct_m::ilog2 (xx)
 
integer(int64) pure function math_oct_m::llog2 (xx)
 
complex(real64) pure function, public math_oct_m::exponential (z)
 Wrapper for exponential. More...
 
complex(real64) pure function, public math_oct_m::phi1 (z)
 Compute phi1(z) = (exp(z)-1)/z. More...
 
complex(real64) pure function, public math_oct_m::phi2 (z)
 Compute phi2(z) = (phi1(z)-1)/z = (exp(z) - z - 1)/z^2. More...
 
real(real64) pure function, public math_oct_m::square_root (x)
 Wrapper for sqrt. More...
 
logical function, public math_oct_m::is_prime (n)
 
subroutine, public math_oct_m::generate_rotation_matrix (R, ff, tt)
 Generates a rotation matrix R to rotate a vector f to t. More...
 
subroutine, public math_oct_m::numder_ridders (x, h, res, err, f)
 Numerical derivative (Ridder`s algorithm). More...
 
pure complex(real64) function, dimension(1:3), public math_oct_m::dzcross_product (a, b)
 
pure complex(real64) function, dimension(1:3), public math_oct_m::zdcross_product (a, b)
 
subroutine, public math_oct_m::generalized_laguerre_polynomial (np, nn, mm, xx, cx)
 
subroutine math_oct_m::dupper_triangular_to_hermitian (nn, aa)
 
subroutine math_oct_m::zupper_triangular_to_hermitian (nn, aa)
 
subroutine math_oct_m::dlower_triangular_to_hermitian (nn, aa)
 
subroutine math_oct_m::zlower_triangular_to_hermitian (nn, aa)
 
subroutine, public math_oct_m::dsymmetrize_matrix (nn, aa)
 
subroutine, public math_oct_m::dzero_small_elements_matrix (nn, aa, tol)
 
pure complex(real64) function, dimension(dim, dim) math_oct_m::zdiagonal_matrix (dim, diag)
 Currently only returns a matrix whose diagonal elements are all the same. Note that the integer version is in math.F90. More...
 
subroutine math_oct_m::zinterpolate_2 (xa, ya, x, y)
 
subroutine math_oct_m::zinterpolate_1 (xa, ya, x, y)
 
subroutine math_oct_m::zinterpolate_0 (xa, ya, x, y)
 
pure complex(real64) function, dimension(1:3), public math_oct_m::zcross_product (a, b)
 
pure real(real64) function, dimension(dim, dim) math_oct_m::ddiagonal_matrix (dim, diag)
 Currently only returns a matrix whose diagonal elements are all the same. Note that the integer version is in math.F90. More...
 
subroutine math_oct_m::dinterpolate_2 (xa, ya, x, y)
 
subroutine math_oct_m::dinterpolate_1 (xa, ya, x, y)
 
subroutine math_oct_m::dinterpolate_0 (xa, ya, x, y)
 
pure real(real64) function, dimension(1:3), public math_oct_m::dcross_product (a, b)