Download downloading
Transcript
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 information 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-precisionaligned 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. 7.11.4 SCOTCH graphGeomLoadChac Synopsis int SCOTCH graphGeomLoadChac (SCOTCH Graph * SCOTCH Geom * FILE * FILE * const char * scotchfgraphgeomloadchac (doubleprecision (*) doubleprecision (*) integer integer character (*) grafptr, geomptr, grafstream, geomstream, string) grafdat, geomdat, graffildes, geomfildes, string) Description The SCOTCH graphGeomLoadChac routine fills the SCOTCH Graph structure pointed to by grafptr with the source graph description available from stream grafstream in the Chaco graph format [24]. Since this graph format does not handle geometry data, the geomptr and geomstream fields are not used, as well as the string field. Fortran users must use the FNUM function to obtain the number of the Unix file descriptor graffildes associated with the logical unit of the graph file. Return values SCOTCH graphGeomLoadChac returns 0 if the graph structure has been successfully allocated and filled with the data read, and 1 else. 106