HARM
harm and utilities
 All Data Structures Files Functions Variables Typedefs Macros Pages
global.funcdeclare.h
Go to the documentation of this file.
1 
2 
7 
8 
9 int interpX_gcov(FTYPE *X, struct of_compgeom PTRDEFMETMACP1A0(compgeom,FILL,N1M+SHIFT1,N2M+SHIFT2,N3M+SHIFT3), FTYPE PTRDEFMETMACP1A2(gcovgrid,FILL,N1M+SHIFT1,N2M+SHIFT2,N3M+SHIFT3,NDIM,NDIM), FTYPE PTRDEFMETMACP1A1(gcovpertgrid,FILL,N1M+SHIFT1,N2M+SHIFT2,N3M+SHIFT3,NDIM), FTYPE *gcov, FTYPE *gcovpert);
10 
11 
12 
13 
14 
15 
16 
17 
18 extern int main(int argc, char *argv[]);
19 extern int init(int *argc, char **argv[]);
20 
21 extern void parainitchecks(void);
22 extern void myargs(int argc, char *argv[]);
23 
24 
25 extern void pre_interpolate_and_advance(FTYPE (*pb)[NSTORE2][NSTORE3][NPR]);
26 
27 
28 extern int set_dt(FTYPE (*prim)[NSTORE2][NSTORE3][NPR], SFTYPE *dt);
29 
30 
31 
33 
34 
35 #include "flux.funcdeclare.h"
36 
37 
38 #include "metric_selfgravity_or_evolvemetric.funcdeclare.h"
39 
40 
41 
42 extern void get_inversion_startendindices(int *loop, int *is,int *ie,int *js,int *je,int *ks,int *ke);
43 extern void get_stag_startendindices(int *loop, int dir, int *is,int *ie,int *js,int *je,int *ks,int *ke);
44 extern void get_flux_startendindices(int *loop, int *is,int *ie,int *js,int *je,int *ks,int *ke);
45 
46 
47 extern int avg2cen_interp(int *locpl, int *whichpltoavg, int *ifnotavgthencopy, int whichquantity, int whichavg2cen, FTYPE (*prims_from_avg_cons)[NSTORE2][NSTORE3][NPR], FTYPE (*in)[NSTORE2][NSTORE3][NPR], FTYPE (*out)[NSTORE2][NSTORE3][NPR]);
48 
49 
50 
51 extern void set_defaults_performance_checks_prepreinit(void);
52 extern void set_defaults_performance_checks_preinit(void);
53 extern void set_file_versionnumbers(void);
54 
55 extern int timecheck(int whichlocation, SFTYPE comptstart);
56 extern int gocheck(int whichlocation);
57 extern int output_steptimedt_info(SFTYPE comptstart);
58 
59 #if(PRODUCTION<=1)
60 extern int error_check(int wherefrom);
61 #endif
62 
63 extern int find_horizon(int fromwhere);
64 
66 extern int init_dumps(void);
67 extern void output_nprlist_info(void);
68 extern void init_dnumcolumns_dnumversion(void);
69 
70 
71 
72 extern int init_linklists(void);
73 int setuplinklist(int numcolumns,int which);
74 extern struct blink * addlink(struct blink * clinkptr);
75 
76 
77 extern void report_systeminfo(FILE * fileout);
78 extern int IsLittleEndian(void);
79 extern void *SwapEndian(void* Addr, const int Nb);
80 
81 extern void makedirs(void);
82 
83 
85 extern int isenoughfreespace(unsigned long long need);
86 
87 
88 
89 #include "initbase.funcdeclare.h"
90 
91 
92 extern int higherorder_set(int whichquantity, int recontype, int*weightsplittype);
93 
94 extern int get_fluxpldirs(int *Nvec, int dir, int *fluxdir, int* pldir, int *plforflux, FTYPE *signflux);
95 extern void get_odirs(int dir,int *odir1,int *odir2);
96 extern int set_location_fluxasemforvpot(int dir, int *numdirs, int *odir1, int *odir2, int *loc);
97 extern int get_numdirs_fluxasemforvpot(int *numdirs, int *fieldloc);
98 
99 extern int plstart_set(int whichquantity, int dir, int recontype, int *plstart);
100 
101 
102 
103 #include "set_grid.funcdeclare.h"
104 
105 
106 
107 
108 
109 extern FTYPE interpn( int order, FTYPE x_eval, FTYPE x1, FTYPE f1, FTYPE x2, FTYPE f2, FTYPE x3, FTYPE f3, FTYPE x4, FTYPE f4, FTYPE x5, FTYPE f5, FTYPE x6, FTYPE f6 );
110 
111 extern void interpfun(int interptype, int numpoints, int i, FTYPE pos, FTYPE *xfun, FTYPE *fun, FTYPE *answer);
112 
113 
114 
115 
116 
119 
120 
121 #include "bounds.funcdeclare.h"
122 
123 #include "transforms.funcdeclare.h"
124 
125 #include "coord.funcdeclare.h"
126 
127 #include "metric.funcdeclare.h"
128 
129 #include "eos.funcdeclare.h"
130 
131 #include "phys.funcdeclare.h"
132 #include "phys.tools.funcdeclare.h"
133 
134 #include "utoprimgen.funcdeclare.h"
135 
136 
137 
138 
139 #include "tetrad.funcdeclare.h"
140 
141 
142 //extern void SHOULDNOTREACHHEREEVERBUGYOUHAVE(void);
143 
144 #include "wavespeeds.funcdeclare.h"
145 
146 #include "fixup.funcdeclare.h"
147 
148 #include "diag.funcdeclare.h"
149 
150 
151 
152 
153 
155 extern int get_loop(int pointorlinetype, int interporflux, int dir, struct of_loop *loop);
156 extern int set_interpalltypes_loop_ranges(int pointorlinetype, int interporflux, int dir, int loc, int continuous, int *intdir, int *is, int *ie, int *js, int *je, int *ks, int *ke, int *di, int *dj, int *dk, int *bs, int *ps, int *pe, int *be);
157 
158 
160 extern void set_interp_loop_gen(int withshifts, int interporflux, int dir, int loc, int continuous, int *intdir, int *is, int *ie, int *js, int *je, int *ks, int *ke, int *di, int *dj, int *dk, int *bs, int *ps, int *pe, int *be);
161 //extern void set_interp_loop(int withshifts, int interporflux, int dir, int loc, int continuous, int *intdir, int *is, int *ie, int *js, int *je, int *ks, int *ke, int *di, int *dj, int *dk, int *bs, int *ps, int *pe, int *be);
162 //extern void set_interp_loop_expanded(int withshifts, int interporflux, int dir, int loc, int continuous, int *intdir, int *is, int *ie, int *js, int *je, int *ks, int *ke, int *di, int *dj, int *dk, int *bs, int *ps, int *pe, int *be);
163 
165 extern int set_interppoint_loop_ranges(int interporflux, int dir, int loc, int continuous, int *is, int *ie, int *js, int *je, int *ks, int *ke, int *di, int *dj, int *dk);
166 extern int set_interppoint_loop_ranges_3Dextended(int interporflux, int loc, int continuous, int *maxis, int *maxie, int *maxjs, int *maxje, int *maxks, int *maxke, int *di, int *dj, int *dk);
167 extern void set_interppoint_loop_ranges_2D_EMF_formerged(int interporflux, int corner, int odir1, int odir2, int *is, int *ie, int *js, int *je, int *ks, int *ke, int *di, int *dj, int *dk);
168 extern void set_interppoint_loop_ranges_geomcorn_formerged(int interporflux, int corner, int odir1, int odir2, int *is, int *ie, int *js, int *je, int *ks, int *ke, int *di, int *dj, int *dk);
169 
170 extern void set_interppoint_loop(int interporflux, int dir, int loc, int continuous, int *is, int *ie, int *js, int *je, int *ks, int *ke, int *di, int *dj, int *dk);
171 extern void set_interppoint_loop_expanded(int interporflux, int dir, int loc, int *is, int *ie, int *js, int *je, int *ks, int *ke, int *di, int *dj, int *dk);
172 extern void set_interppoint_loop_expanded_face2cent(int interporflux, int dir, int loc, int *is, int *ie, int *js, int *je, int *ks, int *ke, int *di, int *dj, int *dk);
173 
174 #include "fluxvpot.funcdeclare.h"
175 
176 
178 extern void setup_nprlocalist(int whichprimtype, int *nprlocalstart, int *nprlocalend,int *nprlocallist, int *numprims);
179 
180 #include "nrutil.funcdeclare.h"
181 
182 
188 //extern void bondi_solve(FTYPE K, FTYPE gam, FTYPE *Rs, FTYPE *Urs,
189 // FTYPE *Edot);
190 //extern FTYPE bondi_trace(FTYPE K, FTYPE gam, FTYPE edotf, FTYPE r,
191 // FTYPE rs, FTYPE urs);
192 //extern void timestep(FTYPE ndtr, FTYPE ndth);
193 //extern FTYPE dtset(FTYPE ndtr, FTYPE ndth);
194 //
195 //extern FTYPE bondi_trace(FTYPE K, FTYPE gam, FTYPE edotf,
196 // FTYPE r, FTYPE rs, FTYPE urs);
197 //extern void bondi_solve(FTYPE K, FTYPE gam, FTYPE *Rs,
198 // FTYPE *Urs, FTYPE *Edot);
199 //extern FTYPE edot_calc(FTYPE r, FTYPE ur, FTYPE g, FTYPE K);
200 //extern FTYPE dedr_calc(FTYPE r, FTYPE ur, FTYPE g, FTYPE K);
201 //extern FTYPE dedur_calc(FTYPE r, FTYPE ur, FTYPE g, FTYPE K);
202 //extern FTYPE d2edr2_calc(FTYPE r, FTYPE ur, FTYPE g, FTYPE K);
203 //extern FTYPE d2edur2_calc(FTYPE r, FTYPE ur, FTYPE g, FTYPE K);
204 //extern FTYPE d2edrdur_calc(FTYPE r, FTYPE ur, FTYPE g, FTYPE K);
205 //
206 
208 
209 
210 
211 extern FTYPE sign_bad(FTYPE a);
212 extern FTYPE sign_func(FTYPE a);
213 
214 #ifdef WIN32
215 // GODMARK: Could refine for a=0
216 #define sign(a) ((a)>0 ? 1.0 : -1.0)
217 #else
218 
219 #if(SUPERLONGDOUBLE)
220 #define sign(a) (sign_bad(a))
221 #else
222 #define sign(a) (copysign(1.0,a))
223 #endif
224 
225 #endif
226 
227 
228 
229 extern FTYPE signavoidzero(FTYPE a);
230 
231 #ifndef WIN32
232 extern FTYPE max(FTYPE a, FTYPE b);
233 
234 extern FTYPE min(FTYPE a, FTYPE b);
235 #endif
236 
237 // supplemental trig functions
238 extern FTYPE mysign(FTYPE x);
239 extern FTYPE myfabs(FTYPE x);
240 
241 extern FTYPE mysin(FTYPE th);
242 extern FTYPE mycos(FTYPE th);
243 
244 #if(SUPERLONGDOUBLE==0)
245 extern FTYPE cot(FTYPE arg);
246 #endif
247 extern FTYPE csc(FTYPE arg);
248 extern FTYPE sec(FTYPE arg);
249 
255 #if(SUPERLONGDOUBLE)
256 #include "mconf.h"
257 extern long double ceill ( long double );
258 extern long double floorl ( long double );
259 extern long double atan2l ( long double, long double );
260 extern int signbitl ( long double );
261 //
262 extern long double fabsl ( long double );
263 extern long double sqrtl ( long double );
264 extern long double cbrtl ( long double );
265 extern long double expl ( long double );
266 extern long double logl ( long double );
267 extern long double tanl ( long double );
268 extern long double atanl ( long double );
269 extern long double sinl ( long double );
270 extern long double asinl ( long double );
271 extern long double cosl ( long double );
272 extern long double acosl ( long double );
273 extern long double powl ( long double, long double );
274 extern long double tanhl ( long double );
275 extern long double atanhl ( long double );
276 extern long double sinhl ( long double );
277 extern long double asinhl ( long double );
278 extern long double coshl ( long double );
279 extern long double acoshl ( long double );
280 extern long double exp2l ( long double );
281 extern long double log2l ( long double );
282 extern long double exp10l ( long double );
283 extern long double log10l ( long double );
284 extern long double gammal ( long double );
285 extern long double lgaml ( long double );
286 extern long double jnl ( int, long double );
287 extern long double ynl ( int, long double );
288 extern long double ndtrl ( long double );
289 extern long double ndtril ( long double );
290 extern long double stdtrl ( int, long double );
291 extern long double stdtril ( int, long double );
292 extern long double ellpel ( long double );
293 extern long double ellpkl ( long double );
294 long double lgammal(long double);
295 extern int isfinitel ( long double );
296 #define finite(arg) isfinitel(arg)
297 //#define isfinite(arg) isfinitel(arg)
298 #define copysign( a, b ) ( fabsl(a) * sign(b) )
299 extern int merror;
300 #else
301 
302 
303 
304 #include <math.h>
305 
306 #ifdef WIN32
307 #define finite(arg) _finite(arg)
308 #define isfinite(arg) _finite(arg)
309 #endif
310 
311 #ifndef WIN32
312 //#if USINGICC==0
313 #if(SUPERLONGDOUBLE==0 && !defined(isfinite))
314 // needed for Sauron
315 #define isfinite(arg) finite(arg) //atch -- on mako, in force-free it would complain about multiply-defined __finite() if not include this line
316 #endif
317 #endif // end if not defined WIN32
318 
319 #endif
320 
321 
322 #ifdef WIN32
323 #define copysign( a, b ) ( fabs(a) * sign(b) )
324 #endif
325 
326 
327 
328 
329 #if(!DO_ASSERTS)
330 #define assert assert_func_empty
331 #else
332 #define assert assert_func
333 #endif
334 
335 
336 extern int assert_func( int is_bad_val, char *s, ... );
337 extern int assert_func_empty( int is_bad_val, char *s, ... );
338 
339 
340 #include "global.funcdeclare.rad.h"
341 
342 #include "global.funcdeclare.user.h"