This file defines functions that perform some common calculus operations.
Calculates the mean value of a real-valued array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Real-valued array |
Mean value
Calculates the mean value of a complex-valued array.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=wp), | intent(in), | dimension(:) | :: | x | Complex-valued array |
Mean value
This function calculates the numerical derivative of an array y with respect to x, using a central difference approximation at the interior points and forward/backward difference approximations at the exterior points. Note that since all the three approaches yield two-point approximations of the derivative, the mesh spacing of x does not necessarily have to be uniform.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Variable x |
|
real(kind=wp), | intent(in), | dimension(size(x)) | :: | y | Function y(x) |
Derivative dy/dx
Complex version of differentiate_array_re.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Variable x |
|
complex(kind=wp), | intent(in), | dimension(size(x)) | :: | y | Function y(x) |
Derivative dy/dx
This function calculates the integral of an array y with respect to x using a trapezoid approximation. Note that the mesh spacing of x does not necessarily have to be uniform.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Variable x |
|
real(kind=wp), | intent(in), | dimension(size(x)) | :: | y | Function y(x) |
Integral ∫y(x)·dx
Complex version of integrate_array_re.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Variable x |
|
complex(kind=wp), | intent(in), | dimension(size(x)) | :: | y | Function y(x) |
Integral ∫y(x)·dx
This function constructs a piecewise hermitian cubic interpolation of an array y(x) based on discrete numerical data, and subsequently evaluates the integral of the interpolation in the range (a,b). Note that the mesh spacing of x does not necessarily have to be uniform.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Variable x |
|
real(kind=wp), | intent(in), | dimension(size(x)) | :: | y | Function y(x) |
|
real(kind=wp), | intent(in) | :: | a | Left endpoint |
||
real(kind=wp), | intent(in) | :: | b | Right endpoint |
Integral ∫y(x)·dx
Complex version of integrate_range_re.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Variable x |
|
complex(kind=wp), | intent(in), | dimension(size(x)) | :: | y | Function y(x) |
|
real(kind=wp), | intent(in) | :: | a | Left endpoint |
||
real(kind=wp), | intent(in) | :: | b | Right endpoint |
Integral ∫y(x)·dx
This function constructs a piecewise hermitian cubic interpolation of an array y(x) based on discrete numerical data, and evaluates the interpolation at points p. Note that the mesh spacing of x does not necessarily have to be uniform.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Variable x |
|
real(kind=wp), | intent(in), | dimension(size(x)) | :: | y | Function y(x) |
|
real(kind=wp), | intent(in), | dimension(:) | :: | p | Interpolation domain p |
Interpolation result y(p)
Complex version of interpolate_array_re.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Variable x |
|
complex(kind=wp), | intent(in), | dimension(size(x)) | :: | y | Function y(x) |
|
real(kind=wp), | intent(in), | dimension(:) | :: | p | Interpolation domain p |
Interpolation result y(p)
Wrapper for interpolate_array_re that accepts scalar arguments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Variable x |
|
real(kind=wp), | intent(in), | dimension(size(x)) | :: | y | Function y(x) |
|
real(kind=wp), | intent(in) | :: | p | Interpolation point p |
Interpolation result y(p)
Complex version of interpolate_point_re.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Variable x |
|
complex(kind=wp), | intent(in), | dimension(size(x)) | :: | y | Function y(x) |
|
real(kind=wp), | intent(in) | :: | p | Interpolation point p |
Interpolation result y(p)
Perform a Piecewise Cubic Hermitian Interpolation of a matrix function using Catmull-Rom splines.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | Variable x |
|
real(kind=wp), | intent(in), | dimension(:,:,:) | :: | y | Function y(x) |
|
real(kind=wp), | intent(in) | :: | p | Interpolation point p |
Interpolation result y(p)
Populates an existing array with elements from first
to last
, inclusive.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(out), | dimension(:) | :: | array | Output array to populate |
|
real(kind=wp), | intent(in) | :: | first | Value of first element |
||
real(kind=wp), | intent(in) | :: | last | Value of last element |