The Field object stores scalar or vector data on either regular or irregular grids. Each element, in addition to a position vector (explicitly stored in the irregular grid case) may have a mask element (to denote whether a valid data element is held) and a vector of integer indices, to index the point on a mesh.
int FIELD_copy
Arguments:
Field to Pointer to source Field object
Field from Pointer to destination Field objectCopy the field object, including allocation of data, title etc.
int FIELD_copy_grid
Arguments:
Field to Pointer to source Field object
Field from Pointer to destination Field objectCopy the grid definition from one field object to another
int FIELD_allocate_irregular_memory
Arguments:
Field d pointer to Field object to be manipulated
int no Number of components of each element vector
int ndd Number of components of element position vector
int ndi Number of components of element index vectorAllocate memory for an irregular field object. This assumes that the number of grid elements (d->ng) has already been set.
int FIELD_allocate_regular_memory
Arguments:
Field d pointer to Field object to be manipulated
int no Number of components of each element vectorAllocate memory for a regular field object. This assumes that the number of grid elements (d->ng) has already been set.
int FIELD_get_value
Arguments:
Field field Pointer to Field object to be interrogated
int index Sequence number of the required element
float *p Returned data value
int FIELD_get_position_vector
Arguments:
Field field Pointer to Field object to be interrogated
int index Sequence number of the required element
float p[3] Returned positionObtain the position of a grid point.
int FIELD_get_grid_size
Arguments:
Field field Pointer to Field object to be interrogatedReturn the number of grid points.
int FIELD_set_mask
Arguments:
Field field Pointer to Field object to be manipulated
int point Sequence number of elementSet the mask element corresponding to a particular field element.
int FIELD_get_mask
Arguments:
Field field Pointer to Field object to be interrogated
int point Sequence number of elementReturn the mask value corresponding to a particular field element.
int FIELD_reset_mask
Arguments:
Field field Pointer to Field object to be manipulatedSet all mask elements to zero.
int FIELD_set_masked_value
Arguments:
Field field pointer to Field object to be manipulated
float value New valueSet all elements of a Field to a constant only of the corresponding element of the mask is set.
int FIELD_set_value
Arguments:
Field field pointer to Field object to be manipulated
int index Sequence number of the element to change
float *value New valueSet an element.
int FIELD_increment_value
Arguments:
Field field Pointer to Field object to be manipulated
int index Sequence number of the required element
float *value Pointer to value to be added onIncrement an element by a constant.
int FIELD_scale_regular
Arguments:
Field field Pointer to Field to be modified
float scal0 Scaling for first axis direction
float scal1 Scaling for second axis direction
float scal2 Scaling for third axis directionScaling a regular grid around its centre.
int FIELD_transform
Arguments:
Field field Pointer to input Field object
Field result Pointer to output Field object
float *parms Transformation paramatersApply rotation translation and scale to the grid.
Translations are in the grid coordinate system, at timeof staring the edit rotations are about axes through the plot centre applied in order x, y, z. size alterations leave the centre position unchanged.
Order of parameters:
parms[0-2] Scale factors
parms[3-5] Rotations
parms[6-8] Translations
int FIELD_define_unit
Arguments:
Field p Pointer to Field object
char *unit String containing unitProvide definition of the unit used. The input string is copied to local memory.
int FIELD_set_title
Arguments:
Field p Pointer to Field object
char *title String containg required titleDefine title of the field structure. The input string is copied to local memory.