Scotch Brand 5.1.10 User Manual

Page 114

Advertising
background image

The SCOTCH geomExit function frees the contents of a SCOTCH Geom structure
previously initialized by SCOTCH geomInit. All subsequent calls to SCOTCH
*Geom*

routines other than SCOTCH geomInit, using this structure as param-

eter, may yield unpredictable results.

7.11.3

SCOTCH geomData

Synopsis

void SCOTCH geomData (const SCOTCH Geom *

geomptr,

SCOTCH Num *

dimnptr,

double **

geomtab)

scotchfgeomdata (doubleprecision (*)

geomdat,

doubleprecision (*)

indxtab,

integer*num

dimnnbr,

integer*idx

geomidx)

Description

The SCOTCH geomData routine is a multiple accessor to the contents of
SCOTCH Geom

structures.

dimnptr

is the pointer to a location that will hold the number of dimensions

of the graph vertex or mesh node vertex coordinates, and will therefore be
equal to 1, 2 or 3. geomtab is the pointer to a location that will hold the
reference to the geometry coordinates, as defined in section 7.2.4.

Any of these pointers can be set to NULL on input if the corresponding infor-
mation is not needed. Else, the reference to a dummy area can be provided,
where all unwanted data will be written.

Since there are no pointers in Fortran, a specific mechanism is used to allow
users to access the coordinate array. The scotchfgeomdata routine is passed
an integer array, the first element of which is used as a base address from
which all other array indices are computed. Therefore, instead of returning a
reference, the routine returns an integer, which represents the starting index
of the coordinate array with respect to the base input array. For instance, if
some base array myarray(1) is passed as parameter indxtab, then the first
cell of array geomtab will be accessible as myarray(geomidx). In order for
this feature to behave properly, the indxtab array must be double-precision-
aligned with the geometry array. This is automatically enforced on most
systems, but some care should be taken on systems that allow one to access
data that is not double-aligned. On such systems, declaring the array after
a dummy doubleprecision array can coerce the compiler into enforcing the
proper alignment. Also, on 32 64 architectures, such indices can be larger
than the size of a regular INTEGER. This is why the indices to be returned
are defined by means of a specific integer type. See Section 7.1.4 for more
information on this issue.

114

Advertising