NAME
cxLatCoordNew
- create a lattice with coordinates and no data
C SPECIFICATION
#include <cx/DataAccess.h>
typedef enum {
cx_coord_uniform,
cx_coord_perimeter,
cx_coord_curvilinear
} cxCoordType;
cxLattice *cxLatCoordNew(long nDim, long dims[],
long nCoordVar, cxCoordType coordType)
FORTRAN SPECIFICATION
integer cx_coord_uniform
integer cx_coord_perimeter
integer cx_coord_curvilinear
parameter (cx_coord_uniform = 0)
parameter (cx_coord_perimeter = 1)
parameter (cx_coord_curvilinear = 2)
integer function cxLatCoordNew(nDim, dims, nCoordVar, coordType)
integer nDim, dims(nDim)
integer nCoordVar, coordType
PARAMETERS
-
nDim
-
Number of lattice dimensions.
-
dims
-
Array specifying length in each dimension.
-
nCoordVar
-
Number of elements per coordinate point.
-
coordType
-
Representation of coordinate information.
FUNCTION RETURN VALUE
Returns a pointer to a new lattice structure.
DESCRIPTION
cxLatCoordNew creates a cxLattice structure in data memory
and returns a pointer it.
The lattice created will have nDim dimensions; the length of
each dimension is specified in the array dims.
Coordinates of the type given by coordType will be created,
with nCoordVar floating point elements per coordinate.
nCoordVar does not have to be the same as nDim.
For example, to create a two dimensional lattice representing a surface in a
three dimensional space set nDim to 2 and nCoordVar to 3.
No space for data will be allocated.
See notes below.
Refer to "IRIS Explorer Module Writer's Guide" for more information on the
structure of cxLattice and its contents.
Lattice data structures are allocated from a shared memory arena on Silicon Graphics workstations running IRIX.
This shared memory is a limited
resource, so it is possible for the memory to be exhausted, causing
the allocation routine to fail. If the allocation routine fails, any
memory it has successfully allocated will be released, and a NULL
pointer will be returned. The subroutine cxDataAllocErrorGet
returns TRUE if the lattice could not be allocated.
See cxDataAllocErrorGet for more details on writing portable module code
that copes well with limited memory.
SEE ALSO
cxDataAllocErrorGet(3E),
cxLatNew(3E),
cxLatRootNew(3E),
cxLatDataNew(3E),
cxDataNew(3E),
cxLatPtrSet(3E)
NOTE
Many modules assume that a lattice has data. Modules built with the
IRIS Explorer module builder utility (mbuilder(1)) also require that coordinates be
present. It is strongly recommended that lattices be created with both
data and coordinates for compatibility.
cxLatCoordNew, used in conjunction with
cxDataNew and cxLatPtrSet, allows
the lattice, data and coordinates to be created separately.
Last modified: Mon Nov 18 13:50:15 GMT 1996
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996