OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
eval.h
Go to the documentation of this file.
1/*****************************************************************************
2/
3/ PORD Ordering Library: eval.h
4/
5/ author J"urgen Schulze, University of Paderborn
6/ created 99mar30
7/
8/ This file contains the definition of various separator evaluation functions
9/
10******************************************************************************/
11
12#define F eval1 /* default separator evaluation function */
13
14
15 /* --------------------------------------------------------------------- */
16 /* SEPARATOR EVALUATION FUNCTION 1 */
17 /* Size of domains W and B is allowed to differ TOLERANCE * 100 percent. */
18 /* Within this tolerance the difference is not penalized and only the */
19 /* size of the separator is returned. Additionally, the mantissa of the */
20 /* returned value is set to (max-min)/max. */
21 /* --------------------------------------------------------------------- */
22
23#define TOL1 0.50 /* tolerated imbalance induced by bisector */
24#define PEN1 100 /* penalty in case of higher imbalance */
25
26#define eval1(S, B, W) \
27 S + PEN1 * max(0, max(W,B) * (1-TOL1) - min(W,B)) \
28 + (FLOAT)(max(W,B)-min(W,B)) / (FLOAT)max(W,B)
29
30 /* --------------------------------------------------------------------- */
31 /* SEPARATOR EVALUATION FUNCTION 2 */
32 /* Ashcraft and Liu (Using domain decomposition to find graph bisectors) */
33 /* --------------------------------------------------------------------- */
34
35#define alpha 0.1
36#define TOL2 0.70
37#define PEN2 100
38
39#define eval2(S, B, W) \
40 S * (1 + alpha * ((FLOAT)max(W,B)/(FLOAT)max(1,min(W,B)))) \
41 + PEN2 * max(0, max(W,B) * (1-TOL2) - min(W,B))
42
43 /* --------------------------------------------------------------------- */
44 /* SEPARATOR EVALUATION FUNCTION 3 */
45 /* Ashcraft and Liu (Generalized nested dissection:some recent progress) */
46 /* --------------------------------------------------------------------- */
47
48#define alpha2 0.33
49
50#define eval3(S, B, W) \
51 S * S + alpha2 * (max(W,B)-min(W,B)) * (max(W,B)-min(W,B))
52