Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

df?integrate1d/df?integrateex1d

Computes a spline-based integral.

Syntax

status = dfsintegrate1d(task, method, nlim, llim, llimhint, rlim, rlimhint, ldatahint, rdatahint, r, rhint)

status = dfdintegrate1d(task, method, nlim, llim, llimhint, rlim, rlimhint, ldatahint, rdatahint, r, rhint)

status = dfsintegrateex1d(task, method, nlim, llim, llimhint, rlim, rlimhint, ldatahint, rdatahint, r, rhint, le_cb, le_params, re_cb, re_params, i_cb, i_params, search_cb, search_params)

status = dfdintegrateex1d(task, method, nlim, llim, llimhint, rlim, rlimhint, ldatahint, rdatahint, r, rhint, le_cb, le_params, re_cb, re_params, i_cb, i_params, search_cb, search_params)

Include Files

  • mkl_df.f90

Input Parameters

Name

Type

Description

task

TYPE(DF_TASK)

Descriptor of the task.

method

INTEGER

Integration method. The supported value is DF_METHOD_PP.

nlim

INTEGER

Number of pairs of integration limits.

llim

REAL(KIND=4) DIMENSION(*) for dfsintegrate1d/dfsintegrateex1d

REAL(KIND=8) DIMENSION(*) for dfdintegrate1d/dfdintegrateex1d

Array of size nlim that defines the left-side integration limits.

llimhint

INTEGER

A flag describing the structure of the left-side integration limits llim. For the list of possible values of llimhint, see table "Hint Values for Integration Limits". If you set the flag to the DF_NO_HINT value, the library assumes that the left-side integration limits define a non-uniform partition.

rlim

REAL(KIND=4) DIMENSION(*) for dfsintegrate1d/dfsintegrateex1d

REAL(KIND=8) DIMENSION(*) for dfdintegrate1d/dfdintegrateex1d

Array of size nlim that defines the right-side integration limits.

rlimhint

INTEGER

A flag describing the structure of the right-side integration limits rlim. For the list of possible values of rlimhint, see table "Hint Values for Integration Limits". If you set the flag to the DF_NO_HINT value, the library assumes that the right-side integration limits define a non-uniform partition.

ldatahint

REAL(KIND=4) DIMENSION(*) for dfsintegrate1d/dfsintegrateex1d

REAL(KIND=8) DIMENSION(*) for dfdintegrate1d/dfdintegrateex1d

Array that contains additional information about the structure of partition x and left-side integration limits. For details on the ldatahint array, see table "Structure of the datahint Array" in the description of the df?intepolate1d function.

rdatahint

REAL(KIND=4) DIMENSION(*) for dfsintegrate1d/dfsintegrateex1d

REAL(KIND=8) DIMENSION(*) for dfdintegrate1d/dfdintegrateex1d

Array that contains additional information about the structure of partition x and right-side integration limits. For details on the rdatahint array, see table "Structure of the datahint Array" in the description of the df?intepolate1d function.

rhint

INTEGER

A flag describing the structure of the results. For the list of possible values of rhint, see table "Hint Values for Integration Results". If you set the flag to the DF_NO_HINT value, the library stores the results in row-major format.

le_cb

INTEGER

User-defined callback function for integration on interval [ llim(i), min(rlim(i), a)) for llim(i) < a .

le_params

INTEGER DIMENSION(*)

Pointer to additional user-defined parameters passed by the library to the le_cb function.

re_cb

INTEGER

User-defined callback function for integration on interval [max(llim(i), b), rlim(i)) for rlim(i)b.

re_params

INTEGER DIMENSION(*)

Pointer to additional user-defined parameters passed by the library to the re_cb function.

i_cb

INTEGER

User-defined callback function for integration on interval [max(a, llim(i), ), min(rlim(i), b)).

i_params

INTEGER DIMENSION(*)

Pointer to additional user-defined parameters passed by the library to the i_cb function.

search_cb

INTEGER

User-defined callback function for computing indices of cells that can contain interpolation sites.

search_params

INTEGER DIMENSION(*)

Pointer to additional user-defined parameters passed by the library to the search_cb function.

Output Parameters

Name

Type

Description

status

INTEGER

Status of the routine:

  • DF_STATUS_OK if the routine execution completed successfully.
  • Non-zero error code if the routine execution failed. See "Task Status and Error Reporting" for error code definitions.

r

REAL(KIND=4) DIMENSION(*) for dfsintegrate1d/dfsintegrateex1d

REAL(KIND=8) DIMENSION(*) for dfdintegrate1d/dfdintegrateex1d

Array of integration results. The size of the array should be sufficient to hold nlim*ny values, where ny is the dimension of the vector-valued function. The integration results are packed according to the settings in rhint.

Description

The df?integrate1d/df?integrateex1d routine computes spline-based integral on user-defined intervals

,

where rli = rlim(i), lli = llim(i), and i = 1, ..., ny.

If rlim(i) < llim(i), the routine returns

The routine supports the following hint values for integration results:

Hint Values for Integration Results

Value

Description

DF_MATRIX_STORAGE_ROWS

Data is stored in row-major format according to C conventions.

DF_MATRIX_STORAGE_COLS

Data is stored in column-major format according to Fortran conventions.

DF_NO_HINT

No hint is provided. By default, the coordinates of vector-valued function y are provided and stored in row-major format.

A common structure of the storage formats for the integration results is as follows:

  • Row-major format

    I(1, 1)

    ...

    I(1, nlim)

    ...

    ...

    ...

    I (ny, 1)

    ...

    I(ny , nlim)

  • Column-major format

    I(1, 1)

    ...

    I (ny, 1)

    ...

    ...

    ...

    I(1, nlim)

    ...

    I(ny , nlim)

Using the llimhint and rlimhint parameters, you can provide the following hint values for integration limits:

Hint Values for Integration Limits

Value

Description

DF_SORTED_DATA

Integration limits are sorted in the ascending order and define a non-uniform partition.

DF_NON_UNIFORM_PARTITION

Partition defined by integration limits is non-uniform.

DF_UNIFORM_PARTITION

Partition defined by integration limits is uniform.

DF_NO_HINT

No hint is provided. By default, partition defined by integration limits is interpreted as non-uniform.

To compute integration with splines unsupported in the Data Fitting component, use the extended version of the routine df?integrateex1d. With this routine, you can provide user-defined callback functions that compute:

  • integrals within, to the left of, or to the right of the interpolation interval [a, b]
  • indices of cells that contain the provided integration limits or can serve as an approximation for computing the exact indices of such cells

If you do not pass callback functions, the routine uses the default settings.