7.0
general documentation
cs_interpolate.h File Reference
#include "cs_defs.h"
#include "cs_mesh_location.h"
+ Include dependency graph for cs_interpolate.h:

Go to the source code of this file.

Typedefs

typedef void() cs_interpolate_from_location_t(void *input, cs_datatype_t datatype, int val_dim, cs_lnum_t n_points, const cs_lnum_t point_location[], const cs_real_3_t point_coords[], const void *location_vals, void *point_vals)
 Function pointer for interpolatation of values defined on a mesh location at a given set of points. More...
 

Functions

void cs_interpolate_from_location_p0 (void *input, cs_datatype_t datatype, int val_dim, cs_lnum_t n_points, const cs_lnum_t point_location[], const cs_real_3_t point_coords[], const void *location_vals, void *point_vals)
 Interpolate values defined on a mesh location at a given set of points using a P0 interpolation. More...
 
void cs_interpolate_from_location_p1 (void *input, cs_datatype_t datatype, int val_dim, cs_lnum_t n_points, const cs_lnum_t point_location[], const cs_real_3_t point_coords[], const void *location_vals, void *point_vals)
 Interpolate values defined on a mesh location at a given set of points using a P1 interpolation. More...
 

Typedef Documentation

◆ cs_interpolate_from_location_t

typedef void() cs_interpolate_from_location_t(void *input, cs_datatype_t datatype, int val_dim, cs_lnum_t n_points, const cs_lnum_t point_location[], const cs_real_3_t point_coords[], const void *location_vals, void *point_vals)

Function pointer for interpolatation of values defined on a mesh location at a given set of points.

Parameters
[in,out]inputpointer to optional (untyped) value or structure.
[in]datatypeassociated datatype
[in]val_dimdimension of data values
[in]n_pointsnumber of interpolation points
[in]point_locationlocation of points in mesh elements
[in]point_coordspoint coordinates
[in]location_valsvalues at mesh location
[out]point_valsinterpolated values at points

Function Documentation

◆ cs_interpolate_from_location_p0()

void cs_interpolate_from_location_p0 ( void *  input,
cs_datatype_t  datatype,
int  val_dim,
cs_lnum_t  n_points,
const cs_lnum_t  point_location[],
const cs_real_3_t  point_coords[],
const void *  location_vals,
void *  point_vals 
)

Interpolate values defined on a mesh location at a given set of points using a P0 interpolation.

This function allows unlocated points (with point_location < 0), to which the value 0 is assigned.

Parameters
[in,out]inputpointer to optional (untyped) value or structure.
[in]datatypeassociated datatype
[in]val_dimdimension of data values
[in]n_pointsnumber of interpolation points
[in]point_locationlocation of points in mesh elements
[in]point_coordspoint coordinates
[in]location_valsvalues at mesh location
[out]point_valsinterpolated values at points

(DOXYGEN_SHOULD_SKIP_THIS)

This function allows unlocated points (with point_location < 0), to which the value 0 is assigned.

Parameters
[in,out]inputpointer to optional (untyped) value or structure.
[in]datatypeassociated datatype
[in]val_dimdimension of data values
[in]n_pointsnumber of interpolation points
[in]point_locationlocation of points in mesh elements
[in]point_coordspoint coordinates
[in]location_valsvalues at mesh location
[out]point_valsinterpolated values at points

◆ cs_interpolate_from_location_p1()

void cs_interpolate_from_location_p1 ( void *  input,
cs_datatype_t  datatype,
int  val_dim,
cs_lnum_t  n_points,
const cs_lnum_t  point_location[],
const cs_real_3_t  point_coords[],
const void *  location_vals,
void *  point_vals 
)

Interpolate values defined on a mesh location at a given set of points using a P1 interpolation.

This function assumes the input is a field name. If no field matches the name, a "generic" interpolation (assuming homogeneous Neumann boundary conditions) is used).

The P1 interpolation is based on a local least-squares gradient, so it is assumed that ghost values of the localtion_vals array are synchronized if present.

If the field's boundary values (i.e. associated field) are known, they are used in the interpolation. Otherwise, if boundary conditions are defined, they are used. When neither boundary values nor boundary conditions are known, homogeneous Neumann boundary conditions are assumed.

Parameters
[in,out]inputpointer to optional (untyped) value or structure.
[in]datatypeassociated datatype
[in]val_dimdimension of data values
[in]n_pointsnumber of interpolation points
[in]point_locationlocation of points in mesh elements
[in]point_coordspoint coordinates
[in]location_valsvalues at mesh location
[out]point_valsinterpolated values at points