FLDget_node_data_ncomp


Synopsis

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);

Description

These routines set and get the number of components (nnode_data) in a Node_Data.

Parameters

OMobj_id field

The OMobj_id of a field that contains a Node_Data subobject.

int *nnode_comp
int nnode_comp

In FLDget_node_data_ncomp, *nnode_comp is a pointer to an integer in which the number of components (nnode_data) will be returned.

In FLDset_node_data_ncomp, nnode_comp is an integer that sets the number of components (nnode_data).

Example

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");
}
...

Related routines