get/set the number of components (nnode_data) in a Node_Data
int FLDget_node_data_ncomp (
OMobj_id field,
int *nnode_comp);
int FLDset_node_data_ncomp (
OMobj_id field,
int nnode_comp);
These routines set and get the number of components (nnode_data) in a Node_Data.
The OMobj_id of a field that contains a Node_Data subobject.
This example, some fragments from modules/crop.c, shows crop retrieving the number of components in the input field object, and immediately setting the number of components in its output field object to the same value.
int FUNCcrop (in, min, max, out)
OMobj_id in, out;
int *min, *max;
{
int ndim, *dims, npoints, fld_type, i, j, n, stat, comp,
ncomp, null_flag;
...
if (FLDget_node_data_ncomp(in, &ncomp)!= 1) {
ERR_RETURN("Error getting ncomp");
}
if (FLDset_node_data_ncomp (out, ncomp)!= 1) {
ERR_RETURN("Error setting nnode_data");
}
...