df?searchcellscallback

A callback function for user-defined search to be passed into df?interpolateex1d or df?searchcellsex1d.

Syntax

FORTRAN:

status = dfssearchcellscallback(n, site, cell, flag, params)

status = dfdsearchcellscallback(n, site, cell, flag, params)

C:

status = dfsSearchCellsCallBack(n, site, cell, flag, params)

status = dfdSearchCellsCallBack(n, site, cell, flag, params)

Include Files

Input Parameters

Name

Type

Description

n

Fortran: INTEGER(KIND=8)

C: long long*

Number of interpolation sites.

site

Fortran: REAL(KIND=4) DIMENSION(*) for dfssearchcellscallback

REAL(KIND=8) DIMENSION(*) for dfdsearchcellscallback

C: float* for dfsSearchCellsCallBack

double* for dfdSearchCellsCallBack

Array of interpolation sites of size n.

cell

Fortran: INTEGER(KIND=8) DIMENSION(*)

C: long long*

Array of size n that returns indices of the cells computed by the callback function.

flag

Fortran: INTEGER(KIND=4) DIMENSION(*)

C: int*

Array of size n, with values set as follows:

  • If the cell with index cell[i] contains site[i], set flag[i] to 1.
  • Otherwise, set flag[i] to zero. In this case, the library interprets the index as an approximation and computes the index of the cell containing site[i] by using the provided index as a starting point for the search.

params

Fortran: INTEGER DIMENSION(*)

C: void*

Pointer to user-defined parameters of the callback function.

Output Parameters

Name

Type

Description

status

Fortran: INTEGER

C: int

The status returned by the callback function:

  • Zero indicates successful completion of the callback operation.
  • A negative value indicates an error.
  • The DF_STATUS_EXACT_RESULT status indicates that cell indices returned by the callback function are exact. In this case, you do not need to initialize entries of the flag array.

  • A positive value indicates a warning.
See "Task Status and Error Reporting" for error code definitions.

Description

When passed into the df?interpolateex1d or df?searchcellsex1d routine, this function performs a user-defined search.

See Also


Submit feedback on this help topic