Method of Moments module. More...
Public Member Functions | |
subroutine | wheeler_algorithm (m, xi, w) |
Wheeler algorithm. More... | |
subroutine | moments_correction (m, iter) |
Moments correction. More... | |
real *8 function | beta_function (z, w) |
Beta function. More... | |
real *8 function | gammln (xx) |
Gamma function logarithm. More... | |
subroutine | coefficient (nmax, c) |
Binomial Coefficient. More... | |
Public Attributes | |
integer | n_nodes |
Number of nodes for the quadrature. More... | |
integer, parameter | max_nmom = 20 |
Maximum number of moments. More... | |
integer | n_mom |
Number of moments. More... | |
Method of Moments module.
This module contains the procedures and the variables for the method of moments.
Definition at line 11 of file moments.f90.
real*8 function moments_module::beta_function | ( | real*8, intent(in) | z, |
real*8, intent(in) | w | ||
) |
Beta function.
This function evaluates the beta function B(z,w). This is the name used by Legendre and Whittaker and Watson (1990) for the beta integral (also called the Eulerian integral of the first kind).
[in] | z | first parameter of the beta function |
[in] | w | second parameter of the beta function |
Definition at line 316 of file moments.f90.
subroutine moments_module::coefficient | ( | integer, intent(in) | nmax, |
integer, dimension(0:nmax,0:nmax), intent(out) | c | ||
) |
Binomial Coefficient.
This subroutine evaluates the binomial coefficients c(n,m) and stores the values in the matrix (array) c(n,m). The coefficient is used for the computation of the moments of the normal distribution. From: http://www-users.york.ac.uk/~hcb1/fortranY1/fortran90/array15.f90
[in] | nmax | max index of the binomial coefficent |
[out] | c | array of the binomial coefficients |
Definition at line 414 of file moments.f90.
real*8 function moments_module::gammln | ( | real*8 | xx | ) |
Gamma function logarithm.
This function returns the logarithm of the gamma function, gammaln(A) = log(gamma(A)). Input must be nonnegative and real. Converted from Numerical Recipes.
[in] | xx | argument of the function |
Definition at line 346 of file moments.f90.
subroutine moments_module::moments_correction | ( | real*8, dimension(:), intent(inout) | m, |
integer, intent(out) | iter | ||
) |
Moments correction.
This subroutine compute uses the algorithm of McGraw for the correction of an unrealizable moment set. The subroutine first analyzes the moment set and then, if it is unrealizable, identifies the moemnt that has to be changed the least to make the set realizable. Modified from Marchisio and Fox 2013
[in,out] | m | moments |
[out] | iter | number of iterations required |
Definition at line 171 of file moments.f90.
subroutine moments_module::wheeler_algorithm | ( | real*8, dimension(n_mom), intent(in) | m, |
real*8, dimension(n_nodes), intent(out) | xi, | ||
real*8, dimension(n_nodes), intent(out) | w | ||
) |
Wheeler algorithm.
This subroutine compute quadrature approximation with the Wheeler algorithm. Given the moments m from 0 to 2*n_nodes-1 it finds the nodes xi and the weights w. Modified from Marchisio and Fox 2013
[in] | m | moments |
[out] | xi | abscissas |
[out] | w | weights |
Definition at line 41 of file moments.f90.
integer, parameter moments_module::max_nmom = 20 |
Maximum number of moments.
Definition at line 19 of file moments.f90.
integer moments_module::n_mom |
Number of moments.
Definition at line 22 of file moments.f90.
integer moments_module::n_nodes |
Number of nodes for the quadrature.
Definition at line 16 of file moments.f90.