/usr/include/spooles/misc/misc.h is in libspooles-dev 2.2-11.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 | /* misc.h */
#include "../cfiles.h"
#include "../DenseMtx.h"
#include "../InpMtx.h"
#include "../ETree.h"
#include "../Coords.h"
#include "../Graph.h"
#include "../MSMD.h"
#include "../GPart.h"
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods in ND.c --------------------------------------------------
------------------------------------------------------------------------
*/
/*
------------------------------------------------------------
purpose -- main procedure. if the input region is 1 x 1 x 1,
the node is put into the permutation vector.
otherwise the region is split into three pieces,
two subregions and a separator, and recursive
calls are made to order the subregions
input --
n1 -- number of points in the first direction
n2 -- number of points in the second direction
n3 -- number of points in the third direction
new_to_old -- pointer to the permutation vector
west -- west coordinate
east -- east coordinate
south -- south coordinate
north -- north coordinate
bottom -- bottom coordinate
top -- top coordinate
created -- 95nov15, cca
------------------------------------------------------------
*/
void
mkNDperm (
int n1,
int n2,
int n3,
int new_to_old[],
int west,
int east,
int south,
int north,
int bottom,
int top
) ;
/*
-----------------------------------------------------
purpose -- to print a vector on a 2-d grid
input --
n1 -- number of points in the first direction
n2 -- number of points in the second direction
ivec -- integer vector to be printed in %4d format
fp -- file pointer
created -- 95nov16, cca
-----------------------------------------------------
*/
void
fp2DGrid (
int n1,
int n2,
int ivec[],
FILE *fp
) ;
/*
-----------------------------------------------------
purpose -- to print a vector on a 3-d grid
input --
n1 -- number of points in the first direction
n2 -- number of points in the second direction
n3 -- number of points in the third direction
ivec -- integer vector to be printed in %4d format
fp -- file pointer
created -- 95nov16, cca
-----------------------------------------------------
*/
void
fp3DGrid (
int n1,
int n2,
int n3,
int ivec[],
FILE *fp
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods in localND.c ---------------------------------------------
------------------------------------------------------------------------
*/
/*
------------------------------------------------------------
compute an old-to-new ordering for
local nested dissection in two dimensions
n1 -- number of grid points in first direction
n2 -- number of grid points in second direction
p1 -- number of domains in first direction
p2 -- number of domains in second direction
dsizes1 -- domain sizes in first direction, size p1
if NULL, then we construct our own
dsizes2 -- domain sizes in second direction, size p2
if NULL, then we construct our own
oldToNew -- old-to-new permutation vector
note : the following must hold
n1 > 0, n2 >0, n1 >= 2*p1 - 1, n2 >= 2*p2 - 1, p2 > 1
sum(dsizes1) = n1 - p1 + 1 and sum(dsizes2) = n2 - p2 + 1
created -- 95nov16, cca
------------------------------------------------------------
*/
void
localND2D (
int n1,
int n2,
int p1,
int p2,
int dsizes1[],
int dsizes2[],
int oldToNew[]
) ;
/*
------------------------------------------------------------
compute an old-to-new ordering for
local nested dissection in three dimensions
n1 -- number of grid points in first direction
n2 -- number of grid points in second direction
n3 -- number of grid points in third direction
p1 -- number of domains in first direction
p2 -- number of domains in second direction
p3 -- number of domains in third direction
dsizes1 -- domain sizes in first direction, size p1
if NULL, then we construct our own
dsizes2 -- domain sizes in second direction, size p2
if NULL, then we construct our own
dsizes3 -- domain sizes in third direction, size p3
if NULL, then we construct our own
oldToNew -- old-to-new permutation vector
note : the following must hold
n1 > 0, n2 >0, n3 > 0,
n1 >= 2*p1 - 1, n2 >= 2*p2 - 1, n3 >= 2*p3 - 1, p3 > 1
sum(dsizes1) = n1 - p1 + 1, sum(dsizes2) = n2 - p2 + 1
sum(dsizes3) = n3 - p3 + 1
created -- 95nov16, cca
------------------------------------------------------------
*/
void
localND3D (
int n1,
int n2,
int n3,
int p1,
int p2,
int p3,
int dsizes1[],
int dsizes2[],
int dsizes3[],
int oldToNew[]
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods in orderViaBestOfNDandMS.c -------------------------------
------------------------------------------------------------------------
*/
/*
------------------------------------------------------------------
purpose -- return an ETree object for the better of a
nested dissection and multisection orderings
graph -- graph to order
maxdomainsize -- used to control the incomplete nested dissection
process. any subgraph whose weight is less than maxdomainsize
is not split further.
maxzeros -- maximum number of zero entries allowed in a front
maxsize -- maximum number of internal columns in a front
seed -- random number seed
msglvl -- message level
1 -- timings and statistics
2 -- more timings and statistics
3 -- lots of output
msgFile -- message file
created -- 98aug26, cca
------------------------------------------------------------------
*/
ETree *
orderViaBestOfNDandMS (
Graph *graph,
int maxdomainsize,
int maxzeros,
int maxsize,
int seed,
int msglvl,
FILE *msgFile
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods in orderViaND.c ------------------------------------------
------------------------------------------------------------------------
*/
/*
------------------------------------------------------------------
purpose -- return an ETree object for a nested dissection ordering
graph -- graph to order
maxdomainsize -- used to control the incomplete nested dissection
process. any subgraph whose weight is less than maxdomainsize
is not split further.
seed -- random number seed
msglvl -- message level, 0 --> no output, 1 --> timings
msgFile -- message file
created -- 97nov06, cca
------------------------------------------------------------------
*/
ETree *
orderViaND (
Graph *graph,
int maxdomainsize,
int seed,
int msglvl,
FILE *msgFile
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods in orderViaMS.c ------------------------------------------
------------------------------------------------------------------------
*/
/*
------------------------------------------------------------------
purpose -- return an ETree object for a multisection ordering
graph -- graph to order
maxdomainsize -- used to control the incomplete nested dissection
process. any subgraph whose weight is less than maxdomainsize
is not split further.
seed -- random number seed
msglvl -- message level, 0 --> no output, 1 --> timings
msgFile -- message file
created -- 97nov06, cca
------------------------------------------------------------------
*/
ETree *
orderViaMS (
Graph *graph,
int maxdomainsize,
int seed,
int msglvl,
FILE *msgFile
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods in orderViaMMD.c -----------------------------------------
------------------------------------------------------------------------
*/
/*
--------------------------------------------------------
purpose -- return an ETree object for
a multiple minimum degree ordering
graph -- graph to order
seed -- random number seed
msglvl -- message level, 0 --> no output, 1 --> timings
msgFile -- message file
created -- 97nov08, cca
--------------------------------------------------------
*/
ETree *
orderViaMMD (
Graph *graph,
int seed,
int msglvl,
FILE *msgFile
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods in drawGraphEPS.c ----------------------------------------
------------------------------------------------------------------------
*/
/*
-------------------------------------------------
draw a graph to an EPS file
(1) read a Graph object
(2) read a Coords object
(3) read an IV object that contains a tag vector.
if (v,w) is an edge in the graph
and tags[v] == tags[w] then
draw edge (v,w)
(4) bbox[4] is the bounding box for the plot.
bbox = { xsw, ysw, xne, yne }
try bbox = { 0, 0, 500, 500 }
because coordinates are measured in points,
72 points per inch.
(5) rect[4] contains the frame for the plot.
to put a 20 point margin around the plot,
rect[0] = bbox[0] + 20
rect[1] = bbox[1] + 20
rect[2] = bbox[2] - 20
rect[3] = bbox[3] - 20
created -- 98apr11, cca
-------------------------------------------------
*/
void
drawGraphEPS (
Graph *graph,
Coords *coords,
IV *tagsIV,
double bbox[],
double rect[],
double linewidth1,
double linewidth2,
double radius,
char *epsFileName,
int msglvl,
FILE *msgFile
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods in mkNDlinsys.c ------------------------------------------
------------------------------------------------------------------------
*/
/*
---------------------------------------------------------------------
purpose -- to create a linear system A*X = B
for a nested dissection ordering of a 2-d or 3-d regular grid
input --
n1 -- # of nodes in first direction
n2 -- # of nodes in second direction
n3 -- # of nodes in third direction
maxzeros -- relaxation factor for fronts,
maximum number of zero entries in a front
maxsize -- split parameter for large fronts,
maximum number of internal vertices in a front
type -- type of entries
SPOOLES_REAL or SPOOLES_COMPLEX
symmetryflag -- symmetry of the matrix
SPOOLES_SYMMETRIC, SPOOLES_HERMITIAN or SPOOLES_NONSYMMETRIC
nrhs -- number of right hand sides
seed -- seed for random number generator
msglvl -- message level
msgFile -- message file
output --
pfrontETree -- to be filled with address of front tree
psymbfacIVL -- to be filled with address of symbolic factorization
pmtxA -- to be filled with address of matrix object A
pmtxX -- to be filled with address of matrix object X
pmtxB -- to be filled with address of matrix object B
created -- 98may16, cca
---------------------------------------------------------------------
*/
void
mkNDlinsys (
int n1,
int n2,
int n3,
int maxzeros,
int maxsize,
int type,
int symmetryflag,
int nrhs,
int seed,
int msglvl,
FILE *msgFile,
ETree **pfrontETree,
IVL **psymbfacIVL,
InpMtx **pmtxA,
DenseMtx **pmtxX,
DenseMtx **pmtxB
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
----- methods in mkNDlinsysQR.c ----------------------------------------
------------------------------------------------------------------------
*/
/*
---------------------------------------------------------------------
purpose -- to create an overdetermined linear system A*X = B
for a nested dissection ordering of a 2-d or 3-d regular grid
input --
n1 -- # of nodes in first direction
n2 -- # of nodes in second direction
n3 -- # of nodes in third direction
type -- type of entries
SPOOLES_REAL or SPOOLES_COMPLEX
nrhs -- number of right hand sides
seed -- seed for random number generator
msglvl -- message level
msgFile -- message file
output --
pfrontETree -- to be filled with address of front tree
psymbfacIVL -- to be filled with address of symbolic factorization
pmtxA -- to be filled with address of matrix object A
pmtxX -- to be filled with address of matrix object X
pmtxB -- to be filled with address of matrix object B
created -- 98may29, cca
---------------------------------------------------------------------
*/
void
mkNDlinsysQR (
int n1,
int n2,
int n3,
int type,
int nrhs,
int seed,
int msglvl,
FILE *msgFile,
ETree **pfrontETree,
IVL **psymbfacIVL,
InpMtx **pmtxA,
DenseMtx **pmtxX,
DenseMtx **pmtxB
) ;
/*--------------------------------------------------------------------*/
|