7.11
Geometry handling routines
Since the
Scotch
project is based on algorithms that rely on topology data only,
geometry data do not play an important role in the
libScotch
library. They are
only relevant to programs that display graphs, such as the
gout
program. However,
since all routines that are used by the programs of the
Scotch
distributions have
an interface in the
libScotch
library, there exist geometry handling routines in it,
which manipulate
SCOTCH Geom
structures.
Apart from the routines that create, destroy or access
SCOTCH Geom
structures,
all of the routines in this section are input/output routines, which read or write
both
SCOTCH Graph
and
SCOTCH Geom
structures. We have chosen to define the
interface of the geometry-handling routines such that they also handle graph or
mesh topology because some external file formats mix these data, and that we
wanted our routines to be able to read their data on the fly from streams that can
only be read once, such as communication pipes. Having both aspects taken into
account in a single call makes the writing of file conversion tools, such as
gcv
and
mcv
, very easy. When the file format from which to read or into which to write
mixes both sorts of data, the geometry file pointer can be set to
NULL
, as it will not
be used.
7.11.1
SCOTCH geomInit
Synopsis
int SCOTCH geomInit (SCOTCH Geom *
geomptr)
scotchfgeominit (doubleprecision (*)
geomdat,
integer
ierr)
Description
The
SCOTCH geomInit
function initializes a
SCOTCH Geom
structure so as to
make it suitable for future operations. It should be the first function to be
called upon a
SCOTCH Geom
structure. When the geometrical data is no longer
of use, call function
SCOTCH geomExit
to free its internal structures.
Return values
SCOTCH geomInit
returns 0 if the geometrical structure has been successfully
initialized, and 1 else.
7.11.2
SCOTCH geomExit
Synopsis
void SCOTCH geomExit (SCOTCH Geom *
geomptr)
scotchfgeomexit (doubleprecision (*)
geomdat)
Description
113