Debian Codegraph @

packages/seacas/libraries/chaco/main/user_params.c

raw
1 /*
2 * Copyright(C) 1999-2020 National Technology & Engineering Solutions
3 * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
4 * NTESS, the U.S. Government retains certain rights in this software.
5 *
6 * See packages/seacas/LICENSE for details
7 */
8
9 #include "params.h" // for NAME_LENGTH
10
11 #define TRUE 1
12 #define FALSE 0
13
14 /* Input and output control parameters */
15
16 int CHECK_INPUT = TRUE; /* Check input for consistency? (TRUE/FALSE) */
17 int ECHO = 2; /* Print input/param options? to file? (-2..2) */
18 int OUTPUT_METRICS = 2; /* Controls displaying of results (-2..2) */
19 int OUTPUT_TIME = 2; /* At what level to display timings (0..2) */
20 int OUTPUT_ASSIGN = FALSE; /* Write assignments to file? (TRUE/FALSE) */
21 int OUT_ASSIGN_INV = FALSE; /* If so, use inverse form? (TRUE/FALSE) */
22 int IN_ASSIGN_INV = FALSE; /* Input file in inverse form? (TRUE/FALSE) */
23 int PROMPT = TRUE; /* Prompt for input? (TRUE/FALSE) */
24 int PRINT_HEADERS = TRUE; /* Print pretty output headers (TRUE/FALSE) */
25
26 /* Eigenvector calculation parameters */
27
28 int LANCZOS_TYPE = 3; /* type of Lanczos to use */
29 /* 1 => full orthog, 2 => full inverse operator */
30 /* 3 => selective orthogonalization */
31 double EIGEN_TOLERANCE = 1e-3; /* Numerical eigen-tolerance */
32 double SRESTOL = -1.; /* Rel resid tol on T evec; autoset if <= 0 */
33 int LANCZOS_SO_INTERVAL = 10; /* Itns. between SO orthog checks; set >= 2 */
34 int LANCZOS_MAXITNS = -1; /* Max Lanczos its; autoset if <= 0 */
35 double BISECTION_SAFETY = 10; /* Divides Lanczos bisection tol */
36 int LANCZOS_CONVERGENCE_MODE = 0; /* Lanczos convergence test type: */
37 /* 0=> residual, 1=> partition */
38 int RQI_CONVERGENCE_MODE = 1; /* RQI convergence test type: */
39 /* 0=> residual, 1=> partition */
40 int LANCZOS_SO_PRECISION = 2; /* 2 => double Lanczos, 1 => float */
41 int WARNING_EVECS = 2; /* Warnings in eigenvector generation (0..3) */
42 double WARNING_ORTHTOL = 2; /* Warning if Ares and bjitol have this ratio */
43 double WARNING_MISTOL = 100; /* Warning if Ares and bjitol have this ratio */
44 int LANCZOS_TIME = FALSE; /* Detailed Lanczos times? (TRUE/FALSE) */
45 int TIME_KERNELS = FALSE; /* Time numerical kernels? (TRUE/FALSE) */
46
47 /* Other parameters for spectral methods */
48
49 int MAKE_CONNECTED = TRUE; /* Connect graph if using spectral method? */
50 int PERTURB = TRUE; /* Randomly perturb matrix in spectral method? */
51 int NPERTURB = 2; /* If so, how many edges to modify? */
52 double PERTURB_MAX = 3.0e-3; /* Largest value for perturbation */
53 int MAPPING_TYPE = 1; /* How to map from eigenvectors to partition */
54 /* 0 => cut at origin, 1 => min-cost assign */
55 int COARSE_NLEVEL_RQI = 2; /* # levels between RQI calls in uncoarsening */
56 int OPT3D_NTRIES = 5; /* # local opts to look for global min in opt3d */
57
58 /* Kernighan--Lin/Fiduccia--Mattheyses parameters */
59
60 int KL_METRIC = 2; /* KL interset cost: 1=>cuts, 2=>hops */
61 int KL_RANDOM = TRUE; /* Use randomness in Kernighan-Lin? (TRUE/FALSE)*/
62 int KL_BAD_MOVES = 20; /* Number of unhelpful moves in a row allowed */
63 int KL_NTRIES_BAD = 1; /* # unhelpful passes before quitting KL */
64 int KL_UNDO_LIST = TRUE; /* Only resort changed vtxs? (TRUE/FALSE) */
65 double KL_IMBALANCE = 0.0; /* Fractional imbalance allowed by KL */
66
67 /* Coarsening parameters */
68
69 double COARSEN_RATIO_MIN = .7; /* Min vtx reduction each coarsen stage */
70 int COARSE_NLEVEL_KL = 2; /* # levels between KL calls in uncoarsening */
71 int MATCH_TYPE = 1; /* Type of contraction matching (1..5) */
72 int HEAVY_MATCH = FALSE; /* Encourage heavy match edges? (TRUE/FALSE) */
73 int COARSE_KL_BOTTOM = TRUE; /* Force KL at lowest level (TRUE/FALSE) */
74 int COARSEN_VWGTS = TRUE; /* Sum vtx weights in coarsening? (TRUE/FALSE) */
75 int COARSEN_EWGTS = TRUE; /* Sum edge weights in coarsening? (TRUE/FALSE) */
76 int KL_ONLY_BNDY = TRUE; /* Start moving vtxs on boundary? (TRUE/FALSE) */
77
78 /* Parameters for post-processing options */
79
80 int REFINE_PARTITION = FALSE; /* Postprocess to improve cuts? */
81 int INTERNAL_VERTICES = FALSE; /* ... to up internal vtxs? (TRUE/FALSE) */
82 int CONNECTED_DOMAINS = FALSE; /* ... to force connectivity? (T/F) */
83 int REFINE_MAP = FALSE; /* ... to reduce hops? (T/F) */
84
85 /* Architecture parameters */
86
87 int ARCHITECTURE = 0; /* 0=> hypercube, d=> d-dimensional mesh (0..3)*/
88
89 /* Miscellaneous parameters */
90
91 int TERM_PROP = FALSE; /* Invoke terminal propagation? (TRUE/FALSE) */
92 double CUT_TO_HOP_COST = 1; /* ..if so, relative importance of cuts/hops */
93 int SEQUENCE = FALSE; /* Only do spectral ordering? (TRUE/FALSE) */
94 char SEQ_FILENAME[NAME_LENGTH] = "Sequence.out"; /* If so, file name */
95 long RANDOM_SEED = 7654321L; /* Seed for random number generator */
96 int NSQRTS = 1000; /* # square roots to precompute if coarsening */
97 int MAKE_VWGTS = FALSE; /* Make vtx weights degrees+1? (TRUE/FALSE) */
98 int FREE_GRAPH = TRUE; /* Free input graph data? (TRUE/FALSE) */
99 char *PARAMS_FILENAME = "User_Params"; /* File of parameter changes */
100
101 /* Parameters that control debugging output */
102
103 int DEBUG_EVECS = 0; /* Debug flag for eigenvector generation (0..5) */
104 int DEBUG_KL = 0; /* Debug flag for Kernighan-Lin (0..3) */
105 int DEBUG_INERTIAL = 0; /* Debug flag for inertial method (0..1) */
106 int DEBUG_CONNECTED = 0; /* Debug flag for connected components (0..1) */
107 int DEBUG_PERTURB = 0; /* Debug flag for matrix perturbation (0..1) */
108 int DEBUG_ASSIGN = 0; /* Debug flag for assignment to sets (0..1) */
109 int DEBUG_OPTIMIZE = 0; /* Debug flag for optimization/rotation (0..2) */
110 int DEBUG_BPMATCH = 0; /* Debug flag for bipartite matching code (0..2) */
111 int DEBUG_COARSEN = 0; /* Debug flag for coarsening/uncoarsening (0..1) */
112 int DEBUG_MEMORY = 0; /* Debug flag for smalloc/sfree (0..3) */
113 int DEBUG_INPUT = 0; /* Debug flag for having read input files (0..1) */
114 int DEBUG_PARAMS = 2; /* Debug flag for reading parameter file (0..2) */
115 int DEBUG_INTERNAL = 0; /* Debug flag for internal vertices (0..2) */
116 int DEBUG_REFINE_PART = 0; /* Debug flag for refine partition (0..1) */
117 int DEBUG_REFINE_MAP = 0; /* Debug flag for refining mapping (0..1) */
118 int DEBUG_SIMULATOR = 0; /* Debug flag for comm simulator (0..2) */
119 int DEBUG_TRACE = 0; /* Trace main execution path (0..2) */
120 int DEBUG_MACH_PARAMS = 0; /* Print computed machine params? (0..1) */