A callback function that you can pass into df?integrateex1d to define integration computations.
FORTRAN:
status = dfsintegrcallback(n, lcell, llim, rcell, rlim, r, params)
status = dfdintegrcallback(n, lcell, llim, rcell, rlim, r, params)
C:
status = dfsIntegrCallBack(n, lcell, llim, rcell, rlim, r, params)
status = dfdIntegrCallBack(n, lcell, llim, rcell, rlim, r, params)
Name |
Type |
Description |
---|---|---|
n |
Fortran: INTEGER(KIND=8) C: long long* |
Number of pairs of integration limits. |
Fortran: INTEGER(KIND=8) DIMENSION(*) C: long long* |
Array of size n with indices of the cells that contain the left-side integration limits in array llim. |
|
llim |
Fortran: REAL(KIND=4) DIMENSION(*) for dfsintegrcallback REAL(KIND=8) DIMENSION(*) for dfdintegrcallback C: float* for dfsIntegrCallBack double* for dfdIntegrCallBack |
Array of size n that holds the left-side integration limits. |
rcell |
Fortran: INTEGER(KIND=8) DIMENSION(*) C: long long* |
Array of size n with indices of the cells that contain the right-side integration limits in array rlim. |
rlim |
Fortran: REAL(KIND=4) DIMENSION(*) for dfsintegrcallback REAL(KIND=8) DIMENSION(*) for dfdintegrcallback C: float* for dfsIntegrCallBack double* for dfdIntegrCallBack |
Array of size n that holds the right-side integration limits. |
r |
Fortran: REAL(KIND=4) DIMENSION(*) for dfsintegrcallback REAL(KIND=8) DIMENSION(*) for dfdintegrcallback C: float* for dfsIntegrCallBack double* for dfdIntegrCallBack |
Array of integration results. For packing the results in row-major format, follow the instructions described in df?interpolate1d/df?interpolateex1d. |
params |
Fortran: INTEGER DIMENSION(*) C: void* |
Pointer to user-defined parameters of the callback function. |
Name |
Type |
Description |
---|---|---|
status |
Fortran: INTEGER C: int |
The status returned by the callback function:
|
When passed into the df?integrateex1d routine, this function defines integration computations. If at least one of the integration limits is outside the interpolation interval [a, b], the library decomposes the integration into sub-intervals that belong to the extrapolation range to the left of a, the extrapolation range to the right of b, and the interpolation interval [a, b], as follows:
The value of the integral is the sum of integral values obtained on the sub-intervals.