14
int DfltHeight = 1000;
18
double Width; /* Width of bounding box */
19
double Height; /* Height of bounding box */
20
int NumIters; /* Number of iterations in loop */
22
int timer; /* Iteration index */
23
double Radius2; /* Radius of interaction squared */
24
/* Anything outside of the radius has no effect on node */
25
double CellW; /* Width of interaction cell */
26
double CellH; /* Height of interaction cell */
28
double UserK = 0.0; /* User-supplied length */
29
double Stretch = 1.2; /* If maxVertLen used for K, multiply by Stretch
31
double K; /* Edge length */
33
double T0; /* Initial temperature */
35
double maxVertLen = 0.0; /* maximum width or length of vertices */
40
fprintf (stderr, "NumIters %d ", NumIters);
41
fprintf (stderr, "Width %g Height %g\n", Width, Height);
42
fprintf (stderr, "CellW %g CellH %g\n", CellW, CellH);
43
fprintf (stderr, "Radius2 %g Spring %g T0 %g\n", Radius2, K, T0);
48
return (T0*(NumIters-timer))/NumIters;
52
void initValues (int v)
54
if (Width == 0) Width = DfltWidth;
55
if (Height == 0) Height = DfltHeight;
56
if (NumIters == 0) NumIters = DfltIters;
58
if (UserK > 0.0) K = UserK;
60
else K = Stretch * maxVertLen;
62
else K = sqrt((Width*Height)/v);
71
fprintf (stderr, "initValues: W %g H %g K %g T0 %g\n", Width, Height, K, T0);