-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
328 lines (256 loc) · 9.24 KB
/
Makefile
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
objects = tillotson.o tillinitlookup.o tillsplint.o interpol/brent.o
exe = table pressureoldnew lookup lookup_cold testu1 testspline testsplint testnewsplint testsplint2 testsplinerho testsplintrho testsplinev testsplintv testcubicintrho testlookupucold testudrho testudv testgrid testpolyv printderiv printpress pressneg testisintable testisbelowcoldcurve testrhomin testoutofbounds testsolvebc calcisentrope testrhoptemp tillcalcpressure testdirectintegration testpoverrho2 testeospressure testtillpressure testtillrhopu tillpressrhotemp
#defs = -DTILL_PRESS_NP -DTILL_OUTPUT_ALL_WARNINGS -DTILL_PRESS_MELOSH
defs = -DTILL_PRESS_NP -DTILL_OUTPUT_ALL_WARNINGS -DTILL_VERBOSE
# GNU Science library (uncomment if not needed)
GSL_LIB = -lgsl -lgslcblas
CFLAGS ?= -O3 $(defs) -Wall
LIBS ?= -lm $(GSL_LIB)
default:
@echo "Please specify which tool you want to make."
all:
default
# Debug the function tillLookupU() by comparing the results of the lookup to a
# direct calculation using tillCalcU() which simply solves the ODE using a RK4
# integrator.
table: table.o $(objects)
cc -o table table.o $(objects) $(LIBS)
# Compare the results of tillPressureSoundold() that contains the old code we used in
# Gasoline and tillPressureSound()
pressureoldnew: pressureoldnew.o $(objects)
cc -o pressureoldnew pressureoldnew.o $(objects) $(LIBS)
#
# Generate a lookup table for a given material.
#
lookup: lookup.o $(objects)
cc -o lookup lookup.o $(objects) $(LIBS)
#
# Make a lookup table for the cold curve.
#
lookup_cold: lookup_cold.o $(objects)
cc -o lookup_cold lookup_cold.o $(objects) $(LIBS)
testu1: testu1.o $(objects)
cc -o testu1 testu1.o $(objects) $(LIBS)
testspline: testspline.o $(objects)
cc -o testspline testspline.o $(objects) $(LIBS)
#
# Code for debugging the interpolation function tillCubicInt().
#
testsplint: testsplint.o $(objects)
cc -o testsplint testsplint.o $(objects) $(LIBS)
#
# Code for debugging the new logarithmic lookup table.
#
testsplintlogrho: testsplintlogrho.o $(objects)
cc -o testsplintlogrho testsplintlogrho.o $(objects) $(LIBS)
#
# Code for debugging tillLookupU using the new logarithmic lookup table.
#
testlookupulogrho: testlookupulogrho.o $(objects)
cc -o testlookupulogrho testlookupulogrho.o $(objects) $(LIBS)
#
# Code for debugging tillCalcU using log(rho) as integration variable.
#
testcalcu: testcalcu.o $(objects)
cc -o testcalcu testcalcu.o $(objects) $(LIBS)
#
# Pretty much the same but it compares the old with the new interpolator.
#
testnewsplint: testnewsplint.o $(objects)
cc -o testnewsplint testnewsplint.o $(objects) $(LIBS)
testsplint2: testsplint2.o $(objects)
cc -o testsplint2 testsplint2.o $(objects) $(LIBS)
testsplinerho: testsplinerho.o $(objects)
cc -o testsplinerho testsplinerho.o $(objects) $(LIBS)
testsplintrho: testsplintrho.o $(objects)
cc -o testsplintrho testsplintrho.o $(objects) $(LIBS)
testsplinev: testsplinev.o $(objects)
cc -o testsplinev testsplinev.o $(objects) $(LIBS)
testsplintv: testsplintv.o $(objects)
cc -o testsplintv testsplintv.o $(objects) $(LIBS)
testcubicintrho: testcubicintrho.o $(objects)
cc -o testcubicintrho testcubicintrho.o $(objects) $(LIBS)
testlookupucold: testlookupucold.o $(objects)
cc -o testlookupucold testlookupucold.o $(objects) $(LIBS)
testudrho: testudrho.o $(objects)
cc -o testudrho testudrho.o $(objects) $(LIBS)
testudv: testudv.o $(objects)
cc -o testudv testudv.o $(objects) $(LIBS)
testgrid: testgrid.o $(objects)
cc -o testgrid testgrid.o $(objects) $(LIBS)
testpolyv: testpolyv.o $(objects)
cc -o testpolyv testpolyv.o $(objects) $(LIBS)
printderiv: printderiv.o $(objects)
cc -o printderiv printderiv.o $(objects) $(LIBS)
printpress: printpress.o $(objects)
cc -o printpress printpress.o $(objects) $(LIBS)
#
# Print the curve below which P < 0.
#
pressneg: pressneg.o $(objects)
cc -o pressneg pressneg.o $(objects) $(LIBS)
#
# Print the curve below which cs2 < 0.
#
csneg: csneg.o $(objects)
cc -o csneg csneg.o $(objects) $(LIBS)
testisintable: testisintable.o $(objects)
cc -o testisintable testisintable.o $(objects) $(LIBS)
testisbelowcoldcurve: testisbelowcoldcurve.o $(objects)
cc -o testisbelowcoldcurve testisbelowcoldcurve.o $(objects) $(LIBS)
testrhomin: testrhomin.o $(objects)
cc -o testrhomin testrhomin.o $(objects) $(LIBS)
testoutofbounds: testoutofbounds.o $(objects)
cc -o testoutofbounds testoutofbounds.o $(objects) $(LIBS)
testsolvebc: testsolvebc.o $(objects)
cc -o testsolvebc testsolvebc.o $(objects) $(LIBS)
calcisentrope: calcisentrope.o $(objects)
cc -o calcisentrope calcisentrope.o $(objects) $(LIBS)
testrhoptemp: testrhoptemp.o $(objects)
cc -o testrhoptemp testrhoptemp.o $(objects) $(LIBS)
eoscalcpressure: eoscalcpressure.o $(objects)
cc -o eoscalcpressure eoscalcpressure.o $(objects) $(LIBS)
eoscalcpressure_rhot: eoscalcpressure_rhot.o $(objects)
cc -o eoscalcpressure_rhot eoscalcpressure_rhot.o $(objects) $(LIBS)
#
# Calculate the bulk modulus for different isentropes.
#
tillcalcbulkmodulus: tillcalcbulkmodulus.o $(objects)
cc -o tillcalcbulkmodulus tillcalcbulkmodulus.o $(objects) $(LIBS)
# Code to test the direct integration tillCalcU().
testdirectintegration: testdirectintegration.o $(objects)
cc -o testdirectintegration testdirectintegration.o $(objects) $(LIBS)
#
# Print PoverRho2 for small rho to see, if the expression diverges.
#
testpoverrho2: testpoverrho2.o $(objects)
cc -o testpoverrho2 testpoverrho2.o $(objects) $(LIBS)
#
# Test the function eosPressureSound.
#
testeospressure: testeospressure.o $(objects)
cc -o testeospressure testeospressure.o $(objects) $(LIBS)
#
# Test the function eosPressureSoundRhoT.
#
testeospressurerhot: testeospressurerhot.o $(objects)
cc -o testeospressurerhot testeospressurerhot.o $(objects) $(LIBS)
#
# Test the function eosdPdrho.
#
testeosdpdrho: testeosdpdrho.o $(objects)
cc -o testeosdpdrho testeosdpdrho.o $(objects) $(LIBS)
#
# Test the function eosdPdu.
#
testeosdpdu: testeosdpdu.o $(objects)
cc -o testeosdpdu testeosdpdu.o $(objects) $(LIBS)
#
# Test the function eosRhoPU.
#
testeosrhopu: testeosrhopu.o $(objects)
cc -o testeosrhopu testeosrhopu.o $(objects) $(LIBS)
#
# Test the function eosRhoPU.
#
testeosurhop: testeosurhop.o $(objects)
cc -o testeosurhop testeosurhop.o $(objects) $(LIBS)
#
# Test the function eosLookupU.
#
testeoslookupu: testeoslookupu.o $(objects)
cc -o testeoslookupu testeoslookupu.o $(objects) $(LIBS)
#
# Test the function tillPressure.
#
testtillpressure: testtillpressure.o $(objects)
cc -o testtillpressure testtillpressure.o $(objects) $(LIBS)
#
# Test the function tillPressureNP.
#
testtillpressure_np: testtillpressure_np.o $(objects)
cc -o testtillpressure_np testtillpressure_np.o $(objects) $(LIBS)
#
# Test the function tillPressureSound.
#
testtillsound: testtillsound.o $(objects)
cc -o testtillsound testtillsound.o $(objects) $(LIBS)
#
# Test the function tillRhoPU().
#
testtillrhopu: testtillrhopu.o $(objects)
cc -o testtillrhopu testtillrhopu.o $(objects) $(LIBS)
#
# Test the ideal gas EOS.
#
testtillidealgas: testtillidealgas.o $(objects)
cc -o testtillidealgas testtillidealgas.o $(objects) $(LIBS)
#
# Generate an ASCII file containing the cold curve u_cold(rho).
#
tillmakecoldcurve: tillmakecoldcurve.o $(objects)
cc -o tillmakecoldcurve tillmakecoldcurve.o $(objects) $(LIBS)
#
# Test tillColdULookup().
#
testtillcoldu: testtillcoldu.o $(objects)
cc -o testtillcoldu testtillcoldu.o $(objects) $(LIBS)
#
# Test if the materials are correctly initialized if dKpcUnit and dMsolUnit are not set.
#
testtillcgs: testtillcgs.o $(objects)
cc -o testtillcgs testtillcgs.o $(objects) $(LIBS)
#
# Calculate the cold energy for a given density.
#
till_calc_u_cold: till_calc_u_cold.o $(objects)
cc -o till_calc_u_cold till_calc_u_cold.o $(objects) $(LIBS)
#
# Print the Tillotson EOS parameters for a material.
#
tillprintmat: tillprintmat.o $(objects)
cc -o tillprintmat tillprintmat.o $(objects) $(LIBS)
#
# Test the Woolfson (2007) density correction.
#
testwoolfson: testwoolfson.o woolfson.o $(objects)
cc -o testwoolfson testwoolfson.o woolfson.o $(objects) $(LIBS)
#
# Calculate the Woolfson (2007) coefficients for two given material.
#
calc_fij: calc_fij.o woolfson.o $(objects)
cc -o calc_fij calc_fij.o woolfson.o $(objects) $(LIBS) -Wall
#
# Set a minimum sound speed.
#
soundspeed_cutoff: soundspeed_cutoff.o $(objects)
cc -o soundspeed_cutoff soundspeed_cutoff.o $(objects) $(LIBS)
#
# Calculate P(rho, T=const) for different temperatures.
#
tillpressrhotemp: tillpressrhotemp.o $(objects)
cc -o tillpressrhotemp tillpressrhotemp.o $(objects) $(LIBS)
#
# Check if P(rho, T=const) is monotonic.
#
tillpressrhotemp_monotonic: tillpressrhotemp_monotonic.o $(objects)
cc -o tillpressrhotemp_monotonic tillpressrhotemp_monotonic.o $(objects) $(LIBS)
#
# Plot the pressure on a rho x u grid.
#
plottillpressure: plottillpressure.o $(objects)
cc -o plottillpressure plottillpressure.o $(objects) $(LIBS)
#
# Calculate for which points the pressure is negative or the sound speed is imaginary.
#
tillmarkneg: tillmarkneg.o $(objects)
cc -o tillmarkneg tillmarkneg.o $(objects) $(LIBS)
#
# Calculate the generalized Gruneisen parameter along different isentropes.
#
tillcalcgamma: tillcalcgamma.o $(objects)
cc -o tillcalcgamma tillcalcgamma.o $(objects) $(LIBS)
clean:
rm $(objects)
cleanall:
rm $(exe) $(objects) *.o