-
Notifications
You must be signed in to change notification settings - Fork 6
/
global_defs.h
934 lines (771 loc) · 28.2 KB
/
global_defs.h
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
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
/*
Copyright (C) 2003 The GeoFramework Consortium
This file is part of Ellipsis3D.
Ellipsis3D is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2,
as published by the Free Software Foundation.
Ellipsis3D is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Authors:
Louis Moresi <[email protected]>
Richard Albert <[email protected]>
*/
/* */
/* This file contains the definitions of variables which are passed as arguments */
/* to functions across the whole filespace of Ellipsis. #include this file everywhere !*/
/*
#include <assert.h>
#include <stdlib.h>
*/
#include <stdio.h>
void *Malloc1();
void Realloc1();
/* #define fft twiddle_thumbs
#define rft twiddle_thumbs */
#define Malloc0(a) Malloc1((a),__FILE__,__LINE__)
#define Realloc0(a,b,c,d) Realloc1((a),(b),(c),(d),__FILE__,__LINE__)
/* ============================================== */
/*
The following "module" includes were originally
#include "_options_definitions_files.hh"
where "_options_definitions_files.hh" was generated by a shell script,
roughly as follows:
for file in *global_definitions.h ; do
echo "#include \"$file\" " >> _options_definitions_files.hh
done
*/
#include "tracer_global_definitions.h"
#include "chemtrans_global_definitions.h"
/* ============================================== */
/* For 32 bit safe ... must be smaller than 0xFFFFFFFF
i.e. stop when you reach 0x100000000 and think about it */
#define SBC4 0x1 /* node has prescribed x couple stress */
#define BC1 0x2 /* node has prescribed x velocity */
#define BC2 0x4 /* node had prescribed z velocity */
#define BC3 0x8 /* node has prescribed y velocity or rotation */
#define TBD 0x10 /* node has prescribed temperature */
#define TZEDGE 0x80 /* node is on a constant z boundary surface (temperature) - not used */
#define TXEDGE 0x100 /* node is on a constant x boundary surface (temperature) - not used */
#define TYEDGE 0x200 /* node is on a constant y boundary surface (temperature) - not used */
#define VXEDGE 0x400 /* node is on a constant x boundary surface (velocity) - not used */
#define VZEDGE 0x800 /* node is on a constant z boundary surface (velocity) - not used */
#define VYEDGE 0x1000 /* node is on a constant y boundary surface (velocity) - not used */
#define INTX 0x2000 /* node has ...(interpolation in x)? - not used */
#define INTZ 0x4000 /* node has ...(interpolation in z)? - not used */
#define INTY 0x8000 /* node has ...(interpolation in y)? - not used */
#define SBC1 0x10000 /* node has prescribed x stress */
#define SBC2 0x20000 /* node has prescribed z stress */
#define SBC3 0x40000 /* node has prescribed y stress or couple stress */
#define FBX 0x80000 /* node has prescribed heat flux in x */
#define FBZ 0x100000 /* node has prescribed heat flux in z */
#define FBY 0x200000 /* node has prescribed heat flux in y */
#define OFFSIDE 0x400000 /* node is periodic in x */
#define SBC5 0x800000 /* node has prescribed z couple stress */
#define SKEWBC 0x1000000 /* node has skewed BCs */
#define PER_OFFSIDE 0x2000000 /* node is periodic */
#define BC4 0x4000000 /* node has prescribed x rotation */
#define BC5 0x8000000 /* node has prescribed z rotation */
#define BC6 0x10000000 /* node has prescribed y rotation */
#define SBC6 0x20000000 /* node has prescribed y couple stress */
/* DAS: this is now an option in the input template
#ifndef COMPRESS_BINARY
#define COMPRESS_BINARY "/usr/local/bin/gzip"
#endif
*/
#define MAX_LEVELS 12 /* maximum number of multigrid levels */
#define MAX_DOF 7 /* maximum number of degrees of freedom available */
#define MAX_LOAD_SEQS 2 /*RAA, 19/02/02 max. # of loading sequences*/
#define VE_TIMETOLERANCE 2.5
/* Macros */
#define max(A,B) (((A) > (B)) ? (A) : (B))
#define min(A,B) (((A) < (B)) ? (A) : (B))
#define SWAP(a,b) {temp=(a);(a)=(b);(b)=temp;}
typedef double standard_precision;
typedef double higher_precision; /* matrix coeffs etc */
typedef double highest_precision; /* intermediate calculations for finding above coeffs */
/* Common structures */
struct MeshRegion {
int numb;
standard_precision offset[40];
standard_precision compression[40];
standard_precision width[40];
standard_precision edge_width[40];
};
struct Rect {
int numb;
char overlay[40];
standard_precision x1[40];
standard_precision x2[40];
standard_precision z1[40];
standard_precision z2[40];
standard_precision y1[40];
standard_precision y2[40];
standard_precision halfw[40];
standard_precision mag[40];
} ;
struct Circ {
int numb;
char overlay[40];
standard_precision x[40];
standard_precision z[40];
standard_precision y[40];
standard_precision rad[40];
standard_precision mag[40];
standard_precision halfw[40];
};
struct Harm {
int numb;
int harms;
char overlay[40];
standard_precision off[40];
standard_precision x1[40];
standard_precision x2[40];
standard_precision z1[40];
standard_precision z2[40];
standard_precision y1[40];
standard_precision y2[40];
standard_precision kx[20][40];
standard_precision kz[20][40];
standard_precision ky[20][40];
standard_precision ka[20][40];
standard_precision phx[20][40];
standard_precision phz[20][40];
standard_precision phy[20][40];
};
struct Erfc {
int numb;
};
struct RectBc {
int numb;
char norm[40];
standard_precision intercept[40];
standard_precision aa1[40];
standard_precision aa2[40];
standard_precision bb1[40];
standard_precision bb2[40];
standard_precision halfw[40];
standard_precision mag[40];
} ;
struct CircBc {
int numb;
char norm[40];
standard_precision intercept[40];
standard_precision aa[40];
standard_precision bb[40];
standard_precision rad[40];
standard_precision mag[40];
standard_precision halfw[40];
};
struct PolyBc {
/*RAA: eventually, there should be a new group of coefficients when the order > 1,
say, acc[][], for cross-terms, e.g., acc[][]*x*y, etc */
int numb;
int order;
char norm[40];
standard_precision intercept[40];
standard_precision aa1[40];
standard_precision aa2[40];
standard_precision bb1[40];
standard_precision bb2[40];
standard_precision aaa[20][40];
standard_precision abb[20][40];
};
struct HarmBc {
int numb;
int harms;
char norm[40];
standard_precision off[40];
standard_precision intercept[40];
standard_precision aa1[40];
standard_precision aa2[40];
standard_precision bb1[40];
standard_precision bb2[40];
standard_precision kaa[20][40];
standard_precision kbb[20][40];
standard_precision amp[20][40];
standard_precision phaa[20][40];
standard_precision phbb[20][40];
};
struct Output_and_input {
int numb;
int numb_found;
char which_data_types[1000]; /* List of variables which are to be dumped out */
char which_data_types_in[1000]; /* ... and read in. Being minimalist, anything
which is difficult or impossible to compute from
the present state ought to be able to be read
back in. If not, does it really need to be printed out ? */
char name[50][5];
standard_precision *data[50];
};
struct Shape_function_dA {
standard_precision vpt[9];
standard_precision ppt[2]; };
struct Shape_function1_dA {
standard_precision vpt[6*4];
standard_precision ppt[6*1]; };
struct Shape_function1 {
standard_precision vpt[4*4]; /* node & gauss pt */
standard_precision ppt[4*1]; };
struct Shape_function {
standard_precision vpt[8*8]; /* node & gauss pt */
standard_precision ppt[8*1]; };
struct Shape_function_dx {
standard_precision vpt[3*8*8]; /* dirn & node & gauss pt */
standard_precision ppt[3*8*1]; };
struct Shape_function1_dx {
standard_precision vpt[2*4*4]; /* dirn & node & gauss pt */
standard_precision ppt[2*4*1]; };
struct EG {
higher_precision g[24][1]; };
struct EK {
higher_precision k[24*24]; };
struct MEK {
higher_precision nint[9]; };
struct NK {
higher_precision *k;
int *map;
};
struct CURVILINEAR {
higher_precision **NODE_R[MAX_LEVELS];
higher_precision **node_r;
standard_precision *cost[MAX_LEVELS];
standard_precision *sint[MAX_LEVELS];
standard_precision *cosph[MAX_LEVELS];
standard_precision *sinph[MAX_LEVELS];
};
struct COORD {
standard_precision centre[4];
standard_precision size[4]; /* in xzy coords */
standard_precision recip_size[4];
standard_precision ntl_size[4]; /* in natural coords */
standard_precision ntl_recip_size[4];
standard_precision ntl_dirns[4][4];
standard_precision area;
} ;
struct SUBEL {
int sub[9];
};
struct ID {
int doff[7];
};
struct IEN {
int node[9];
};
struct LM {
struct {
int doff[4];
}
node[9];
} ;
struct NEI {
int *nels;
int *lnode;
int *element; };
struct MESH_DATA {/* general information concerning the fe mesh */
int nsd; /* spatial extent 1,2,3d */
int dof; /* degrees of freedom per node */
int levmax; /* finest FE grid */
int levmin; /* coarsest FE grid */
int levels; /* number of multigrid levels */
int q_levels; /* number of multigrid levels */
int q_levmin; /* coarsest solid pressure FE grid */
int mgunitx; /* number of elements in x in coarsest grid */
int mgunitz;
int mgunity;
int NEQ[MAX_LEVELS]; /* All other values refer to the biggest mesh (& lid) */
int NNO[MAX_LEVELS];
int NLNO[MAX_LEVELS];
int NPNO[MAX_LEVELS];
int NEL[MAX_LEVELS];
int NOX[MAX_LEVELS];
int NOZ[MAX_LEVELS];
int NOY[MAX_LEVELS];
int NMX[MAX_LEVELS];
int ELX[MAX_LEVELS];
int ELZ[MAX_LEVELS];
int ELY[MAX_LEVELS];
int LNDS[MAX_LEVELS];
int LELS[MAX_LEVELS];
int neqd;
int neq; /* number of equations in finest mesh solution */
int nno; /* number of nodes in finest mesh */
int npno; /* number of solid pressure nodes in finest mesh */
int nel; /* number of elements in finest mesh */
int nex[4]; /* general form of ... */
int elx; /* number of elements in x in finest mesh */
int elz;
int ely;
int nnx[4]; /* general form of ... */
int nox; /* number of nodes in x in finest mesh */
int noz;
int noy;
int nmx;
int nsf; /* nodes for surface observables */
char topvbc_file[100];
char botvbc_file[100];
char sidevbc_file[100];
char gridfile[4][100];
struct RectBc Vxrectbcs;
struct RectBc Vyrectbcs;
struct RectBc Vzrectbcs;
struct RectBc Stxrectbcs;
struct RectBc Styrectbcs;
struct RectBc Stzrectbcs;
struct CircBc Vxcircbcs;
struct CircBc Vzcircbcs;
struct CircBc Vycircbcs;
struct CircBc Stxcircbcs;
struct CircBc Stzcircbcs;
struct CircBc Stycircbcs;
struct PolyBc Vxpolybcs;
struct PolyBc Vzpolybcs;
struct PolyBc Vypolybcs;
struct PolyBc Stxpolybcs;
struct PolyBc Stzpolybcs;
struct PolyBc Stypolybcs;
struct HarmBc Vxharmbcs;
struct HarmBc Vzharmbcs;
struct HarmBc Vyharmbcs;
struct HarmBc Stxharmbcs;
struct HarmBc Stzharmbcs;
struct HarmBc Styharmbcs;
int surface_initial_isostasy;
int Free_upper_surface;
int Free_lower_surface;
int equilibrium_upper_surface;
int equilibrium_lower_surface;
struct MeshRegion spacing[3];
int periodic_x; /* indicates periodicity at x boundaries */
int periodic_y;
int periodic_z;
int periodic_rm_vx;
int periodic_rm_vy; /*RAA: 9/10/01, added this line*/
standard_precision layer0[4]; /* dimensionless dimensions */
standard_precision layer1[4]; /* dimensionless dimensions */
standard_precision BCvelocityX1;
standard_precision BCvelocityX0;
standard_precision BCvelocityZ1;
standard_precision BCvelocityZ0;
standard_precision BCvelocityY1;
standard_precision BCvelocityY0;
standard_precision BCvelocity1X1;
standard_precision BCvelocity1X0;
standard_precision BCvelocity1Z1;
standard_precision BCvelocity1Z0;
standard_precision BCvelocity1Y1;
standard_precision BCvelocity1Y0;
standard_precision BCvelocityomegaX1;
standard_precision BCvelocityomegaX0;
standard_precision BCvelocityomegaZ1;
standard_precision BCvelocityomegaZ0;
standard_precision BCvelocityomegaY1;
standard_precision BCvelocityomegaY0;
standard_precision BCvelocityphaseX1;
standard_precision BCvelocityphaseX0;
standard_precision BCvelocityphaseZ1;
standard_precision BCvelocityphaseZ0;
standard_precision BCvelocityphaseY1;
standard_precision BCvelocityphaseY0;
standard_precision BCvelocitypowerX1;
standard_precision BCvelocitypowerX0;
standard_precision BCvelocitypowerZ1;
standard_precision BCvelocitypowerZ0;
standard_precision BCvelocitypowerY1;
standard_precision BCvelocitypowerY0;
standard_precision BCvelocityaccX1;
standard_precision BCvelocityaccX0;
standard_precision BCvelocityaccZ1;
standard_precision BCvelocityaccZ0;
standard_precision BCvelocityaccY1;
standard_precision BCvelocityaccY0;
int BCvelocity_time_interval; /*RAA, 12/02/02, & is boolean in Instructions.c*/
int BCvelocity_time_or_inc; /*RAA, 12/02/02 */
/*RAA: treat increments as std precision in following lines, for simplicity*/
/*RAA: this stuff is for sequentially bi-directional loading*/
standard_precision BCvelocityX0_time[2][4][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityX0_const[3][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityX0_slope[3][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityX1_time[2][4][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityX1_const[3][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityX1_slope[3][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityZ0_time[2][4][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityZ0_const[3][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityZ0_slope[3][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityZ1_time[2][4][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityZ1_const[3][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityZ1_slope[3][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityY0_time[2][4][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityY0_const[3][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityY0_slope[3][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityY1_time[2][4][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityY1_const[3][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
standard_precision BCvelocityY1_slope[3][MAX_LOAD_SEQS]; /*RAA, 19/02/02 */
/*RAA: the variables above allow trapezoidal loading functions.
W/ r to the ...time[][][],
1st index: '0' is start, '1' is finish
2nd index: '0' is local time t0, '1' is local time t1,
etc, '3' is local time t3
3rd index: the particular load sequence, eg, #1 of 3 total loads, etc.
w/r to ..const[][] & ...slope[][],
1st index: is the section of the trapezoid, '0' is left side, etc
2nd index: the particular load sequence, eg,#1 of 3 total loads, etc.
*/
standard_precision fine_spacing[4];
int equiv_even_nodes[4];
int equiv_even_nsf;
int fnodal_malloc_size;
int dnodal_malloc_size;
int bandwidth;
int null_source;
int null_sink;
} ;
struct HAVE { /* horizontal averages */
standard_precision *T;
standard_precision *Vi;
standard_precision *Poro;
standard_precision *f;
standard_precision *F;
standard_precision *vrms;
standard_precision *V[4];
standard_precision *strs;
standard_precision *buoy;
standard_precision *Pres;
standard_precision *Depl; /*RAA: 09/07/03 - from C. O'Neill's melting stuff*/
};
struct SLICE { /* horizontally sliced data, including topography */
standard_precision *tpg;
standard_precision *tpgb;
standard_precision *tpgk;
standard_precision *tpgbk;
standard_precision *grv;
standard_precision *grvk;
standard_precision *grvt;
standard_precision *grvtk;
standard_precision *grvb;
standard_precision *grvbk;
standard_precision *geo;
standard_precision *geok;
standard_precision *geob;
standard_precision *geot;
standard_precision *geobk;
standard_precision *geotk;
standard_precision *shflux;
standard_precision *bhflux;
standard_precision *depl; /*RAA: 09/07/03 - from C. O'Neill's melting stuff*/
standard_precision *vxsurf[4]; /* surface velocity vectors */
};
struct TOTAL {
standard_precision melt_prod;
};
struct MONITOR {
char node_output[100][6]; /* recording the format of the output data */
char sobs_output[100][6]; /* recording the format of the output data */
int node_output_cols;
int sobs_output_cols;
int solution_cycles;
int total_gs_cycles[MAX_LEVELS];
standard_precision time_scale;
standard_precision length_scale;
standard_precision viscosity_scale;
standard_precision tpgscale;
standard_precision delta_v_last_soln;
standard_precision elapsed_time;
standard_precision elapsed_time_vsoln;
standard_precision elapsed_time_vsoln1;
standard_precision incompressibility;
standard_precision vdotv;
standard_precision nond_av_heat_fl;
standard_precision nond_av_adv_hfl;
standard_precision cpu_time_elapsed;
standard_precision cpu_time_on_vp_it;
standard_precision cpu_time_on_forces;
standard_precision cpu_time_on_mg_maps;
standard_precision tpgkmag;
standard_precision grvkmag;
standard_precision gtrk;
standard_precision gtrfit;
standard_precision gtrfit_h;
standard_precision gtrfit_l;
standard_precision Nusselt;
standard_precision Vmax;
standard_precision Vsrms;
standard_precision Vrms;
standard_precision Vxrms;
standard_precision Vzrms;
standard_precision Vyrms;
standard_precision Vrms_surface;
standard_precision Vrms_base;
standard_precision F_surface;
standard_precision F_base;
standard_precision Frat_surface;
standard_precision Frat_base;
standard_precision T_interior;
standard_precision Sigma_max;
standard_precision Sigma_interior;
standard_precision Vi_average;
standard_precision Vis2;
standard_precision log_average_visc;
standard_precision max_visc;
standard_precision min_visc;
standard_precision reference_stress;
standard_precision reference_viscosity;
standard_precision min_BI[MAX_LEVELS];
standard_precision max_BI[MAX_LEVELS];
standard_precision time_of_last_store;
standard_precision time_of_last_checkpt;
};
struct CONTROL {
int PID;
char output_written_external_command[500]; /* a unix command to run when output files have been created */
char ppm_written_external_command[500]; /* a unix command to run when output files have been created */
int ORTHO,ORTHOZ; /* indicates levels of mesh symmetry */
int HAVE_SKEWBCS;
int outputcase;
int CURRENT_SKEWED_Vs;
char B_is_good[MAX_LEVELS]; /* general information controlling program flow */
char Ahat_is_good[MAX_LEVELS]; /* general information controlling program flow */
char old_P_file[100];
char data_file[1000];
char input_file_name[1000];
int test ;
char vector_optimization;
struct Output_and_input node_data;
struct Output_and_input slice_data;
struct Output_and_input time_data;
struct Output_and_input haverage_data;
struct Output_and_input particle_data;
char GEOMETRY[20]; /* one of ... */
int CONVECTION;
int CART2D;
int CART2pt5D;
int CART3D;
int AXI;
int CYLINDER;
int SPHERE;
int AXISPHERE;
int B_matrix ;
int model ;
char SOLVER_TYPE[20]; /* one of ... */
int CONJ_GRAD;
int MULTIGRID;
char NODE_SPACING[3][20]; /* turns into ... */
int GRID_TYPE[3];
int COMPRESS;
char gzip[100]; /* DAS: 17/01/03, path to gzip program */
int AVS;
int NODE_BY_NODE;
int ELEMENT_BY_ELEMENT;
int ELEMENT_TYPE;
int ELEMENT_TYPE_P;
int dfact;
standard_precision AUG_lagrangian;
standard_precision secret_case_fl[10] ;
standard_precision particle_perturb;
standard_precision director_perturb,director_perturbkx;
standard_precision TBCtopval;
standard_precision TBCbotval;
standard_precision Q0;
standard_precision Atemp ;
int keep_going;
int vsolver_relaxations;
int max_vel_iterations;
int mg_low_relaxations;
int p_iterations;
int mg_cycle;
higher_precision accuracy;
standard_precision delta_accuracy_factor;
standard_precision gs_under;
int total_iteration_cycles;
int total_v_solver_calls;
int record_all_until;
int storage_timesteps;
int checkpt_timesteps;
int PPM_height;
standard_precision PPM_aspect;
int PPM_files;
standard_precision PPM_strain;
int PPM_surf_plot[40];
int PPM_coloring[40];
int PPM_color_auto[40];
standard_precision PPM_color_min[40];
standard_precision PPM_color_max[40];
int PPM_surf_auto[40];
standard_precision PPM_surf_min[40];
standard_precision PPM_surf_max[40];
standard_precision PPM_3D_delt; /*RAA: 23-01-03, added this*/
standard_precision storage_timing;
standard_precision checkpt_timing;
int ELASTICITY;
int ORTHOTROPY;
int CHEM_TRANS;
int deformation;
int verbose;
int print_convergence;
/* modules */
int MELTING_MODULE;
int CHEMISTRY_MODULE;
int SHEAR_HEATING;
};
struct DATA {
standard_precision grav_acc;
standard_precision grav_theta;
};
struct ELEMENT {
int type_v ; /* description of element type wrt velocity */
int type_p ; /* description of element type wrt solid pressure */
};
struct All_variables {
#include "viscosity_descriptions.h"
#include "temperature_descriptions.h"
/* ============================================== */
/* MODULES */
/*
The following "module" includes were originally
#include "_options_variables_files.hh"
where "_options_variables_files.hh" was generated by a shell script,
roughly as follows:
for file in *global_variables.h ; do
echo "#include \"$file\" " >> _options_variables_files.hh
done
*/
#include "advection_global_variables.h"
#include "convection_global_variables.h"
#include "tracer_global_variables.h"
/* ============================================== */
FILE *fp,*fp1,*fp2;
struct HAVE Have;
struct TOTAL Total;
struct MESH_DATA mesh;
struct CONTROL control;
struct MONITOR monitor;
struct DATA data;
struct SLICE slice;
struct COORD *eco;
struct IEN *ien;
struct IEN *ienp;
struct ID *id;
struct COORD *ECO[MAX_LEVELS];
struct IEN *IEN[MAX_LEVELS];
struct IEN *IENP[MAX_LEVELS];
struct ID *ID[MAX_LEVELS];
struct NEI NEI[MAX_LEVELS];
struct SUBEL *EL[MAX_LEVELS];
struct EG *elt_del[MAX_LEVELS];
struct EK *elt_k[MAX_LEVELS];
struct CURVILINEAR curvilinear;
struct ELEMENT *elem ;
struct ELEMENT *ELEM[MAX_LEVELS] ;
higher_precision *Eqn_k[MAX_LEVELS];
higher_precision *Node_k11[MAX_LEVELS]; /* element stiffness matrix */
higher_precision *Node_k21[MAX_LEVELS];
higher_precision *Node_k31[MAX_LEVELS];
higher_precision *Node_k12[MAX_LEVELS];
higher_precision *Node_k22[MAX_LEVELS];
higher_precision *Node_k32[MAX_LEVELS];
higher_precision *Node_k13[MAX_LEVELS];
higher_precision *Node_k23[MAX_LEVELS];
higher_precision *Node_k33[MAX_LEVELS];
higher_precision *Node_k14[MAX_LEVELS];
higher_precision *Node_k15[MAX_LEVELS];
higher_precision *Node_k16[MAX_LEVELS];
higher_precision *Node_k24[MAX_LEVELS];
higher_precision *Node_k25[MAX_LEVELS];
higher_precision *Node_k26[MAX_LEVELS];
higher_precision *Node_k34[MAX_LEVELS];
higher_precision *Node_k35[MAX_LEVELS];
higher_precision *Node_k36[MAX_LEVELS];
higher_precision *Node_k41[MAX_LEVELS];
higher_precision *Node_k42[MAX_LEVELS];
higher_precision *Node_k43[MAX_LEVELS];
higher_precision *Node_k44[MAX_LEVELS];
higher_precision *Node_k45[MAX_LEVELS];
higher_precision *Node_k46[MAX_LEVELS];
higher_precision *Node_k51[MAX_LEVELS];
higher_precision *Node_k52[MAX_LEVELS];
higher_precision *Node_k53[MAX_LEVELS];
higher_precision *Node_k54[MAX_LEVELS];
higher_precision *Node_k55[MAX_LEVELS];
higher_precision *Node_k56[MAX_LEVELS];
higher_precision *Node_k61[MAX_LEVELS];
higher_precision *Node_k62[MAX_LEVELS];
higher_precision *Node_k63[MAX_LEVELS];
higher_precision *Node_k64[MAX_LEVELS];
higher_precision *Node_k65[MAX_LEVELS];
higher_precision *Node_k66[MAX_LEVELS];
int *Node_map[MAX_LEVELS];
int *Node_map_3[MAX_LEVELS];
higher_precision *Bi;
higher_precision *BI[MAX_LEVELS]; /* inv of diagonal elements of K matrix */
higher_precision *Bi1,*Bi2,*Bi3;
higher_precision *BI1[MAX_LEVELS]; /* inv of diagonal elements of K matrix */
higher_precision *BI2[MAX_LEVELS];
higher_precision *BI3[MAX_LEVELS];
higher_precision *BI4[MAX_LEVELS]; /* inv of diagonal elements of K matrix */
higher_precision *BI5[MAX_LEVELS];
higher_precision *BI6[MAX_LEVELS];
higher_precision *BDD1[MAX_LEVELS]; /* inv of diagonal elements of K matrix */
higher_precision *BDD2[MAX_LEVELS];
higher_precision *BDD3[MAX_LEVELS];
higher_precision *Bpi;
higher_precision *BPI[MAX_LEVELS];
standard_precision *V[7],*V1[7]; /* velocity X[dirn][node] can save memory */
char *update_elt_k[MAX_LEVELS];
standard_precision *Pstrain; /* (nodal) plastic strain */
higher_precision *H,*S;
standard_precision *Psi;
standard_precision *Q,*F,*Fb; /* solid pressure, force vector, boundary forces */
standard_precision *nQ,*NQ[MAX_LEVELS]; /* nodal solid pressure */
standard_precision *Mass[MAX_LEVELS]; /* lumped mass matrix for p-g solver etc. */
standard_precision *mass; /* lumped mass matrix at levmax */
standard_precision *Trmass[MAX_LEVELS]; /* lumped mass matrix for p-g solver etc. */
standard_precision *trmass;
standard_precision *tw;
standard_precision *x[4]; /* node coordinate at finest level (levmax) */
standard_precision *X[MAX_LEVELS][4]; /* node coordinate at all levels */
standard_precision *sx[4]; /* node curvilinear coordinate at levmax */
standard_precision *SX[MAX_LEVELS][4]; /* node curvilinear coordinate at all levels */
standard_precision *sv[7];
standard_precision *VV[MAX_LEVELS][7]; /* velocity on all levels */
standard_precision *output ; /* Variable needed for output computations */
standard_precision *FF[MAX_LEVELS]; /* force vector at all levels */
standard_precision *FFb[MAX_LEVELS]; /* boundary forces at all levels */
standard_precision *QQ[MAX_LEVELS]; /* solid pressure at all levels */
standard_precision *Vb[7][MAX_LEVELS]; /* velocity bc at all levels */
standard_precision *Tb[MAX_LEVELS]; /* T bc at all levels, needed for solving v,p */
standard_precision *edot,*strs,*strd; /* (nodal) strain rate and stress */
standard_precision *depl; /* (nodal) depletion, RAA: C. O'Neill melting stuff */
standard_precision *strd1;
standard_precision *T,*T1,*Tdot; /* T, dT/dt at finest level (levmax) */
standard_precision *VB[7],*TB; /* boundary conditions for V,T defined everywhere (levmax)*/
standard_precision *TW[MAX_LEVELS]; /* nodal weightings */
unsigned int *node; /* properties of node at levmax */
unsigned int *NODE[MAX_LEVELS]; /* node properties at all levels */
unsigned int *elt;
int *index[MAX_LEVELS];
struct ID *idd;
struct LM *lmd;
struct Shape_function1 M; /* master-element shape functions */
struct Shape_function1_dx Mx; /* master-element shape function gradients */
struct Shape_function N; /* element shape functions */
struct Shape_function_dx Nx; /* element shape function gradients */
void (* iterative_solver)();
void (* next_buoyancy_field)();
void (* problem_settings)();
void (* problem_derived_values)();
void (* problem_allocate_vars)();
void (* velocity_boundary_conditions)();
void (* buoyancy_boundary_conditions)();
void (* problem_node_positions)();
void (* problem_update_node_positions)();
void (* problem_initial_fields)();
void (* problem_update_bcs)();
void (* special_process_new_velocity)();
void (* special_process_new_buoyancy)();
void (* solve_stokes_problem)();
void (* solver_allocate_vars)();
void (* transform)();
standard_precision (* advection_source_term)();
standard_precision (* node_space_function[3])();
};