Synopsis
get/set the number of cells (ncells) within one cell_set of a Cell_Data or Cells Grid
int FLDget_ncells (
OMobj_id cell_set,
int *ncells);
int FLDset_ncells (
OMobj_id cell_set,
int ncells);
Description
These routines get/set the number of cells (ncells) within one element of a cell_set array within either a Cell_Data and/or a Cells Grid cell_set.
Note that calling FLDget_ncells() on a Poly cell set (Polyline, Polytri, or Polyhedron (for polygons)) returns the number of primitive (triangular) cells in the cell set, while FLDget_npolys() returns the number of lines, triangles or polygons respectively.
Parameters
OMobj_id cell_set
The OMobj_id of one element of the cell_set[ncell_sets] array within a Cell_Data or Cells Grid, as returned by the FLDget_cell_set routine.
int *ncells
int ncells
In FLDget_ncells, ncells is a pointer to an integer in which the number of cells (ncells) will be returned.
In FLDset_ncells, ncells is an integer specifying the number of cells (ncells).
Example
This example, a fragment from modules/advect.c, shows advector getting its ncells from the input field, and setting the ncells in the output field.
Related routines