1
/* Copyright 2004,2007 ENSEIRB, INRIA & CNRS
3
** This file is part of the Scotch software package for static mapping,
4
** graph partitioning and sparse matrix ordering.
6
** This software is governed by the CeCILL-C license under French law
7
** and abiding by the rules of distribution of free software. You can
8
** use, modify and/or redistribute the software under the terms of the
9
** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following
10
** URL: "http://www.cecill.info".
12
** As a counterpart to the access to the source code and rights to copy,
13
** modify and redistribute granted by the license, users are provided
14
** only with a limited warranty and the software's author, the holder of
15
** the economic rights, and the successive licensors have only limited
18
** In this respect, the user's attention is drawn to the risks associated
19
** with loading, using, modifying and/or developing or reproducing the
20
** software by the user in light of its specific status of free software,
21
** that may mean that it is complicated to manipulate, and that also
22
** therefore means that it is reserved for developers and experienced
23
** professionals having in-depth computer knowledge. Users are therefore
24
** encouraged to load and test the software's suitability as regards
25
** their requirements in conditions enabling the security of their
26
** systems and/or data to be ensured and, more generally, to use and
27
** operate it in the same conditions as regards security.
29
** The fact that you are presently reading this means that you have had
30
** knowledge of the CeCILL-C license and that you accept its terms.
32
/************************************************************/
34
/** NAME : gout_c.h **/
36
/** AUTHOR : Francois PELLEGRINI **/
38
/** FUNCTION : Part of a result viewer. **/
39
/** This module contains the data declara- **/
40
/** tions for the main module. **/
42
/** DATES : # Version 2.0 : from : 06 oct 1994 **/
43
/** to 01 nov 1994 **/
44
/** # Version 3.0 : from : 14 jul 1995 **/
45
/** to 02 oct 1995 **/
46
/** # Version 3.2 : from : 02 dec 1996 **/
47
/** to 05 jun 1998 **/
48
/** # Version 3.3 : from : 01 jun 1999 **/
49
/** to 01 jun 1999 **/
50
/** # Version 4.0 : from : 11 dec 2001 **/
51
/** to 11 dec 2001 **/
53
/************************************************************/
59
/*+ File name aliases. +*/
61
#define C_FILENBR 4 /* Number of files in list */
62
#define C_FILEARGNBR 4 /* Number of files which can be arguments */
64
#define C_filenamesrcinp C_fileTab[0].name /* Source graph file name */
65
#define C_filenamegeoinp C_fileTab[1].name /* Source graph geometry file name */
66
#define C_filenamemapinp C_fileTab[2].name /* Mapping result file name */
67
#define C_filenamedatout C_fileTab[3].name /* Output data file name */
69
#define C_filepntrsrcinp C_fileTab[0].pntr /* Source graph input file */
70
#define C_filepntrgeoinp C_fileTab[1].pntr /* Source graph geometry file */
71
#define C_filepntrmapinp C_fileTab[2].pntr /* Mapping result input file */
72
#define C_filepntrdatout C_fileTab[3].pntr /* Data output file */
74
/*+ Dimension definitions. +*/
80
/*+ Geometry flags. +*/
82
#define C_GEOFLAGDEFAULT 0x0001 /* Default geometry flag */
83
#define C_GEOFLAGUSE 0x0001 /* Use geometry */
84
#define C_GEOFLAGROTATE 0x0002 /* Rotate the picture by 90 degrees */
85
#define C_GEOFLAGPERMUT 0x0004 /* Permute Y and Z dimensions */
88
** The type and structure definitions.
91
/*+ This structure defines a source graph. +*/
93
typedef struct C_Graph_ {
94
SCOTCH_Graph grafdat; /*+ Source graph data +*/
95
SCOTCH_Num baseval; /*+ Base value +*/
96
SCOTCH_Num vertnbr; /*+ Number of vertices +*/
97
SCOTCH_Num * verttab; /*+ Vertex array +*/
98
SCOTCH_Num * vendtab; /*+ Vertex end array +*/
99
SCOTCH_Num * vlbltab; /*+ Vertex label array +*/
100
SCOTCH_Num edgenbr; /*+ Number of edges +*/
101
SCOTCH_Num * edgetab; /*+ Edge array +*/
104
/*+ This structure defines a geometrical vertex. +*/
106
typedef struct C_GeoVert_ {
107
double c[3]; /*+ Vertex coordinates (x,y,z) +*/
110
/*+ This structure defines a geometrical
111
mapping which contains the positions
112
of the graph vertices. +*/
114
typedef struct C_Geometry_ {
115
const C_Graph * grafptr; /*+ Pointer to source graph +*/
116
C_GeoVert * verttab; /*+ Pointer to coordinates array +*/
119
/*+ This structure defines a domain label
120
mapping, which contains the reference
121
to the mapping source graph. +*/
123
typedef struct C_Mapping_ {
124
const C_Graph * grafptr; /*+ Pointer to source graph +*/
125
SCOTCH_Num * labltab; /*+ Pointer to label array +*/
128
/*+ The sort structure, used to sort graph vertices by label. +*/
130
typedef struct C_VertSort_ {
131
SCOTCH_Num labl; /*+ Vertex label +*/
132
SCOTCH_Num num; /*+ Vertex number +*/
135
/*+ This structure is the code
136
name array entries. +*/
138
typedef struct C_ParseCode_ {
139
uint code; /*+ Code value +*/
140
char * name; /*+ Code name +*/
143
/* This structure defines the
144
code argument array entries. */
146
typedef struct C_ParseArg_ {
147
const char * name; /*+ Name of the argument +*/
148
uint code; /*+ Code value +*/
149
const char * format; /*+ scanf-like format; NULL means char, no value +*/
150
const void * ptr; /*+ Pointer to the argument location +*/
151
int (* func) (); /*+ Pointer to the argument test function +*/
155
** The global data declarations.
158
extern File C_fileTab[C_FILENBR]; /*+ File array +*/
161
** The function prototypes.
164
int C_geoParse (const char * const);
165
void C_geoInit (C_Geometry * const, const C_Graph * const);
166
void C_geoExit (C_Geometry * const);
167
int C_geoLoad (C_Geometry * const, FILE * const);
169
void C_mapInit (C_Mapping * const, const C_Graph * const);
170
void C_mapExit (C_Mapping * const);
171
int C_mapLoad (C_Mapping * const, FILE * const);
173
int C_parse (const C_ParseCode * const, const C_ParseArg * const, uint * const, char * const);