Codebase list gerris / 0d617a7
Port to Python 3 Stuart Prescott 4 years ago
2 changed file(s) with 2240 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 From: Stuart Prescott <stuart@debian.org>
1 Date: Sun, 9 Feb 2020 21:09:09 +1100
2 Subject: Port to Python 3
3
4 ---
5 doc/examples/Makefile.am | 4 +--
6 doc/examples/Makefile.in | 4 +--
7 doc/examples/atomisation.sh | 2 +-
8 doc/examples/boussinesq.sh | 2 +-
9 doc/examples/bubble.sh | 2 +-
10 doc/examples/column.sh | 2 +-
11 doc/examples/cyclone.sh | 2 +-
12 doc/examples/cylinder.sh | 2 +-
13 doc/examples/dam.sh | 2 +-
14 doc/examples/depend.py | 26 +++++++++++---------
15 doc/examples/forcedturbulence.sh | 2 +-
16 doc/examples/garden.sh | 2 +-
17 doc/examples/gfs2doc.in | 20 +++++++--------
18 doc/examples/gfs2tex | 2 +-
19 doc/examples/gfs2tex.py | 2 +-
20 doc/examples/hump.sh | 2 +-
21 doc/examples/logo.sh | 2 +-
22 doc/examples/monai.sh | 2 +-
23 doc/examples/plateau.sh | 2 +-
24 doc/examples/rt.sh | 2 +-
25 doc/examples/ship.sh | 2 +-
26 doc/examples/shock.sh | 2 +-
27 doc/examples/starting.sh | 2 +-
28 doc/examples/tangaroa.sh | 2 +-
29 doc/examples/test.py | 12 ++++-----
30 doc/examples/tides.sh | 2 +-
31 doc/examples/tsunami.sh | 2 +-
32 doc/examples/viscmix.sh | 2 +-
33 doc/examples/wingtip.sh | 2 +-
34 test/Makefile.am | 4 +--
35 test/Makefile.in | 4 +--
36 test/advection.sh | 2 +-
37 test/advection/advection.sh | 2 +-
38 test/annulus.sh | 2 +-
39 test/annulus/annulus.sh | 2 +-
40 test/axi.sh | 2 +-
41 test/axi/axi.sh | 2 +-
42 test/axi/viscous/viscous.sh | 4 +--
43 test/axiadvection.sh | 2 +-
44 test/boundaries.sh | 2 +-
45 test/boundaries/boundaries.sh | 26 ++++++++++----------
46 test/bump.sh | 2 +-
47 test/bump/bump.sh | 14 +++++------
48 test/capwave.sh | 2 +-
49 test/capwave/capwave.sh | 2 +-
50 test/channel.sh | 2 +-
51 test/channel/channel.sh | 26 ++++++++++----------
52 test/check.py | 2 +-
53 test/circle.sh | 2 +-
54 test/circle/circle.sh | 10 ++++----
55 test/conservation.sh | 2 +-
56 test/coriolis.sh | 2 +-
57 test/coriolis/coriolis.sh | 2 +-
58 test/cosine.sh | 2 +-
59 test/cosine/cosine.sh | 10 ++++----
60 test/couette.sh | 2 +-
61 test/couette/couette.sh | 6 ++---
62 test/cylinder.sh | 2 +-
63 test/cylinder/cylinder.sh | 6 ++---
64 test/debye.sh | 2 +-
65 test/debye/debye.sh | 8 +++---
66 test/depend.py | 41 ++++++++++++++++++-------------
67 test/diffusion.sh | 2 +-
68 test/dumbell.sh | 2 +-
69 test/electro.sh | 2 +-
70 test/electro/electro.sh | 8 +++---
71 test/gaussian.sh | 2 +-
72 test/gaussian/gaussian.sh | 6 ++---
73 test/geo.sh | 2 +-
74 test/geo/beta/beta.sh | 2 +-
75 test/geo/geo.sh | 2 +-
76 test/geo/river/geo.sh | 2 +-
77 test/gfs2tex | 2 +-
78 test/groundwater.sh | 2 +-
79 test/groundwater/groundwater.sh | 8 +++---
80 test/harmonic.sh | 2 +-
81 test/harmonic/harmonic.sh | 6 ++---
82 test/height.sh | 2 +-
83 test/hexagon.sh | 2 +-
84 test/hexagon/hexagon.sh | 2 +-
85 test/hydrostatic.sh | 2 +-
86 test/injectionaxi.sh | 2 +-
87 test/kinetic.sh | 2 +-
88 test/lake.sh | 2 +-
89 test/lake/river/river.sh | 4 +--
90 test/lake/stratified/stratified.sh | 4 +--
91 test/lid.sh | 2 +-
92 test/lid/explicit/lid.sh | 6 ++---
93 test/lid/lid.sh | 6 ++---
94 test/lonlat.sh | 2 +-
95 test/merging.sh | 2 +-
96 test/merging/merging.sh | 22 ++++++++---------
97 test/nonlinear.sh | 2 +-
98 test/nonlinear/nonlinear.sh | 8 +++---
99 test/nz.sh | 2 +-
100 test/oscillation.sh | 2 +-
101 test/oscillation/oscillation.sh | 2 +-
102 test/parabola.sh | 2 +-
103 test/parabola/parabola.sh | 4 +--
104 test/periodic.sh | 2 +-
105 test/periodic/periodic.sh | 28 ++++++++++-----------
106 test/planar.sh | 2 +-
107 test/plate.sh | 2 +-
108 test/plateau.sh | 2 +-
109 test/poiseuille.sh | 2 +-
110 test/poiseuille/poiseuille.sh | 2 +-
111 test/poiseuille/river/river.sh | 2 +-
112 test/poisson.sh | 2 +-
113 test/poisson/poisson.sh | 10 ++++----
114 test/reynolds.sh | 2 +-
115 test/reynolds/reynolds.sh | 6 ++---
116 test/reynolds/skew/skew.sh | 2 +-
117 test/reynolds/skewbox/skew.sh | 6 ++---
118 test/rossby.sh | 2 +-
119 test/rossby/rossby.sh | 6 ++---
120 test/rotate.sh | 2 +-
121 test/sessile.sh | 2 +-
122 test/sessile/sessile.sh | 4 +--
123 test/shear.sh | 2 +-
124 test/shear/concentration/concentration.sh | 2 +-
125 test/shear/shear.sh | 2 +-
126 test/shock.sh | 2 +-
127 test/shock/layered/layered.sh | 4 +--
128 test/shock/shock.sh | 4 +--
129 test/shore.sh | 2 +-
130 test/shore/shore.sh | 8 +++---
131 test/source.sh | 2 +-
132 test/source/source.sh | 6 ++---
133 test/spurious.sh | 2 +-
134 test/spurious/spurious.sh | 2 +-
135 test/still.sh | 2 +-
136 test/strouhal.sh | 2 +-
137 test/strouhal/strouhal.sh | 2 +-
138 test/swirl.sh | 2 +-
139 test/swirl/swirl.gfs | 6 ++---
140 test/terrain.sh | 2 +-
141 test/terrain/terrain.sh | 10 ++++----
142 test/test.py | 18 +++++++-------
143 test/wannier.sh | 2 +-
144 test/wannier/bipolar/bipolar.sh | 2 +-
145 test/wannier/wannier.sh | 2 +-
146 test/waves.sh | 2 +-
147 test/waves/waves.sh | 2 +-
148 143 files changed, 318 insertions(+), 309 deletions(-)
149
150 diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
151 index 32bc766..6e76223 100644
152 --- a/doc/examples/Makefile.am
153 +++ b/doc/examples/Makefile.am
154 @@ -68,7 +68,7 @@ DOC = examples
155 BIBINPUTS = $(top_srcdir)/doc
156
157 Makefile.deps: template.tex depend.py Makefile.am
158 - python depend.py `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` > Makefile.deps
159 + python3 depend.py `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` > Makefile.deps
160 echo "" >> Makefile.deps
161 echo -n "EXAMPLES = " >> Makefile.deps
162 echo `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` >> Makefile.deps
163 @@ -77,7 +77,7 @@ include Makefile.deps
164
165 examples.tex: template.tex Makefile.deps gfs2tex gfs2tex.py
166 rm -r -f examples
167 - python gfs2tex $(EXAMPLES)
168 + python3 gfs2tex $(EXAMPLES)
169 sed -e "s/GFS_VERSION/`$(top_srcdir)/src/gerris2D -V 2>&1 | head -1 | cut -d' ' -f6-`/g" \
170 -e 's/\\test{\(.*\)\/\(.*\)}/\\input{\1\/\2\/\2.tex}/g' \
171 -e 's/\\test{\(.*\)}/\\input{\1\/\1.tex}/g' \
172 diff --git a/doc/examples/Makefile.in b/doc/examples/Makefile.in
173 index 18f09f3..8ac31c8 100644
174 --- a/doc/examples/Makefile.in
175 +++ b/doc/examples/Makefile.in
176 @@ -1240,7 +1240,7 @@ clean-generic:
177 $(RM) -r examples
178
179 Makefile.deps: template.tex depend.py Makefile.am
180 - python depend.py `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` > Makefile.deps
181 + python3 depend.py `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` > Makefile.deps
182 echo "" >> Makefile.deps
183 echo -n "EXAMPLES = " >> Makefile.deps
184 echo `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` >> Makefile.deps
185 @@ -1409,7 +1409,7 @@ examples.tex: \
186
187 examples.tex: template.tex Makefile.deps gfs2tex gfs2tex.py
188 rm -r -f examples
189 - python gfs2tex $(EXAMPLES)
190 + python3 gfs2tex $(EXAMPLES)
191 sed -e "s/GFS_VERSION/`$(top_srcdir)/src/gerris2D -V 2>&1 | head -1 | cut -d' ' -f6-`/g" \
192 -e 's/\\test{\(.*\)\/\(.*\)}/\\input{\1\/\2\/\2.tex}/g' \
193 -e 's/\\test{\(.*\)}/\\input{\1\/\1.tex}/g' \
194 diff --git a/doc/examples/atomisation.sh b/doc/examples/atomisation.sh
195 index b41135b..909ca3a 100755
196 --- a/doc/examples/atomisation.sh
197 +++ b/doc/examples/atomisation.sh
198 @@ -1 +1 @@
199 -python -u test.py atomisation
200 +python3 -u test.py atomisation
201 diff --git a/doc/examples/boussinesq.sh b/doc/examples/boussinesq.sh
202 index ad0a5d5..e91c9d3 100755
203 --- a/doc/examples/boussinesq.sh
204 +++ b/doc/examples/boussinesq.sh
205 @@ -1 +1 @@
206 -python -u test.py boussinesq
207 +python3 -u test.py boussinesq
208 diff --git a/doc/examples/bubble.sh b/doc/examples/bubble.sh
209 index e7871ff..239c587 100755
210 --- a/doc/examples/bubble.sh
211 +++ b/doc/examples/bubble.sh
212 @@ -1 +1 @@
213 -python -u test.py bubble
214 +python3 -u test.py bubble
215 diff --git a/doc/examples/column.sh b/doc/examples/column.sh
216 index 6a5eb50..1c131d4 100755
217 --- a/doc/examples/column.sh
218 +++ b/doc/examples/column.sh
219 @@ -1 +1 @@
220 -python -u test.py column
221 +python3 -u test.py column
222 diff --git a/doc/examples/cyclone.sh b/doc/examples/cyclone.sh
223 index 662f19a..00b1fae 100755
224 --- a/doc/examples/cyclone.sh
225 +++ b/doc/examples/cyclone.sh
226 @@ -1 +1 @@
227 -python -u test.py cyclone
228 +python3 -u test.py cyclone
229 diff --git a/doc/examples/cylinder.sh b/doc/examples/cylinder.sh
230 index 73135b6..c0390c4 100755
231 --- a/doc/examples/cylinder.sh
232 +++ b/doc/examples/cylinder.sh
233 @@ -1 +1 @@
234 -python -u test.py cylinder
235 +python3 -u test.py cylinder
236 diff --git a/doc/examples/dam.sh b/doc/examples/dam.sh
237 index 76bb320..5624bf8 100755
238 --- a/doc/examples/dam.sh
239 +++ b/doc/examples/dam.sh
240 @@ -1 +1 @@
241 -python -u test.py dam
242 +python3 -u test.py dam
243 diff --git a/doc/examples/depend.py b/doc/examples/depend.py
244 index 0e46ee9..fa41cf9 100644
245 --- a/doc/examples/depend.py
246 +++ b/doc/examples/depend.py
247 @@ -1,12 +1,12 @@
248 -#!/usr/bin/python
249 +#!/usr/bin/python3
250
251 import sys
252 import os
253 import os.path
254 import gfs2tex
255
256 -print "## File generated automatically by depend.py: do not modify by hand"
257 -print ""
258 +print("## File generated automatically by depend.py: do not modify by hand")
259 +print("")
260
261 dists = ""
262 depends = ""
263 @@ -15,9 +15,9 @@ tests = ""
264 for start in sys.argv[1:]:
265 tests += "\\\n\t" + start + ".sh"
266 f = open(start + ".sh", "w")
267 - f.write("python -u test.py " + start + "\n")
268 + f.write("python3 -u test.py " + start + "\n")
269 f.close()
270 - os.chmod(start + ".sh",0755)
271 + os.chmod(start + ".sh",0o755)
272 for root, dirs, files in os.walk(start,topdown=True):
273 if not ".xvpics" in root:
274 example = gfs2tex.Example(root)
275 @@ -33,10 +33,12 @@ for start in sys.argv[1:]:
276 if f[-4:] == ".mpg" or f[-4:] == ".ogv" or f[-4:] == ".png" or f[-4:] == ".mp4":
277 docs += "\\\n\t" + example.path + "/" + f
278
279 -print "DOCS = " + docs + dists
280 -print ""
281 -print "TESTS = " + tests
282 -print ""
283 -print "EXTRA_DIST += $(TESTS)" + dists
284 -print ""
285 -print "examples.tex: " + depends
286 +print("DOCS = " + docs + dists)
287 +print("")
288 +print("TESTS = " + tests)
289 +print("")
290 +print("EXTRA_DIST += $(TESTS)" + dists)
291 +print("")
292 +print("TESTS = " + tests)
293 +print("")
294 +print("examples.tex: " + depends)
295 diff --git a/doc/examples/forcedturbulence.sh b/doc/examples/forcedturbulence.sh
296 index 38409f9..d1da5f1 100755
297 --- a/doc/examples/forcedturbulence.sh
298 +++ b/doc/examples/forcedturbulence.sh
299 @@ -1 +1 @@
300 -python -u test.py forcedturbulence
301 +python3 -u test.py forcedturbulence
302 diff --git a/doc/examples/garden.sh b/doc/examples/garden.sh
303 index fd9f1f5..67f9885 100755
304 --- a/doc/examples/garden.sh
305 +++ b/doc/examples/garden.sh
306 @@ -1 +1 @@
307 -python -u test.py garden
308 +python3 -u test.py garden
309 diff --git a/doc/examples/gfs2doc.in b/doc/examples/gfs2doc.in
310 index fd4f613..9f418b9 100644
311 --- a/doc/examples/gfs2doc.in
312 +++ b/doc/examples/gfs2doc.in
313 @@ -1,4 +1,4 @@
314 -#!/usr/bin/python
315 +#!/usr/bin/python3
316
317 import sys
318 import os
319 @@ -10,7 +10,7 @@ sys.path.append("@prefix@/share/gerris")
320 import gfs2tex
321
322 if len(sys.argv) < 2:
323 - print "usage: gfs2doc DIR1 DIR2..."
324 + print("usage: gfs2doc DIR1 DIR2...")
325 sys.exit(1)
326
327 def myexit(s):
328 @@ -51,10 +51,10 @@ for d in sys.argv[1:]:
329 "&& dvips -Ppdf -G0 " + example.name + ".dvi -o " + example.name + ".ps" +\
330 "&& ps2pdf -sPAPERSIZE=a4 -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true -dEmbedAllFonts=true " + example.name + ".ps " + example.name + ".pdf" +\
331 "&& mv " + example.name + ".pdf " + os.getcwd()):
332 - print "\n\n**** Errors occured while generating file ****: " + example.name + ".pdf"
333 + print("\n\n**** Errors occured while generating file ****: " + example.name + ".pdf")
334 myexit(1)
335
336 - print "\n\n**** Successfully generated file ****: " + example.name + ".pdf\n\n"
337 + print("\n\n**** Successfully generated file ****: " + example.name + ".pdf\n\n")
338 hname = wdname + "/" + example.name + "_html"
339 os.mkdir(hname)
340 os.symlink("../" + example.name, hname + "/" + example.name)
341 @@ -63,7 +63,7 @@ for d in sys.argv[1:]:
342 "&& cd " + wdname + \
343 "&& hevea -fix -I @prefix@/share/gerris " + example.name + ".tex" + \
344 "&& sh @prefix@/share/gerris/kaltura.sh " + example.name):
345 - print "\n\n**** Errors occured while generating directory ****: " + example.name + "_html"
346 + print("\n\n**** Errors occured while generating directory ****: " + example.name + "_html")
347 myexit(1)
348 os.system("export TEXINPUTS=\".:@prefix@/share/gerris:\" " +\
349 "&& cd " + wdname + \
350 @@ -72,20 +72,20 @@ for d in sys.argv[1:]:
351 hname + \
352 "; mv " + hname + " " + wdir)
353
354 - print "\n\n**** Successfully generated directory ****: " + example.name + "_html\n"
355 + print("\n\n**** Successfully generated directory ****: " + example.name + "_html\n")
356 files = example.name + "/" + example.name + ".gfs"
357 for f in example.required:
358 files += " " + example.name + "/" + f
359 if os.system("tar czf " + example.name + ".tgz " + files):
360 - print "**** Errors occured while generating file ****: " + example.name + ".tgz"
361 + print("**** Errors occured while generating file ****: " + example.name + ".tgz")
362 os.remove(example.name + ".tgz")
363 myexit(1)
364 status,msg = example.test()
365 if status != None:
366 - print "**** Errors occured while generating file ****: " + example.name + ".tgz"
367 - print " ".join(msg)
368 + print("**** Errors occured while generating file ****: " + example.name + ".tgz")
369 + print(" ".join(msg))
370 os.remove(example.name + ".tgz")
371 myexit(1)
372
373 - print "**** Successfully generated file ****: " + example.name + ".tgz"
374 + print("**** Successfully generated file ****: " + example.name + ".tgz")
375 os.system("rm -r -f " + wdname)
376 diff --git a/doc/examples/gfs2tex b/doc/examples/gfs2tex
377 index d2588a0..6223309 100644
378 --- a/doc/examples/gfs2tex
379 +++ b/doc/examples/gfs2tex
380 @@ -1,4 +1,4 @@
381 -#!/usr/bin/python
382 +#!/usr/bin/python3
383
384 import sys
385 import os
386 diff --git a/doc/examples/gfs2tex.py b/doc/examples/gfs2tex.py
387 index e0da406..7c7f792 100644
388 --- a/doc/examples/gfs2tex.py
389 +++ b/doc/examples/gfs2tex.py
390 @@ -163,7 +163,7 @@ class Example:
391 if len(record) > 0:
392 if record[0] == "user":
393 self.runtime = float(record[1])
394 - print >>open(self.path + "/runtime",'w'), self.runtime
395 + print(self.runtime, file=open(self.path + "/runtime",'w'))
396 elif record[0] != "real" and record[0] != "sys":
397 lines.append(l)
398 else:
399 diff --git a/doc/examples/hump.sh b/doc/examples/hump.sh
400 index 64135cb..3c466c2 100755
401 --- a/doc/examples/hump.sh
402 +++ b/doc/examples/hump.sh
403 @@ -1 +1 @@
404 -python -u test.py hump
405 +python3 -u test.py hump
406 diff --git a/doc/examples/logo.sh b/doc/examples/logo.sh
407 index af27cf2..37c8638 100755
408 --- a/doc/examples/logo.sh
409 +++ b/doc/examples/logo.sh
410 @@ -1 +1 @@
411 -python -u test.py logo
412 +python3 -u test.py logo
413 diff --git a/doc/examples/monai.sh b/doc/examples/monai.sh
414 index 370be37..2ddfff1 100755
415 --- a/doc/examples/monai.sh
416 +++ b/doc/examples/monai.sh
417 @@ -1 +1 @@
418 -python -u test.py monai
419 +python3 -u test.py monai
420 diff --git a/doc/examples/plateau.sh b/doc/examples/plateau.sh
421 index 1090cf1..8e81dc9 100755
422 --- a/doc/examples/plateau.sh
423 +++ b/doc/examples/plateau.sh
424 @@ -1 +1 @@
425 -python -u test.py plateau
426 +python3 -u test.py plateau
427 diff --git a/doc/examples/rt.sh b/doc/examples/rt.sh
428 index e325c99..cbc68bf 100755
429 --- a/doc/examples/rt.sh
430 +++ b/doc/examples/rt.sh
431 @@ -1 +1 @@
432 -python -u test.py rt
433 +python3 -u test.py rt
434 diff --git a/doc/examples/ship.sh b/doc/examples/ship.sh
435 index bdb7bf9..ef872ae 100755
436 --- a/doc/examples/ship.sh
437 +++ b/doc/examples/ship.sh
438 @@ -1 +1 @@
439 -python -u test.py ship
440 +python3 -u test.py ship
441 diff --git a/doc/examples/shock.sh b/doc/examples/shock.sh
442 index 54a0367..ec926ea 100755
443 --- a/doc/examples/shock.sh
444 +++ b/doc/examples/shock.sh
445 @@ -1 +1 @@
446 -python -u test.py shock
447 +python3 -u test.py shock
448 diff --git a/doc/examples/starting.sh b/doc/examples/starting.sh
449 index 3944347..54d263b 100755
450 --- a/doc/examples/starting.sh
451 +++ b/doc/examples/starting.sh
452 @@ -1 +1 @@
453 -python -u test.py starting
454 +python3 -u test.py starting
455 diff --git a/doc/examples/tangaroa.sh b/doc/examples/tangaroa.sh
456 index af1f283..13d32e8 100755
457 --- a/doc/examples/tangaroa.sh
458 +++ b/doc/examples/tangaroa.sh
459 @@ -1 +1 @@
460 -python -u test.py tangaroa
461 +python3 -u test.py tangaroa
462 diff --git a/doc/examples/test.py b/doc/examples/test.py
463 index 797b612..d8af54c 100644
464 --- a/doc/examples/test.py
465 +++ b/doc/examples/test.py
466 @@ -11,12 +11,12 @@ for start in sys.argv[1:]:
467 example = gfs2tex.Example(root)
468 status,msg = example.test()
469 if status != None:
470 - print "FAIL:",root
471 + print("FAIL:",root)
472 if len(msg) > 0:
473 - print " ".join(msg)
474 + print(" ".join(msg))
475 failed += 1
476 else:
477 - print "PASS:",root
478 + print("PASS:",root)
479 n += 1
480
481 if failed:
482 @@ -24,9 +24,9 @@ if failed:
483 else:
484 msg = "All " + repr(n) + " tests passed"
485
486 -print len(msg)*"="
487 -print msg
488 -print len(msg)*"="
489 +print(len(msg)*"=")
490 +print(msg)
491 +print(len(msg)*"=")
492
493 if failed:
494 sys.exit(1)
495 diff --git a/doc/examples/tides.sh b/doc/examples/tides.sh
496 index ea25ab8..f6fe067 100755
497 --- a/doc/examples/tides.sh
498 +++ b/doc/examples/tides.sh
499 @@ -1 +1 @@
500 -python -u test.py tides
501 +python3 -u test.py tides
502 diff --git a/doc/examples/tsunami.sh b/doc/examples/tsunami.sh
503 index 0195683..b152e70 100755
504 --- a/doc/examples/tsunami.sh
505 +++ b/doc/examples/tsunami.sh
506 @@ -1 +1 @@
507 -python -u test.py tsunami
508 +python3 -u test.py tsunami
509 diff --git a/doc/examples/viscmix.sh b/doc/examples/viscmix.sh
510 index b6ae4a4..b740226 100755
511 --- a/doc/examples/viscmix.sh
512 +++ b/doc/examples/viscmix.sh
513 @@ -1 +1 @@
514 -python -u test.py viscmix
515 +python3 -u test.py viscmix
516 diff --git a/doc/examples/wingtip.sh b/doc/examples/wingtip.sh
517 index 1bf7a5c..5a0d5ad 100755
518 --- a/doc/examples/wingtip.sh
519 +++ b/doc/examples/wingtip.sh
520 @@ -1 +1 @@
521 -python -u test.py wingtip
522 +python3 -u test.py wingtip
523 diff --git a/test/Makefile.am b/test/Makefile.am
524 index ef0091a..eac5f05 100644
525 --- a/test/Makefile.am
526 +++ b/test/Makefile.am
527 @@ -24,7 +24,7 @@ TEXINPUTS = .:$(top_srcdir)/doc/examples:
528 BIBINPUTS = $(top_srcdir)/doc
529
530 Makefile.deps: template.tex depend.py Makefile.am
531 - python depend.py `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` > Makefile.deps
532 + python3 depend.py `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` > Makefile.deps
533 echo "" >> Makefile.deps
534 echo -n "TESTDIRS = " >> Makefile.deps
535 echo `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` >> Makefile.deps
536 @@ -33,7 +33,7 @@ include Makefile.deps
537
538 tests.tex: template.tex Makefile.deps
539 rm -r -f tests
540 - python gfs2tex $(TESTDIRS)
541 + python3 gfs2tex $(TESTDIRS)
542 sed -e 's/\\test{\(.*\)\/\(.*\)}/\\input{\1\/\2\/\2.tex}/g' \
543 -e 's/\\test{\(.*\)}/\\input{\1\/\1.tex}/g' < template.tex > tests.tex
544
545 diff --git a/test/Makefile.in b/test/Makefile.in
546 index 3961332..f545dca 100644
547 --- a/test/Makefile.in
548 +++ b/test/Makefile.in
549 @@ -1439,7 +1439,7 @@ clean-generic:
550 mv -f summary.sh.bak summary.sh
551
552 Makefile.deps: template.tex depend.py Makefile.am
553 - python depend.py `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` > Makefile.deps
554 + python3 depend.py `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` > Makefile.deps
555 echo "" >> Makefile.deps
556 echo -n "TESTDIRS = " >> Makefile.deps
557 echo `grep \\test{[^/]*} < template.tex | sed 's/\\\\test{\(.*\)}/\1/g'` >> Makefile.deps
558 @@ -1917,7 +1917,7 @@ tests.tex: \
559
560 tests.tex: template.tex Makefile.deps
561 rm -r -f tests
562 - python gfs2tex $(TESTDIRS)
563 + python3 gfs2tex $(TESTDIRS)
564 sed -e 's/\\test{\(.*\)\/\(.*\)}/\\input{\1\/\2\/\2.tex}/g' \
565 -e 's/\\test{\(.*\)}/\\input{\1\/\1.tex}/g' < template.tex > tests.tex
566
567 diff --git a/test/advection.sh b/test/advection.sh
568 index 4048d7f..5760891 100755
569 --- a/test/advection.sh
570 +++ b/test/advection.sh
571 @@ -1 +1 @@
572 -python -u test.py advection
573 +python3 -u test.py advection
574 diff --git a/test/advection/advection.sh b/test/advection/advection.sh
575 index f165a2c..b31aaa1 100644
576 --- a/test/advection/advection.sh
577 +++ b/test/advection/advection.sh
578 @@ -54,7 +54,7 @@ else
579 exit 1
580 fi
581
582 -if cat <<EOF | python ; then :
583 +if cat <<EOF | python3 ; then :
584 from check import *
585 from sys import *
586 if (Curve('error',1,4) - Curve('error.ref',1,4)).max() > 1e-6:
587 diff --git a/test/annulus.sh b/test/annulus.sh
588 index d8fab36..b09ae32 100755
589 --- a/test/annulus.sh
590 +++ b/test/annulus.sh
591 @@ -1 +1 @@
592 -python -u test.py annulus
593 +python3 -u test.py annulus
594 diff --git a/test/annulus/annulus.sh b/test/annulus/annulus.sh
595 index d1b2c2b..02ef169 100644
596 --- a/test/annulus/annulus.sh
597 +++ b/test/annulus/annulus.sh
598 @@ -42,7 +42,7 @@ else
599 exit 1
600 fi
601
602 -if cat <<EOF | python ; then :
603 +if cat <<EOF | python3 ; then :
604 from check import *
605 from sys import *
606 if (Curve('error',1,4) - Curve('error.ref',1,4)).max() > 1e-6:
607 diff --git a/test/axi.sh b/test/axi.sh
608 index 109ea9e..5c12920 100755
609 --- a/test/axi.sh
610 +++ b/test/axi.sh
611 @@ -1 +1 @@
612 -python -u test.py axi
613 +python3 -u test.py axi
614 diff --git a/test/axi/axi.sh b/test/axi/axi.sh
615 index 5bb2bb1..e72ae2a 100644
616 --- a/test/axi/axi.sh
617 +++ b/test/axi/axi.sh
618 @@ -55,7 +55,7 @@ else
619 exit 1
620 fi
621
622 -if cat <<EOF | python ; then :
623 +if cat <<EOF | python3 ; then :
624 from check import *
625 from sys import *
626 if (Curve('error',1,3) - Curve('error.ref',1,3)).max() > 1e-5:
627 diff --git a/test/axi/viscous/viscous.sh b/test/axi/viscous/viscous.sh
628 index 765877f..dc36c38 100644
629 --- a/test/axi/viscous/viscous.sh
630 +++ b/test/axi/viscous/viscous.sh
631 @@ -38,11 +38,11 @@ else
632 exit 1
633 fi
634
635 -if cat <<EOF | python ; then :
636 +if cat <<EOF | python3 ; then :
637 from check import *
638 from sys import *
639 if (Curve('cp-12-100',1,2) - Curve('fadlun-cp-100',1,2)).norm2() > 1.6e-2:
640 - print (Curve('cp-12-100',1,2) - Curve('fadlun-cp-100',1,2)).norm2()
641 + print((Curve('cp-12-100',1,2) - Curve('fadlun-cp-100',1,2)).norm2())
642 exit(1)
643 EOF
644 else
645 diff --git a/test/axiadvection.sh b/test/axiadvection.sh
646 index e47a378..a09c4ed 100755
647 --- a/test/axiadvection.sh
648 +++ b/test/axiadvection.sh
649 @@ -1 +1 @@
650 -python -u test.py axiadvection
651 +python3 -u test.py axiadvection
652 diff --git a/test/boundaries.sh b/test/boundaries.sh
653 index 8bf277a..ed7237a 100755
654 --- a/test/boundaries.sh
655 +++ b/test/boundaries.sh
656 @@ -1 +1 @@
657 -python -u test.py boundaries
658 +python3 -u test.py boundaries
659 diff --git a/test/boundaries/boundaries.sh b/test/boundaries/boundaries.sh
660 index af41c90..a3b4a6b 100644
661 --- a/test/boundaries/boundaries.sh
662 +++ b/test/boundaries/boundaries.sh
663 @@ -27,17 +27,17 @@ for v in U V; do
664 done
665 done
666
667 -if cat <<EOF | python > convergence.tex; then :
668 +if cat <<EOF | python3 > convergence.tex; then :
669 from check import *
670 from sys import *
671 from math import *
672
673 for component,variable in [('x','U'),('y','V')]:
674 - print r"""\begin{table}[htbp]
675 + print(r"""\begin{table}[htbp])
676 \caption{"""
677 - print r"\label{boundaries-" + component + "}"
678 - print r"Errors and convergence rates for the \$"+component+r"\$-component of the velocity.}"
679 - print r"""\begin{center}
680 + print(r"\label{boundaries-" + component + "}")
681 + print(r"Errors and convergence rates for the \$"+component+r"\$-component of the velocity.}" )
682 + print(r"""\begin{center})
683 \begin{tabular}{||l|c|c|c||c|c|c||} \hline
684 & \multicolumn{3}{c||}{All cells} & \multicolumn{3}{c||}{Full 128 cells} \\\ \hline
685 & 128-256 & Rate & 256-512 & 128-256 & Rate & 256-512 \\\ \hline"""
686 @@ -45,21 +45,21 @@ for component,variable in [('x','U'),('y','V')]:
687 for i,name in [(2,r"\$L_1\$"),(3,r"\$L_2\$"),(4,r"\$L_\infty\$")]:
688 a=Curve('order'+variable,1,i)
689 b=Curve('orderf'+variable,1,i)
690 - print name,
691 - print "& %.2e & %4.2f & %.2e & %.2e & %4.2f & %.2e" % (\
692 + print(name,)
693 + print("& %.2e & %4.2f & %.2e & %.2e & %4.2f & %.2e" % (\)
694 a.l[0][1], log(a.l[0][1]/a.l[1][1])/log(2.), a.l[1][1], \
695 b.l[0][1], log(b.l[0][1]/b.l[1][1])/log(2.), b.l[1][1]),
696 - print r"\\\"
697 + print(r"\\\")
698
699 a=Curve('order'+variable+'.ref',1,i)
700 b=Curve('orderf'+variable+'.ref',1,i)
701 - print "& {\color{blue}%.2e} & {\color{blue}%4.2f} & {\color{blue}%.2e} & {\color{blue}%.2e} & {\color{blue}%4.2f} & {\color{blue}%.2e}" % (\
702 + print("& {\color{blue}%.2e} & {\color{blue}%4.2f} & {\color{blue}%.2e} & {\color{blue}%.2e} & {\color{blue}%4.2f} & {\color{blue}%.2e}" % (\)
703 a.l[0][1], log(a.l[0][1]/a.l[1][1])/log(2.), a.l[1][1], \
704 b.l[0][1], log(b.l[0][1]/b.l[1][1])/log(2.), b.l[1][1]),
705 - print r"\\\"
706 + print(r"\\\")
707
708 - print r"\hline"
709 - print r"""\end{tabular}
710 + print(r"\hline")
711 + print(r"""\end{tabular})
712 \end{center}
713 \end{table}"""
714 EOF
715 @@ -67,7 +67,7 @@ else
716 exit 1
717 fi
718
719 -if cat <<EOF | python ; then :
720 +if cat <<EOF | python3 ; then :
721 from check import *
722 from sys import *
723
724 diff --git a/test/bump.sh b/test/bump.sh
725 index f4e4da4..9a173f2 100755
726 --- a/test/bump.sh
727 +++ b/test/bump.sh
728 @@ -1 +1 @@
729 -python -u test.py bump
730 +python3 -u test.py bump
731 diff --git a/test/bump/bump.sh b/test/bump/bump.sh
732 index 1944c48..ecc908b 100644
733 --- a/test/bump/bump.sh
734 +++ b/test/bump/bump.sh
735 @@ -79,18 +79,18 @@ else
736 exit 1
737 fi
738
739 -if cat <<EOF | python ; then :
740 +if cat <<EOF | python3 ; then :
741 from check import *
742 if (Curve('norms-explicit',3,7) - Curve('norms-explicit.ref',3,7)).max() > 1e-5 or \
743 (Curve('norms-explicit',3,9) - Curve('norms-explicit.ref',3,9)).max() > 1e-5 or \
744 (Curve('norms-implicit',3,7) - Curve('norms-implicit.ref',3,7)).max() > 1e-5 or \
745 (Curve('norms-implicit',3,9) - Curve('norms-implicit.ref',3,9)).max() > 1e-5:
746 - print (Curve('norms-explicit',3,7) - Curve('norms-explicit.ref',3,7)).max()
747 - print (Curve('norms-explicit',3,9) - Curve('norms-explicit.ref',3,9)).max()
748 - print (Curve('norms-explicit',3,7) - Curve('norms-explicit.ref',3,7)).max()
749 - print (Curve('norms-explicit',3,9) - Curve('norms-explicit.ref',3,9)).max()
750 - print (Curve('norms-implicit',3,7) - Curve('norms-implicit.ref',3,7)).max()
751 - print (Curve('norms-implicit',3,9) - Curve('norms-implicit.ref',3,9)).max()
752 + print((Curve('norms-explicit',3,7) - Curve('norms-explicit.ref',3,7)).max())
753 + print((Curve('norms-explicit',3,9) - Curve('norms-explicit.ref',3,9)).max())
754 + print((Curve('norms-explicit',3,7) - Curve('norms-explicit.ref',3,7)).max())
755 + print((Curve('norms-explicit',3,9) - Curve('norms-explicit.ref',3,9)).max())
756 + print((Curve('norms-implicit',3,7) - Curve('norms-implicit.ref',3,7)).max())
757 + print((Curve('norms-implicit',3,9) - Curve('norms-implicit.ref',3,9)).max())
758 exit(1)
759 EOF
760 else
761 diff --git a/test/capwave.sh b/test/capwave.sh
762 index a019a8b..a40ed43 100755
763 --- a/test/capwave.sh
764 +++ b/test/capwave.sh
765 @@ -1 +1 @@
766 -python -u test.py capwave
767 +python3 -u test.py capwave
768 diff --git a/test/capwave/capwave.sh b/test/capwave/capwave.sh
769 index 40ce243..7b7522b 100644
770 --- a/test/capwave/capwave.sh
771 +++ b/test/capwave/capwave.sh
772 @@ -63,7 +63,7 @@ EOF
773 fi
774 fi
775
776 -if cat <<EOF | python ; then :
777 +if cat <<EOF | python3 ; then :
778 from check import *
779 from sys import *
780 if (Curve('convergence',1,2) - Curve('convergence.ref',1,2)).max() > 1e-5:
781 diff --git a/test/channel.sh b/test/channel.sh
782 index 9ca746c..90f4aba 100755
783 --- a/test/channel.sh
784 +++ b/test/channel.sh
785 @@ -1 +1 @@
786 -python -u test.py channel
787 +python3 -u test.py channel
788 diff --git a/test/channel/channel.sh b/test/channel/channel.sh
789 index 61a7a13..f1e2734 100644
790 --- a/test/channel/channel.sh
791 +++ b/test/channel/channel.sh
792 @@ -28,17 +28,17 @@ for v in U V; do
793 done
794 done
795
796 -if cat <<EOF | python > convergence.tex; then :
797 +if cat <<EOF | python3 > convergence.tex; then :
798 from check import *
799 from sys import *
800 from math import *
801
802 for component,variable in [('x','U'),('y','V')]:
803 - print r"""\begin{table}[htbp]
804 + print(r"""\begin{table}[htbp])
805 \caption{"""
806 - print r"\label{channel-" + component + "}"
807 - print r"Errors and convergence rates for the \$"+component+r"\$-component of the velocity.}"
808 - print r"""\begin{center}
809 + print(r"\label{channel-" + component + "}")
810 + print(r"Errors and convergence rates for the \$"+component+r"\$-component of the velocity.}")
811 + print(r"""\begin{center})
812 \begin{tabular}{||l|c|c|c||c|c|c||} \hline
813 & \multicolumn{3}{c||}{All cells} & \multicolumn{3}{c||}{Full 128 cells} \\\ \hline
814 & 128-256 & Rate & 256-512 & 128-256 & Rate & 256-512 \\\ \hline"""
815 @@ -46,21 +46,21 @@ for component,variable in [('x','U'),('y','V')]:
816 for i,name in [(2,r"\$L_1\$"),(3,r"\$L_2\$"),(4,r"\$L_\infty\$")]:
817 a=Curve('order'+variable,1,i)
818 b=Curve('orderf'+variable,1,i)
819 - print name,
820 - print "& %.2e & %4.2f & %.2e & %.2e & %4.2f & %.2e" % (\
821 + print(name,)
822 + print("& %.2e & %4.2f & %.2e & %.2e & %4.2f & %.2e" % (\)
823 a.l[0][1], log(a.l[0][1]/a.l[1][1])/log(2.), a.l[1][1], \
824 b.l[0][1], log(b.l[0][1]/b.l[1][1])/log(2.), b.l[1][1]),
825 - print r"\\\"
826 + print(r"\\\")
827
828 a=Curve('order'+variable+'.ref',1,i)
829 b=Curve('orderf'+variable+'.ref',1,i)
830 - print "& {\color{blue}%.2e} & {\color{blue}%4.2f} & {\color{blue}%.2e} & {\color{blue}%.2e} & {\color{blue}%4.2f} & {\color{blue}%.2e}" % (\
831 + print("& {\color{blue}%.2e} & {\color{blue}%4.2f} & {\color{blue}%.2e} & {\color{blue}%.2e} & {\color{blue}%4.2f} & {\color{blue}%.2e}" % (\)
832 a.l[0][1], log(a.l[0][1]/a.l[1][1])/log(2.), a.l[1][1], \
833 b.l[0][1], log(b.l[0][1]/b.l[1][1])/log(2.), b.l[1][1]),
834 - print r"\\\"
835 + print(r"\\\")
836
837 - print r"\hline"
838 - print r"""\end{tabular}
839 + print(r"\hline")
840 + print(r"""\end{tabular})
841 \end{center}
842 \end{table}"""
843 EOF
844 @@ -68,7 +68,7 @@ else
845 exit 1
846 fi
847
848 -if cat <<EOF | python ; then :
849 +if cat <<EOF | python3 ; then :
850 from check import *
851 from sys import *
852
853 diff --git a/test/check.py b/test/check.py
854 index 79a5cbd..255c6c5 100644
855 --- a/test/check.py
856 +++ b/test/check.py
857 @@ -66,4 +66,4 @@ class Curve:
858 return self.max(lambda x: abs(x))
859 def write(self):
860 for p in self.l:
861 - print p[0],p[1]
862 + print(p[0],p[1])
863 diff --git a/test/circle.sh b/test/circle.sh
864 index c48cb75..95603a2 100755
865 --- a/test/circle.sh
866 +++ b/test/circle.sh
867 @@ -1 +1 @@
868 -python -u test.py circle
869 +python3 -u test.py circle
870 diff --git a/test/circle/circle.sh b/test/circle/circle.sh
871 index 633f6fd..7137521 100644
872 --- a/test/circle/circle.sh
873 +++ b/test/circle/circle.sh
874 @@ -103,17 +103,17 @@ else
875 exit 1
876 fi
877
878 -if cat <<EOF | python ; then :
879 +if cat <<EOF | python3 ; then :
880 from check import *
881 from sys import *
882 if (Curve('res-7-gerris',1,3) - Curve('res-7.ref',1,3)).max() > 1e-8 or\
883 (Curve('res-7-hypre',1,3) - Curve('res-7.ref',1,7)).max() > 1e-8 or\
884 (Curve('error-gerris',1,4) - Curve('error.ref',1,4)).max() > 1e-6 or\
885 (Curve('error-hypre',1,4) - Curve('error.ref',1,8)).max() > 1e-6:
886 - print (Curve('res-7-gerris',1,3) - Curve('res-7.ref',1,3)).max()
887 - print (Curve('res-7-hypre',1,3) - Curve('res-7.ref',1,7)).max()
888 - print (Curve('error-gerris',1,4) - Curve('error.ref',1,4)).max()
889 - print (Curve('error-hypre',1,4) - Curve('error.ref',1,8)).max()
890 + print((Curve('res-7-gerris',1,3) - Curve('res-7.ref',1,3)).max())
891 + print((Curve('res-7-hypre',1,3) - Curve('res-7.ref',1,7)).max())
892 + print((Curve('error-gerris',1,4) - Curve('error.ref',1,4)).max())
893 + print((Curve('error-hypre',1,4) - Curve('error.ref',1,8)).max())
894 exit(1)
895 EOF
896 else
897 diff --git a/test/conservation.sh b/test/conservation.sh
898 index ddc548c..8b5092c 100755
899 --- a/test/conservation.sh
900 +++ b/test/conservation.sh
901 @@ -1 +1 @@
902 -python -u test.py conservation
903 +python3 -u test.py conservation
904 diff --git a/test/coriolis.sh b/test/coriolis.sh
905 index 8289e14..0e425bb 100755
906 --- a/test/coriolis.sh
907 +++ b/test/coriolis.sh
908 @@ -1 +1 @@
909 -python -u test.py coriolis
910 +python3 -u test.py coriolis
911 diff --git a/test/coriolis/coriolis.sh b/test/coriolis/coriolis.sh
912 index 2a9f4a3..d56adf0 100644
913 --- a/test/coriolis/coriolis.sh
914 +++ b/test/coriolis/coriolis.sh
915 @@ -40,7 +40,7 @@ else
916 exit 1
917 fi
918
919 -if cat <<EOF | python ; then :
920 +if cat <<EOF | python3 ; then :
921 from check import *
922 from sys import *
923 if (Curve('error.dat',1,2)).max() > 1e-6:
924 diff --git a/test/cosine.sh b/test/cosine.sh
925 index c96658c..64576ea 100755
926 --- a/test/cosine.sh
927 +++ b/test/cosine.sh
928 @@ -1 +1 @@
929 -python -u test.py cosine
930 +python3 -u test.py cosine
931 diff --git a/test/cosine/cosine.sh b/test/cosine/cosine.sh
932 index 06c9a9f..44529d8 100644
933 --- a/test/cosine/cosine.sh
934 +++ b/test/cosine/cosine.sh
935 @@ -53,14 +53,14 @@ EOF
936 fi
937 done
938
939 -if cat <<EOF | python ; then :
940 +if cat <<EOF | python3 ; then :
941 from check import *
942 from sys import *
943 c = Curve()
944 -print (Curve('error-45',1,4) - Curve('error-45.ref',1,4)).max()
945 -print (Curve('error-45',1,5) - Curve('error-45.ref',1,5)).max()
946 -print (Curve('error-90',1,4) - Curve('error-90.ref',1,4)).max()
947 -print (Curve('error-90',1,5) - Curve('error-90.ref',1,5)).max()
948 +print((Curve('error-45',1,4) - Curve('error-45.ref',1,4)).max())
949 +print((Curve('error-45',1,5) - Curve('error-45.ref',1,5)).max())
950 +print((Curve('error-90',1,4) - Curve('error-90.ref',1,4)).max())
951 +print((Curve('error-90',1,5) - Curve('error-90.ref',1,5)).max() )
952 if (Curve('error-45',1,4) - Curve('error-45.ref',1,4)).max() > 1e-10 or\
953 (Curve('error-45',1,5) - Curve('error-45.ref',1,5)).max() > 1e-10 or\
954 (Curve('error-90',1,4) - Curve('error-90.ref',1,4)).max() > 1e-10 or\
955 diff --git a/test/couette.sh b/test/couette.sh
956 index a225c21..6875ef2 100755
957 --- a/test/couette.sh
958 +++ b/test/couette.sh
959 @@ -1 +1 @@
960 -python -u test.py couette
961 +python3 -u test.py couette
962 diff --git a/test/couette/couette.sh b/test/couette/couette.sh
963 index da152fd..6d274e1 100644
964 --- a/test/couette/couette.sh
965 +++ b/test/couette/couette.sh
966 @@ -24,13 +24,13 @@ else
967 exit 1
968 fi
969
970 -if cat <<EOF | python ; then :
971 +if cat <<EOF | python3 ; then :
972 from check import *
973 from sys import *
974 -print (Curve('prof-0',1,2) - Curve('prof-0.ref',1,2)).norm2(),\
975 +print((Curve('prof-0',1,2) - Curve('prof-0.ref',1,2)).norm2(),\
976 (Curve('prof-1',1,2) - Curve('prof-1.ref',1,2)).norm2(),\
977 (Curve('prof-2',1,2) - Curve('prof-2.ref',1,2)).norm2(),\
978 - (Curve('prof-3',1,2) - Curve('prof-3.ref',1,2)).norm2()
979 + (Curve('prof-3',1,2) - Curve('prof-3.ref',1,2)).norm2())
980 if (Curve('prof-0',1,2) - Curve('prof-0.ref',1,2)).norm2() > 3.6e-4 or \
981 (Curve('prof-1',1,2) - Curve('prof-1.ref',1,2)).norm2() > 6.3e-4 or \
982 (Curve('prof-2',1,2) - Curve('prof-2.ref',1,2)).norm2() > 21e-4 or \
983 diff --git a/test/cylinder.sh b/test/cylinder.sh
984 index 73135b6..c0390c4 100755
985 --- a/test/cylinder.sh
986 +++ b/test/cylinder.sh
987 @@ -1 +1 @@
988 -python -u test.py cylinder
989 +python3 -u test.py cylinder
990 diff --git a/test/cylinder/cylinder.sh b/test/cylinder/cylinder.sh
991 index e51c5a2..e0df96e 100644
992 --- a/test/cylinder/cylinder.sh
993 +++ b/test/cylinder/cylinder.sh
994 @@ -83,12 +83,12 @@ for level in 6 7 8; do
995 done
996
997 # check error norms
998 -if cat <<EOF | python ; then :
999 +if cat <<EOF | python3 ; then :
1000 from check import *
1001 if (Curve('norms',1,8) - Curve('norms.ref',1,8)).max() > 1e-5 or \
1002 (Curve('norms',1,10) - Curve('norms.ref',1,10)).max() > 1e-5:
1003 - print (Curve('norms',1,8) - Curve('norms.ref',1,8)).max()
1004 - print (Curve('norms',1,10) - Curve('norms.ref',1,10)).max()
1005 + print((Curve('norms',1,8) - Curve('norms.ref',1,8)).max())
1006 + print((Curve('norms',1,10) - Curve('norms.ref',1,10)).max())
1007 exit(1)
1008 EOF
1009 else
1010 diff --git a/test/debye.sh b/test/debye.sh
1011 index 831ec66..4ccc545 100755
1012 --- a/test/debye.sh
1013 +++ b/test/debye.sh
1014 @@ -1 +1 @@
1015 -python -u test.py debye
1016 +python3 -u test.py debye
1017 diff --git a/test/debye/debye.sh b/test/debye/debye.sh
1018 index 27f2172..c659aab 100644
1019 --- a/test/debye/debye.sh
1020 +++ b/test/debye/debye.sh
1021 @@ -21,12 +21,12 @@ else
1022 exit 1
1023 fi
1024
1025 -if python <<EOF ; then :
1026 +if python3 <<EOF ; then :
1027 from check import *
1028 from sys import *
1029 -print (Curve('profile',1,2) - Curve('analytical',1,2)).normi()
1030 -print (Curve('profile',1,3) - Curve('analytical',1,3)).normi()
1031 -print (Curve('profile',1,4) - Curve('analytical',1,4)).normi()
1032 +print((Curve('profile',1,2) - Curve('analytical',1,2)).normi())
1033 +print((Curve('profile',1,3) - Curve('analytical',1,3)).normi())
1034 +print((Curve('profile',1,4) - Curve('analytical',1,4)).normi())
1035 if (Curve('profile',1,2) - Curve('analytical',1,2)).normi() > 1.6e-3 or \
1036 (Curve('profile',1,3) - Curve('analytical',1,3)).normi() > 6.9e-3 or \
1037 (Curve('profile',1,4) - Curve('analytical',1,4)).normi() > 6.77e-3:
1038 diff --git a/test/depend.py b/test/depend.py
1039 index fc2eeb6..f2b3b73 100644
1040 --- a/test/depend.py
1041 +++ b/test/depend.py
1042 @@ -1,4 +1,4 @@
1043 -#!/usr/bin/python
1044 +#!/usr/bin/python3
1045
1046 import sys
1047 import os
1048 @@ -6,8 +6,8 @@ import os.path
1049 sys.path.append("../doc/examples")
1050 import gfs2tex
1051
1052 -print "## File generated automatically by depend.py: do not modify by hand"
1053 -print ""
1054 +print("## File generated automatically by depend.py: do not modify by hand")
1055 +print()
1056
1057 dists = ""
1058 depends = ""
1059 @@ -20,9 +20,9 @@ for start in sys.argv[1:]:
1060 reps += " " + start
1061 logs += "\\\n\t" + start + ".log"
1062 f = open(start + ".sh", "w")
1063 - f.write("python -u test.py " + start + "\n")
1064 + f.write("python3 -u test.py " + start + "\n")
1065 f.close()
1066 - os.chmod(start + ".sh",0755)
1067 + os.chmod(start + ".sh",0o755)
1068 for root, dirs, files in os.walk(start,topdown=True):
1069 if not ".xvpics" in root:
1070 test = gfs2tex.Example(root)
1071 @@ -38,15 +38,22 @@ for start in sys.argv[1:]:
1072 if f[-4:] == ".mpg" or f[-4:] == ".ogv" or f[-4:] == ".png" or f[-4:] == ".mp4":
1073 docs += "\\\n\t" + test.path + "/" + f
1074
1075 -print "DOCS = " + docs + dists
1076 -print ""
1077 -print "TESTS = " + tests + "\\\n\tsummary.sh"
1078 -os.chmod("summary.sh",0755)
1079 -print ""
1080 -print "EXTRA_DIST += $(TESTS)" + dists
1081 -print ""
1082 -print "TESTS_ENVIRONMENT = TESTS=\"" + reps + "\""
1083 -print "TEST_EXTENSIONS = .sh"
1084 -print "summary.log:" + logs
1085 -print ""
1086 -print "tests.tex: " + depends
1087 +print("DOCS = " + docs + dists)
1088 +print()
1089 +print("TESTS = " + tests + "\\\n\tsummary.sh")
1090 +os.chmod("summary.sh",0o755)
1091 +print()
1092 +print("EXTRA_DIST += $(TESTS)" + dists)
1093 +print()
1094 +print("TESTS_ENVIRONMENT = TESTS=\"" + reps + "\"")
1095 +print("TEST_EXTENSIONS = .sh")
1096 +print("summary.log:" + logs)
1097 +print()
1098 +print("TESTS = " + tests + "\\\n\tsummary.sh")
1099 +os.chmod("summary.sh",0o755)
1100 +print()
1101 +print("TESTS_ENVIRONMENT = TESTS=\"" + reps + "\"")
1102 +print("TEST_EXTENSIONS = .sh")
1103 +print("summary.log:" + logs)
1104 +print()
1105 +print("tests.tex: " + depends)
1106 diff --git a/test/diffusion.sh b/test/diffusion.sh
1107 index 11cb2fb..8e97b16 100755
1108 --- a/test/diffusion.sh
1109 +++ b/test/diffusion.sh
1110 @@ -1 +1 @@
1111 -python -u test.py diffusion
1112 +python3 -u test.py diffusion
1113 diff --git a/test/dumbell.sh b/test/dumbell.sh
1114 index 2da627c..1b43054 100755
1115 --- a/test/dumbell.sh
1116 +++ b/test/dumbell.sh
1117 @@ -1 +1 @@
1118 -python -u test.py dumbell
1119 +python3 -u test.py dumbell
1120 diff --git a/test/electro.sh b/test/electro.sh
1121 index d2ef706..e486b1f 100755
1122 --- a/test/electro.sh
1123 +++ b/test/electro.sh
1124 @@ -1 +1 @@
1125 -python -u test.py electro
1126 +python3 -u test.py electro
1127 diff --git a/test/electro/electro.sh b/test/electro/electro.sh
1128 index 51e6dec..8896e02 100644
1129 --- a/test/electro/electro.sh
1130 +++ b/test/electro/electro.sh
1131 @@ -54,13 +54,13 @@ else
1132 exit 1
1133 fi
1134
1135 -if cat <<EOF | python ; then :
1136 +if cat <<EOF | python3 ; then :
1137 from check import *
1138 from sys import *
1139 c = Curve()
1140 -print (Curve('convergence',1,2) - Curve('convergence.ref',1,2)).max()
1141 -print (Curve('convergence',1,3) - Curve('convergence.ref',1,3)).max()
1142 -print Curve('rhoe',3,5).max()
1143 +print((Curve('convergence',1,2) - Curve('convergence.ref',1,2)).max())
1144 +print((Curve('convergence',1,3) - Curve('convergence.ref',1,3)).max())
1145 +print(Curve('rhoe',3,5).max())
1146 if (Curve('convergence',1,2) - Curve('convergence.ref',1,2)).max() > 1e-6 or\
1147 (Curve('convergence',1,3) - Curve('convergence.ref',1,3)).max() > 1e-6 or\
1148 Curve('rhoe',3,5).max() > 1e-9:
1149 diff --git a/test/gaussian.sh b/test/gaussian.sh
1150 index ff6a889..46e74ca 100755
1151 --- a/test/gaussian.sh
1152 +++ b/test/gaussian.sh
1153 @@ -1 +1 @@
1154 -python -u test.py gaussian
1155 +python3 -u test.py gaussian
1156 diff --git a/test/gaussian/gaussian.sh b/test/gaussian/gaussian.sh
1157 index 5ae6cd5..07b3820 100644
1158 --- a/test/gaussian/gaussian.sh
1159 +++ b/test/gaussian/gaussian.sh
1160 @@ -11,16 +11,16 @@ else
1161 exit 1
1162 fi
1163
1164 -if cat <<EOF | python ; then :
1165 +if cat <<EOF | python3 ; then :
1166 from check import *
1167 from sys import *
1168 avg = (Curve('prof.ref',1,2) - Curve('prof.dat',3,5)).mean()
1169 -print avg
1170 +print(avg)
1171 c = Curve()
1172 for p in Curve('prof.dat',3,5).l:
1173 c.l.append((p[0], p[1] + avg))
1174 if (Curve('prof.ref',1,2) - c).normi() > $emax:
1175 - print (Curve('prof.ref',1,2) - c).normi()
1176 + print((Curve('prof.ref',1,2) - c).normi())
1177 exit(1)
1178 EOF
1179 else
1180 diff --git a/test/geo.sh b/test/geo.sh
1181 index 4816ef5..312d30b 100755
1182 --- a/test/geo.sh
1183 +++ b/test/geo.sh
1184 @@ -1 +1 @@
1185 -python -u test.py geo
1186 +python3 -u test.py geo
1187 diff --git a/test/geo/beta/beta.sh b/test/geo/beta/beta.sh
1188 index a62c8e6..25c5195 100644
1189 --- a/test/geo/beta/beta.sh
1190 +++ b/test/geo/beta/beta.sh
1191 @@ -23,7 +23,7 @@ else
1192 exit 1
1193 fi
1194
1195 -if cat <<EOF | python ; then :
1196 +if cat <<EOF | python3 ; then :
1197 from check import *
1198 from sys import *
1199 if Curve('energy',1,2).max() > 1. or \
1200 diff --git a/test/geo/geo.sh b/test/geo/geo.sh
1201 index e3f6f65..43309d2 100644
1202 --- a/test/geo/geo.sh
1203 +++ b/test/geo/geo.sh
1204 @@ -5,7 +5,7 @@ if test x$donotrun != xtrue; then
1205 gerris3D $1
1206 fi
1207
1208 -python <<EOF
1209 +python3 <<EOF
1210 from check import *
1211 from sys import *
1212 if (Curve('e',1,2) - Curve('e.ref',1,2)).max() > 1e-3:
1213 diff --git a/test/geo/river/geo.sh b/test/geo/river/geo.sh
1214 index 6c01c3f..6cda3bf 100644
1215 --- a/test/geo/river/geo.sh
1216 +++ b/test/geo/river/geo.sh
1217 @@ -5,7 +5,7 @@ if test x$donotrun != xtrue; then
1218 gerris2D $1
1219 fi
1220
1221 -python <<EOF
1222 +python3 <<EOF
1223 from check import *
1224 from sys import *
1225 if (Curve('e',1,2) - Curve('e.ref',1,2)).max() > 1e-3:
1226 diff --git a/test/gfs2tex b/test/gfs2tex
1227 index 0cb556c..d377e9a 100644
1228 --- a/test/gfs2tex
1229 +++ b/test/gfs2tex
1230 @@ -1,4 +1,4 @@
1231 -#!/usr/bin/python
1232 +#!/usr/bin/python3
1233
1234 import sys
1235 import os
1236 diff --git a/test/groundwater.sh b/test/groundwater.sh
1237 index bded8f1..89b0d59 100755
1238 --- a/test/groundwater.sh
1239 +++ b/test/groundwater.sh
1240 @@ -1 +1 @@
1241 -python -u test.py groundwater
1242 +python3 -u test.py groundwater
1243 diff --git a/test/groundwater/groundwater.sh b/test/groundwater/groundwater.sh
1244 index 150d8e4..7cbcd99 100644
1245 --- a/test/groundwater/groundwater.sh
1246 +++ b/test/groundwater/groundwater.sh
1247 @@ -36,17 +36,17 @@ else
1248 exit 1
1249 fi
1250
1251 -if cat <<EOF | python ; then :
1252 +if cat <<EOF | python3 ; then :
1253 from check import *
1254 from sys import *
1255 if (Curve('p',1,2) - Curve('p.ref',1,2)).max() > 1e-8 or\
1256 (Curve('p',1,3) - Curve('p.ref',1,3)).max() > 1e-6:
1257 - print (Curve('p',1,2) - Curve('p.ref',1,2)).max()
1258 - print (Curve('p',1,3) - Curve('p.ref',1,3)).max()
1259 + print((Curve('p',1,2) - Curve('p.ref',1,2)).max())
1260 + print((Curve('p',1,3) - Curve('p.ref',1,3)).max())
1261 exit(1)
1262 if (Curve('U',1,2) - Curve('U.ref',1,2)).max() > 1e-8 or\
1263 (Curve('U',1,3) - Curve('U.ref',1,3)).max() > 1e-6:
1264 - print (Curve('U',1,2) - Curve('U.ref',1,2)).max()
1265 + print((Curve('U',1,2) - Curve('U.ref',1,2)).max())
1266 exit(1)
1267 EOF
1268 else
1269 diff --git a/test/harmonic.sh b/test/harmonic.sh
1270 index 37ba82d..f1cd20c 100755
1271 --- a/test/harmonic.sh
1272 +++ b/test/harmonic.sh
1273 @@ -1 +1 @@
1274 -python -u test.py harmonic
1275 +python3 -u test.py harmonic
1276 diff --git a/test/harmonic/harmonic.sh b/test/harmonic/harmonic.sh
1277 index 460110e..6ffaac6 100644
1278 --- a/test/harmonic/harmonic.sh
1279 +++ b/test/harmonic/harmonic.sh
1280 @@ -93,13 +93,13 @@ else
1281 exit 1
1282 fi
1283
1284 -if cat <<EOF | python ; then :
1285 +if cat <<EOF | python3 ; then :
1286 from check import *
1287 from sys import *
1288 if (Curve('res-7-gerris',1,3) - Curve('res-7.ref',1,3)).max() > 1e-8 or\
1289 (Curve('error-gerris',1,4) - Curve('error.ref',1,4)).max() > 1e-6:
1290 - print (Curve('res-7-gerris',1,3) - Curve('res-7.ref',1,3)).max()
1291 - print (Curve('error-gerris',1,4) - Curve('error.ref',1,4)).max()
1292 + print((Curve('res-7-gerris',1,3) - Curve('res-7.ref',1,3)).max())
1293 + print((Curve('error-gerris',1,4) - Curve('error.ref',1,4)).max())
1294 exit(1)
1295 EOF
1296 else
1297 diff --git a/test/height.sh b/test/height.sh
1298 index 61dad9a..ddb3454 100755
1299 --- a/test/height.sh
1300 +++ b/test/height.sh
1301 @@ -1 +1 @@
1302 -python -u test.py height
1303 +python3 -u test.py height
1304 diff --git a/test/hexagon.sh b/test/hexagon.sh
1305 index 9274830..cde0298 100755
1306 --- a/test/hexagon.sh
1307 +++ b/test/hexagon.sh
1308 @@ -1 +1 @@
1309 -python -u test.py hexagon
1310 +python3 -u test.py hexagon
1311 diff --git a/test/hexagon/hexagon.sh b/test/hexagon/hexagon.sh
1312 index 931eab9..cd08c01 100644
1313 --- a/test/hexagon/hexagon.sh
1314 +++ b/test/hexagon/hexagon.sh
1315 @@ -27,7 +27,7 @@ else
1316 exit 1
1317 fi
1318
1319 -if cat <<EOF | python ; then :
1320 +if cat <<EOF | python3 ; then :
1321 from check import *
1322 from sys import *
1323 if Curve('tracersum-1',1,2).normi() > 1e-6 or \
1324 diff --git a/test/hydrostatic.sh b/test/hydrostatic.sh
1325 index d391cdc..b409b7c 100755
1326 --- a/test/hydrostatic.sh
1327 +++ b/test/hydrostatic.sh
1328 @@ -1 +1 @@
1329 -python -u test.py hydrostatic
1330 +python3 -u test.py hydrostatic
1331 diff --git a/test/injectionaxi.sh b/test/injectionaxi.sh
1332 index baa980e..ccc88d1 100755
1333 --- a/test/injectionaxi.sh
1334 +++ b/test/injectionaxi.sh
1335 @@ -1 +1 @@
1336 -python -u test.py injectionaxi
1337 +python3 -u test.py injectionaxi
1338 diff --git a/test/kinetic.sh b/test/kinetic.sh
1339 index da1266e..1093396 100755
1340 --- a/test/kinetic.sh
1341 +++ b/test/kinetic.sh
1342 @@ -1 +1 @@
1343 -python -u test.py kinetic
1344 +python3 -u test.py kinetic
1345 diff --git a/test/lake.sh b/test/lake.sh
1346 index d381ef4..15b31ad 100755
1347 --- a/test/lake.sh
1348 +++ b/test/lake.sh
1349 @@ -1 +1 @@
1350 -python -u test.py lake
1351 +python3 -u test.py lake
1352 diff --git a/test/lake/river/river.sh b/test/lake/river/river.sh
1353 index 89b4950..3514843 100644
1354 --- a/test/lake/river/river.sh
1355 +++ b/test/lake/river/river.sh
1356 @@ -47,11 +47,11 @@ else
1357 exit 1
1358 fi
1359
1360 -if python <<EOF ; then :
1361 +if python3 <<EOF ; then :
1362 from check import *
1363 from sys import *
1364 if (Curve('error',1,2) - Curve('error.ref',1,2)).max() > 1e-6:
1365 - print (Curve('error',1,2) - Curve('error.ref',1,2)).max()
1366 + print((Curve('error',1,2) - Curve('error.ref',1,2)).max())
1367 exit(1)
1368 EOF
1369 else
1370 diff --git a/test/lake/stratified/stratified.sh b/test/lake/stratified/stratified.sh
1371 index 5504afb..a0cb2363 100644
1372 --- a/test/lake/stratified/stratified.sh
1373 +++ b/test/lake/stratified/stratified.sh
1374 @@ -82,11 +82,11 @@ else
1375 exit 1
1376 fi
1377
1378 -if python <<EOF ; then :
1379 +if python3 <<EOF ; then :
1380 from check import *
1381 from sys import *
1382 if (Curve('error',1,2) - Curve('error.ref',1,2)).max() > 1e-6:
1383 - print (Curve('error',1,2) - Curve('error.ref',1,2)).max()
1384 + print((Curve('error',1,2) - Curve('error.ref',1,2)).max())
1385 exit(1)
1386 EOF
1387 else
1388 diff --git a/test/lid.sh b/test/lid.sh
1389 index 2f396f4..df8527d 100755
1390 --- a/test/lid.sh
1391 +++ b/test/lid.sh
1392 @@ -1 +1 @@
1393 -python -u test.py lid
1394 +python3 -u test.py lid
1395 diff --git a/test/lid/explicit/lid.sh b/test/lid/explicit/lid.sh
1396 index 4ebb337..8c256d4 100644
1397 --- a/test/lid/explicit/lid.sh
1398 +++ b/test/lid/explicit/lid.sh
1399 @@ -5,11 +5,11 @@ if test x$donotrun != xtrue; then
1400 fi
1401 fi
1402
1403 -if cat <<EOF | python ; then :
1404 +if cat <<EOF | python3 ; then :
1405 from check import *
1406 from sys import *
1407 -print (Curve('xprof',3,7) - Curve('../xprof.ghia',1,2)).normi()
1408 -print (Curve('yprof',2,8) - Curve('../yprof.ghia',1,2)).normi()
1409 +print((Curve('xprof',3,7) - Curve('../xprof.ghia',1,2)).normi())
1410 +print((Curve('yprof',2,8) - Curve('../yprof.ghia',1,2)).normi())
1411 if (Curve('xprof',3,7) - Curve('../xprof.ghia',1,2)).normi() > 2.2e-2 or \
1412 (Curve('yprof',2,8) - Curve('../yprof.ghia',1,2)).normi() > 2.1e-2:
1413 exit(1)
1414 diff --git a/test/lid/lid.sh b/test/lid/lid.sh
1415 index 6665fc0..8127cce 100644
1416 --- a/test/lid/lid.sh
1417 +++ b/test/lid/lid.sh
1418 @@ -5,13 +5,13 @@ if test x$donotrun != xtrue; then
1419 fi
1420 fi
1421
1422 -if python <<EOF ; then :
1423 +if python3 <<EOF ; then :
1424 from check import *
1425 from sys import *
1426 if (Curve('xprof',3,7) - Curve('xprof.ghia',1,2)).normi() > 2e-2 or \
1427 (Curve('yprof',2,8) - Curve('yprof.ghia',1,2)).normi() > 1.7e-2:
1428 - print (Curve('xprof',3,7) - Curve('xprof.ghia',1,2)).normi()
1429 - print (Curve('yprof',2,8) - Curve('yprof.ghia',1,2)).normi()
1430 + print((Curve('xprof',3,7) - Curve('xprof.ghia',1,2)).normi())
1431 + print((Curve('yprof',2,8) - Curve('yprof.ghia',1,2)).normi())
1432 exit(1)
1433 EOF
1434 else
1435 diff --git a/test/lonlat.sh b/test/lonlat.sh
1436 index 4c677a8..bb229a9 100755
1437 --- a/test/lonlat.sh
1438 +++ b/test/lonlat.sh
1439 @@ -1 +1 @@
1440 -python -u test.py lonlat
1441 +python3 -u test.py lonlat
1442 diff --git a/test/merging.sh b/test/merging.sh
1443 index 0d36185..67383d2 100755
1444 --- a/test/merging.sh
1445 +++ b/test/merging.sh
1446 @@ -1 +1 @@
1447 -python -u test.py merging
1448 +python3 -u test.py merging
1449 diff --git a/test/merging/merging.sh b/test/merging/merging.sh
1450 index fb7a33c..044480c 100644
1451 --- a/test/merging/merging.sh
1452 +++ b/test/merging/merging.sh
1453 @@ -39,46 +39,46 @@ for s in sim simc; do
1454 done
1455 done
1456
1457 -if cat <<EOF | python > convergence.tex ; then :
1458 +if cat <<EOF | python3 > convergence.tex ; then :
1459 from check import *
1460 from sys import *
1461 from math import *
1462
1463 -print r"""\begin{tabular}{|c|c|c|c|c|c|}\hline
1464 +print(r"""\begin{tabular}{|c|c|c|c|c|c|}\hline)
1465 Domain & \multicolumn{5}{c|}{\$L_2\$}\\\ \hline
1466 & \$L=6\$ & \$O_2\$ & \$L=7\$ & \$O_2\$ & \$L=8\$ \\\ \hline"""
1467
1468 def order(r,color='black'):
1469 for i in range(0,len(r.l)-1):
1470 y0,y1 = r.l[i][1],r.l[i+1][1]
1471 - print '& {\color{%s}%.2e} & {\color{%s}%4.2f}' % (color, y0, color, log(y0/y1)/log(2.)),
1472 - print '& {\color{%s}%.2e}' % (color, r.l[i+1][1]), r'\\\'
1473 + print('& {\color{%s}%.2e} & {\color{%s}%4.2f}' % (color, y0, color, log(y0/y1)/log(2.)),)
1474 + print('& {\color{%s}%.2e}' % (color, r.l[i+1][1]), r'\\\')
1475
1476 -print 'Circle',
1477 +print('Circle', end=' ')
1478 order(Curve('simc.err',1,2))
1479 order(Curve('simc.err.ref',1,2), 'blue')
1480 -print 'Adaptive',
1481 +print('Adaptive', end=' ')
1482 order(Curve('sim.err',1,2))
1483 order(Curve('sim.err.ref',1,2), 'blue')
1484
1485 -print r"""\hline
1486 +print(r"""\hline)
1487 Domain & \multicolumn{5}{c|}{\$L_\infty\$} \\\ \hline
1488 & \$L=6\$ & \$O_\infty\$ & \$L=7\$ & \$O_\infty\$ & \$L=8\$ \\\ \hline"""
1489
1490 -print 'Circle',
1491 +print('Circle', end=' ')
1492 order(Curve('simc.err',1,3))
1493 order(Curve('simc.err.ref',1,3), 'blue')
1494 -print 'Adaptive',
1495 +print('Adaptive', end=' ')
1496 order(Curve('sim.err',1,3))
1497 order(Curve('sim.err.ref',1,3), 'blue')
1498
1499 -print r"\hline\end{tabular}"
1500 +print(r"\hline\end{tabular}")
1501 EOF
1502 else
1503 exit 1
1504 fi
1505
1506 -if cat <<EOF | python ; then :
1507 +if cat <<EOF | python3 ; then :
1508 from check import *
1509 from sys import *
1510 if (Curve('sim.err',1,2) - Curve('sim.err.ref',1,2)).max() > 1e-6 or\
1511 diff --git a/test/nonlinear.sh b/test/nonlinear.sh
1512 index 885b21d..a83a747 100755
1513 --- a/test/nonlinear.sh
1514 +++ b/test/nonlinear.sh
1515 @@ -1 +1 @@
1516 -python -u test.py nonlinear
1517 +python3 -u test.py nonlinear
1518 diff --git a/test/nonlinear/nonlinear.sh b/test/nonlinear/nonlinear.sh
1519 index a780760..f34eb1c 100644
1520 --- a/test/nonlinear/nonlinear.sh
1521 +++ b/test/nonlinear/nonlinear.sh
1522 @@ -31,14 +31,14 @@ EOF
1523 gfsview-batch3D end-ocean-$omega.gfs error-ocean.gfv
1524 done
1525
1526 -python <<EOF
1527 +python3 <<EOF
1528 from check import *
1529 from sys import *
1530 if (Curve('error-1',3,9) - Curve('error-1.ref',3,9)).max() > 1e-7 or\
1531 (Curve('error-river-1',3,9) - Curve('error-river-1.ref',3,9)).max() > 1e-7 or\
1532 (Curve('error-ocean-1',3,9) - Curve('error-ocean-1.ref',3,9)).max() > 1e-7:
1533 - print (Curve('error-1',3,9) - Curve('error-1.ref',3,9)).max()
1534 - print (Curve('error-river-1',3,9) - Curve('error-river-1.ref',3,9)).max()
1535 - print (Curve('error-ocean-1',3,9) - Curve('error-ocean-1.ref',3,9)).max()
1536 + print((Curve('error-1',3,9) - Curve('error-1.ref',3,9)).max())
1537 + print((Curve('error-river-1',3,9) - Curve('error-river-1.ref',3,9)).max())
1538 + print((Curve('error-ocean-1',3,9) - Curve('error-ocean-1.ref',3,9)).max())
1539 exit(1)
1540 EOF
1541 diff --git a/test/nz.sh b/test/nz.sh
1542 index 3985930..98c5c11 100755
1543 --- a/test/nz.sh
1544 +++ b/test/nz.sh
1545 @@ -1 +1 @@
1546 -python -u test.py nz
1547 +python3 -u test.py nz
1548 diff --git a/test/oscillation.sh b/test/oscillation.sh
1549 index 8093c42..7770ba8 100755
1550 --- a/test/oscillation.sh
1551 +++ b/test/oscillation.sh
1552 @@ -1 +1 @@
1553 -python -u test.py oscillation
1554 +python3 -u test.py oscillation
1555 diff --git a/test/oscillation/oscillation.sh b/test/oscillation/oscillation.sh
1556 index b3ed1f9..e31a2b4 100644
1557 --- a/test/oscillation/oscillation.sh
1558 +++ b/test/oscillation/oscillation.sh
1559 @@ -78,7 +78,7 @@ else
1560 exit 1
1561 fi
1562
1563 -if cat <<EOF | python ; then :
1564 +if cat <<EOF | python3 ; then :
1565 from check import *
1566 from sys import *
1567 if (Curve('fit',1,3) - Curve('fit.ref',1,3)).max() > 1e-2 or\
1568 diff --git a/test/parabola.sh b/test/parabola.sh
1569 index 0401115..597de43 100755
1570 --- a/test/parabola.sh
1571 +++ b/test/parabola.sh
1572 @@ -1 +1 @@
1573 -python -u test.py parabola
1574 +python3 -u test.py parabola
1575 diff --git a/test/parabola/parabola.sh b/test/parabola/parabola.sh
1576 index 950a42c..514f084 100644
1577 --- a/test/parabola/parabola.sh
1578 +++ b/test/parabola/parabola.sh
1579 @@ -128,11 +128,11 @@ else
1580 exit 1
1581 fi
1582
1583 -if cat <<EOF | python ; then :
1584 +if cat <<EOF | python3 ; then :
1585 from check import *
1586 from sys import *
1587 if (Curve('error',1,4) - Curve('error.ref',1,4)).max() > 1e-4:
1588 - print (Curve('error',1,4) - Curve('error.ref',1,4)).max()
1589 + print((Curve('error',1,4) - Curve('error.ref',1,4)).max())
1590 exit(1)
1591 EOF
1592 else
1593 diff --git a/test/periodic.sh b/test/periodic.sh
1594 index 3ab6981..22ca1e9 100755
1595 --- a/test/periodic.sh
1596 +++ b/test/periodic.sh
1597 @@ -1 +1 @@
1598 -python -u test.py periodic
1599 +python3 -u test.py periodic
1600 diff --git a/test/periodic/periodic.sh b/test/periodic/periodic.sh
1601 index 59e0531..20b6c22 100644
1602 --- a/test/periodic/periodic.sh
1603 +++ b/test/periodic/periodic.sh
1604 @@ -16,52 +16,52 @@ if test x$donotrun != xtrue; then
1605 done
1606 fi
1607
1608 -if cat <<EOF | python > minion1.tex; then :
1609 +if cat <<EOF | python3 > minion1.tex; then :
1610 from check import *
1611 from sys import *
1612 from math import *
1613
1614 -print r"""\begin{tabular}{|c|c|c|c|c|c|}\hline
1615 +print(r"""\begin{tabular}{|c|c|c|c|c|c|}\hline
1616 & \multicolumn{5}{c|}{\$L_2\$} \\\ \hline
1617 - & \$L=5\$ & \$O_2\$ & \$L=6\$ & \$O_2\$ & \$L=7\$ \\\ \hline"""
1618 + & \$L=5\$ & \$O_2\$ & \$L=6\$ & \$O_2\$ & \$L=7\$ \\\ \hline""")
1619
1620 def order(r,color='black'):
1621 for i in range(0,len(r.l)-1):
1622 y0,y1 = r.l[i][1],r.l[i+1][1]
1623 - print '& {\color{%s}%.2e} & {\color{%s}%4.2f}' % (color, y0, color, log(y0/y1)/log(2.)),
1624 - print '& {\color{%s}%.2e}' % (color, r.l[i+1][1]), r'\\\'
1625 + print('& {\color{%s}%.2e} & {\color{%s}%4.2f}' % (color, y0, color, log(y0/y1)/log(2.)),)
1626 + print('& {\color{%s}%.2e}' % (color, r.l[i+1][1]), r'\\\')
1627
1628 -print 'Uniform',
1629 +print('Uniform', end=' ')
1630 order(Curve('r0',1,2))
1631 order(Curve('r0.ref',1,2),'blue')
1632 -print '\$r=1\$',
1633 +print('\$r=1\$', end=' ')
1634 order(Curve('r1',1,2))
1635 order(Curve('r1.ref',1,2),'blue')
1636 -print '\$r=2\$',
1637 +print('\$r=2\$', end=' ')
1638 order(Curve('r2',1,2))
1639 order(Curve('r2.ref',1,2),'blue')
1640
1641 -print r"""\hline
1642 +print(r"""\hline)
1643 & \multicolumn{5}{c|}{\$L_\infty\$} \\\ \hline
1644 & \$L=5\$ & \$O_\infty\$ & \$L=6\$ & \$O_\infty\$ & \$L=7\$ \\\ \hline"""
1645
1646 -print 'Uniform',
1647 +print('Uniform', end=' ')
1648 order(Curve('r0',1,3))
1649 order(Curve('r0.ref',1,3),'blue')
1650 -print '\$r=1\$',
1651 +print('\$r=1\$', end=' ')
1652 order(Curve('r1',1,3))
1653 order(Curve('r1.ref',1,3),'blue')
1654 -print '\$r=2\$',
1655 +print('\$r=2\$', end=' ')
1656 order(Curve('r2',1,3))
1657 order(Curve('r2.ref',1,3),'blue')
1658
1659 -print r"\hline\end{tabular}"
1660 +print(r"\hline\end{tabular}")
1661 EOF
1662 else
1663 exit 1
1664 fi
1665
1666 -if cat <<EOF | python ; then :
1667 +if cat <<EOF | python3 ; then :
1668 from check import *
1669 from sys import *
1670 for r in ['r0','r1','r2']:
1671 diff --git a/test/planar.sh b/test/planar.sh
1672 index 5cb55e1..a324b44 100755
1673 --- a/test/planar.sh
1674 +++ b/test/planar.sh
1675 @@ -1 +1 @@
1676 -python -u test.py planar
1677 +python3 -u test.py planar
1678 diff --git a/test/plate.sh b/test/plate.sh
1679 index f51d3cb..ed6351e 100755
1680 --- a/test/plate.sh
1681 +++ b/test/plate.sh
1682 @@ -1 +1 @@
1683 -python -u test.py plate
1684 +python3 -u test.py plate
1685 diff --git a/test/plateau.sh b/test/plateau.sh
1686 index 1090cf1..8e81dc9 100755
1687 --- a/test/plateau.sh
1688 +++ b/test/plateau.sh
1689 @@ -1 +1 @@
1690 -python -u test.py plateau
1691 +python3 -u test.py plateau
1692 diff --git a/test/poiseuille.sh b/test/poiseuille.sh
1693 index 2f7a983..8486b65 100755
1694 --- a/test/poiseuille.sh
1695 +++ b/test/poiseuille.sh
1696 @@ -1 +1 @@
1697 -python -u test.py poiseuille
1698 +python3 -u test.py poiseuille
1699 diff --git a/test/poiseuille/poiseuille.sh b/test/poiseuille/poiseuille.sh
1700 index d4872e0..380468a 100644
1701 --- a/test/poiseuille/poiseuille.sh
1702 +++ b/test/poiseuille/poiseuille.sh
1703 @@ -31,7 +31,7 @@ else
1704 exit 1
1705 fi
1706
1707 -if cat <<EOF | python ; then :
1708 +if cat <<EOF | python3 ; then :
1709 from check import *
1710 from sys import *
1711 if (Curve('error',1,4) - Curve('error.ref',1,4)).max() > 1e-6:
1712 diff --git a/test/poiseuille/river/river.sh b/test/poiseuille/river/river.sh
1713 index 16d2e9b..5de1c7b 100644
1714 --- a/test/poiseuille/river/river.sh
1715 +++ b/test/poiseuille/river/river.sh
1716 @@ -28,7 +28,7 @@ else
1717 exit 1
1718 fi
1719
1720 -if cat <<EOF | python ; then :
1721 +if cat <<EOF | python3 ; then :
1722 from check import *
1723 from sys import *
1724 if (Curve('error',1,2) - Curve('error.ref',1,2)).max() > 1e-6:
1725 diff --git a/test/poisson.sh b/test/poisson.sh
1726 index 567c4fc..d035709 100755
1727 --- a/test/poisson.sh
1728 +++ b/test/poisson.sh
1729 @@ -1 +1 @@
1730 -python -u test.py poisson
1731 +python3 -u test.py poisson
1732 diff --git a/test/poisson/poisson.sh b/test/poisson/poisson.sh
1733 index 280f5a7..a4fc80c 100644
1734 --- a/test/poisson/poisson.sh
1735 +++ b/test/poisson/poisson.sh
1736 @@ -97,18 +97,18 @@ else
1737 exit 1
1738 fi
1739
1740 -if cat <<EOF | python ; then :
1741 +if cat <<EOF | python3 ; then :
1742 from check import *
1743 from sys import *
1744 if (Curve('res-7-gerris',1,3) - Curve('res-7.ref',1,3)).max() > 1e-8 or\
1745 (Curve('error-gerris',1,4) - Curve('error.ref',1,4)).max() > 1e-6:
1746 - print (Curve('res-7-gerris',1,3) - Curve('res-7.ref',1,3)).max()
1747 - print (Curve('error-gerris',1,4) - Curve('error.ref',1,4)).max()
1748 + print((Curve('res-7-gerris',1,3) - Curve('res-7.ref',1,3)).max())
1749 + print((Curve('error-gerris',1,4) - Curve('error.ref',1,4)).max())
1750 exit(1)
1751 if (Curve('res-7-hypre',1,3) - Curve('res-7.ref',1,7)).max() > 1e-8 or\
1752 (Curve('error-hypre',1,4) - Curve('error.ref',1,4)).max() > 1e-6:
1753 - print (Curve('res-7-hypre',1,3) - Curve('res-7.ref',1,7)).max()
1754 - print (Curve('error-hypre',1,4) - Curve('error.ref',1,4)).max()
1755 + print((Curve('res-7-hypre',1,3) - Curve('res-7.ref',1,7)).max())
1756 + print((Curve('error-hypre',1,4) - Curve('error.ref',1,4)).max())
1757 exit(1)
1758 EOF
1759 else
1760 diff --git a/test/reynolds.sh b/test/reynolds.sh
1761 index caf1bd8..54ce987 100755
1762 --- a/test/reynolds.sh
1763 +++ b/test/reynolds.sh
1764 @@ -1 +1 @@
1765 -python -u test.py reynolds
1766 +python3 -u test.py reynolds
1767 diff --git a/test/reynolds/reynolds.sh b/test/reynolds/reynolds.sh
1768 index 1855984..056f79b 100644
1769 --- a/test/reynolds/reynolds.sh
1770 +++ b/test/reynolds/reynolds.sh
1771 @@ -58,14 +58,14 @@ else
1772 exit 1
1773 fi
1774
1775 -if cat <<EOF | python ; then :
1776 +if cat <<EOF | python3 ; then :
1777 from check import *
1778 from sys import *
1779 for div in ['div5','div6','div7']:
1780 if (Curve(div,3,9) - Curve(div+'.ref',3,9)).max() > 0.01*Curve(div+'.ref',3,9).mean() or\
1781 (Curve(div,3,7) - Curve(div+'.ref',3,7)).max() > 0.01*Curve(div+'.ref',3,7).mean():
1782 - print (Curve(div,3,9) - Curve(div+'.ref',3,9)).max(), 0.01*Curve(div+'.ref',3,9).mean()
1783 - print (Curve(div,3,7) - Curve(div+'.ref',3,7)).max(), 0.01*Curve(div+'.ref',3,7).mean()
1784 + print((Curve(div,3,9) - Curve(div+'.ref',3,9)).max(), 0.01*Curve(div+'.ref',3,9).mean())
1785 + print((Curve(div,3,7) - Curve(div+'.ref',3,7)).max(), 0.01*Curve(div+'.ref',3,7).mean())
1786 exit(1)
1787 EOF
1788 else
1789 diff --git a/test/reynolds/skew/skew.sh b/test/reynolds/skew/skew.sh
1790 index ca37e43..117c96b 100644
1791 --- a/test/reynolds/skew/skew.sh
1792 +++ b/test/reynolds/skew/skew.sh
1793 @@ -43,7 +43,7 @@ else
1794 exit 1
1795 fi
1796
1797 -if cat <<EOF | python ; then :
1798 +if cat <<EOF | python3 ; then :
1799 from check import *
1800 from sys import *
1801 for div in ['div5','div6','div7']:
1802 diff --git a/test/reynolds/skewbox/skew.sh b/test/reynolds/skewbox/skew.sh
1803 index d59ca31..fd1f4c0 100644
1804 --- a/test/reynolds/skewbox/skew.sh
1805 +++ b/test/reynolds/skewbox/skew.sh
1806 @@ -33,13 +33,13 @@ else
1807 exit 1
1808 fi
1809
1810 -if cat <<EOF | python ; then :
1811 +if cat <<EOF | python3 ; then :
1812 from check import *
1813 from sys import *
1814 if (Curve('error',1,4) - Curve('error.ref',1,4)).max() > 0.01*Curve('error.ref',1,4).mean() or\
1815 (Curve('error',1,5) - Curve('error.ref',1,5)).max() > 0.01*Curve('error.ref',1,5).mean():
1816 - print (Curve('error',1,4) - Curve('error.ref',1,4)).max(), 0.01*Curve('error.ref',1,4).mean()
1817 - print (Curve('error',1,5) - Curve('error.ref',1,5)).max(), 0.01*Curve('error.ref',1,5).mean()
1818 + print((Curve('error',1,4) - Curve('error.ref',1,4)).max(), 0.01*Curve('error.ref',1,4).mean())
1819 + print((Curve('error',1,5) - Curve('error.ref',1,5)).max(), 0.01*Curve('error.ref',1,5).mean())
1820 exit(1)
1821 EOF
1822 else
1823 diff --git a/test/rossby.sh b/test/rossby.sh
1824 index 5bbc154..0700e13 100755
1825 --- a/test/rossby.sh
1826 +++ b/test/rossby.sh
1827 @@ -1 +1 @@
1828 -python -u test.py rossby
1829 +python3 -u test.py rossby
1830 diff --git a/test/rossby/rossby.sh b/test/rossby/rossby.sh
1831 index 5f2ffc7..ee93694 100644
1832 --- a/test/rossby/rossby.sh
1833 +++ b/test/rossby/rossby.sh
1834 @@ -69,13 +69,13 @@ else
1835 exit 1
1836 fi
1837
1838 -if python <<EOF ; then :
1839 +if python3 <<EOF ; then :
1840 from check import *
1841 from sys import *
1842 if (Curve('eh-4',3,9) - Curve('eh-4.ref',3,9)).max() > 1e-5 or\
1843 (Curve('eh-5',3,9) - Curve('eh-5.ref',3,9)).max() > 1e-5:
1844 - print (Curve('eh-4',3,9) - Curve('eh-4.ref',3,9)).max()
1845 - print (Curve('eh-5',3,9) - Curve('eh-5.ref',3,9)).max()
1846 + print((Curve('eh-4',3,9) - Curve('eh-4.ref',3,9)).max())
1847 + print((Curve('eh-5',3,9) - Curve('eh-5.ref',3,9)).max())
1848 exit(1)
1849 EOF
1850 else
1851 diff --git a/test/rotate.sh b/test/rotate.sh
1852 index 0b5019b..ae389ea 100755
1853 --- a/test/rotate.sh
1854 +++ b/test/rotate.sh
1855 @@ -1 +1 @@
1856 -python -u test.py rotate
1857 +python3 -u test.py rotate
1858 diff --git a/test/sessile.sh b/test/sessile.sh
1859 index 580eee2..f3f46c8 100755
1860 --- a/test/sessile.sh
1861 +++ b/test/sessile.sh
1862 @@ -1 +1 @@
1863 -python -u test.py sessile
1864 +python3 -u test.py sessile
1865 diff --git a/test/sessile/sessile.sh b/test/sessile/sessile.sh
1866 index 87a9f6f..f4d4f39 100644
1867 --- a/test/sessile/sessile.sh
1868 +++ b/test/sessile/sessile.sh
1869 @@ -78,11 +78,11 @@ else
1870 exit 1
1871 fi
1872
1873 -if cat <<EOF | python ; then :
1874 +if cat <<EOF | python3 ; then :
1875 from check import *
1876 from sys import *
1877 if (Curve('error-6',1,2) - Curve('error-6.ref',1,2)).max() > 0.:
1878 - print (Curve('error-6',1,2) - Curve('error-6.ref',1,2)).max()
1879 + print((Curve('error-6',1,2) - Curve('error-6.ref',1,2)).max())
1880 exit(1)
1881 EOF
1882 else
1883 diff --git a/test/shear.sh b/test/shear.sh
1884 index 6cf6e5d..d5fb595 100755
1885 --- a/test/shear.sh
1886 +++ b/test/shear.sh
1887 @@ -1 +1 @@
1888 -python -u test.py shear
1889 +python3 -u test.py shear
1890 diff --git a/test/shear/concentration/concentration.sh b/test/shear/concentration/concentration.sh
1891 index 723d3f0..6d35903 100644
1892 --- a/test/shear/concentration/concentration.sh
1893 +++ b/test/shear/concentration/concentration.sh
1894 @@ -38,7 +38,7 @@ else
1895 fi
1896
1897 for i in "" 1 2; do
1898 - if python <<EOF ; then :
1899 + if python3 <<EOF ; then :
1900 from check import *
1901 from sys import *
1902 if (Curve('convergence$i',1,2) - Curve('convergence$i.ref',1,2)).max() > 0. or\
1903 diff --git a/test/shear/shear.sh b/test/shear/shear.sh
1904 index cbfd8a5..a63c177 100644
1905 --- a/test/shear/shear.sh
1906 +++ b/test/shear/shear.sh
1907 @@ -11,7 +11,7 @@ else
1908 exit 1
1909 fi
1910
1911 -if cat <<EOF | python ; then :
1912 +if cat <<EOF | python3 ; then :
1913 from check import *
1914 from sys import *
1915 if (Curve('norms',3,5) - Curve('norms.ref',3,5)).max() > 0. or\
1916 diff --git a/test/shock.sh b/test/shock.sh
1917 index 54a0367..ec926ea 100755
1918 --- a/test/shock.sh
1919 +++ b/test/shock.sh
1920 @@ -1 +1 @@
1921 -python -u test.py shock
1922 +python3 -u test.py shock
1923 diff --git a/test/shock/layered/layered.sh b/test/shock/layered/layered.sh
1924 index 4d40734..c9d7968 100644
1925 --- a/test/shock/layered/layered.sh
1926 +++ b/test/shock/layered/layered.sh
1927 @@ -59,11 +59,11 @@ else
1928 fi
1929 fixbb u.eps
1930
1931 -if python <<EOF; then :
1932 +if python3 <<EOF; then :
1933 from check import *
1934 from sys import *
1935 if (Curve('prof-8-15',1,2) - Curve('prof.ref',1,2)).max() > 1e-3:
1936 - print (Curve('prof-8-15',1,2) - Curve('prof.ref',1,2)).max()
1937 + print((Curve('prof-8-15',1,2) - Curve('prof.ref',1,2)).max())
1938 exit(1)
1939 EOF
1940 else
1941 diff --git a/test/shock/shock.sh b/test/shock/shock.sh
1942 index ee281ff..249ab04 100644
1943 --- a/test/shock/shock.sh
1944 +++ b/test/shock/shock.sh
1945 @@ -39,11 +39,11 @@ else
1946 exit 1
1947 fi
1948
1949 -if python <<EOF ; then :
1950 +if python3 <<EOF ; then :
1951 from check import *
1952 from sys import *
1953 if (Curve('error',1,3) - Curve('error.ref',1,3)).max() > 1e-5:
1954 - print (Curve('error',1,3) - Curve('error.ref',1,3)).max()
1955 + print((Curve('error',1,3) - Curve('error.ref',1,3)).max())
1956 exit(1)
1957 EOF
1958 else
1959 diff --git a/test/shore.sh b/test/shore.sh
1960 index 721021d..450c6cd 100755
1961 --- a/test/shore.sh
1962 +++ b/test/shore.sh
1963 @@ -1 +1 @@
1964 -python -u test.py shore
1965 +python3 -u test.py shore
1966 diff --git a/test/shore/shore.sh b/test/shore/shore.sh
1967 index 3a9104f..b247cf9 100644
1968 --- a/test/shore/shore.sh
1969 +++ b/test/shore/shore.sh
1970 @@ -10,7 +10,7 @@ if test x$donotrun != xtrue; then
1971 done
1972 fi
1973
1974 -if python <<EOF > convergence; then :
1975 +if python3 <<EOF > convergence; then :
1976 from check import *
1977 from sys import *
1978
1979 @@ -18,7 +18,7 @@ for i in range($levelmin,$levelmax + 1):
1980 ref = Curve('t220.csv',1,2)
1981 sol = Curve('sim-' + str(i) + '-220.txt',1,8)
1982 diff = ref - sol
1983 - print i,diff.norm1(),diff.normi()
1984 + print(i,diff.norm1(),diff.normi())
1985
1986 EOF
1987 else
1988 @@ -60,7 +60,7 @@ else
1989 exit 1
1990 fi
1991
1992 -if python <<EOF ; then :
1993 +if python3 <<EOF ; then :
1994 from check import *
1995 from sys import *
1996 if (Curve('convergence',1,2) - Curve('convergence.ref',1,2)).max() > 0. or\
1997 @@ -69,4 +69,4 @@ if (Curve('convergence',1,2) - Curve('convergence.ref',1,2)).max() > 0. or\
1998 EOF
1999 else
2000 exit 1
2001 -fi
2002 \ No newline at end of file
2003 +fi
2004 diff --git a/test/source.sh b/test/source.sh
2005 index 0a70443..eba45f2 100755
2006 --- a/test/source.sh
2007 +++ b/test/source.sh
2008 @@ -1 +1 @@
2009 -python -u test.py source
2010 +python3 -u test.py source
2011 diff --git a/test/source/source.sh b/test/source/source.sh
2012 index 277d38f..6673ac9 100644
2013 --- a/test/source/source.sh
2014 +++ b/test/source/source.sh
2015 @@ -48,13 +48,13 @@ else
2016 exit 1
2017 fi
2018
2019 -if python <<EOF ; then :
2020 +if python3 <<EOF ; then :
2021 from check import *
2022 from sys import *
2023 if (Curve('error',1,4) - Curve('error.ref',1,4)).max() > 1e-4 or\
2024 (Curve('error',1,3) - Curve('error.ref',1,3)).max() > 1e-4:
2025 - print (Curve('error',1,4) - Curve('error.ref',1,4)).max()
2026 - print (Curve('error',1,3) - Curve('error.ref',1,3)).max()
2027 + print((Curve('error',1,4) - Curve('error.ref',1,4)).max())
2028 + print((Curve('error',1,3) - Curve('error.ref',1,3)).max())
2029 exit(1)
2030 EOF
2031 else
2032 diff --git a/test/spurious.sh b/test/spurious.sh
2033 index b1eca4b..ccef1eb 100755
2034 --- a/test/spurious.sh
2035 +++ b/test/spurious.sh
2036 @@ -1 +1 @@
2037 -python -u test.py spurious
2038 +python3 -u test.py spurious
2039 diff --git a/test/spurious/spurious.sh b/test/spurious/spurious.sh
2040 index 47ffa27..ffe92c2 100644
2041 --- a/test/spurious/spurious.sh
2042 +++ b/test/spurious/spurious.sh
2043 @@ -70,7 +70,7 @@ for f in La-120-5 La-1200-5 La-12000-5; do
2044 fi
2045 done
2046
2047 -if cat <<EOF | python ; then :
2048 +if cat <<EOF | python3 ; then :
2049 from check import *
2050 from sys import *
2051 if (Curve('convergence',1,3) - Curve('convergence.ref',1,3)).max() > 1e-6:
2052 diff --git a/test/still.sh b/test/still.sh
2053 index 936d328..2033f05 100755
2054 --- a/test/still.sh
2055 +++ b/test/still.sh
2056 @@ -1 +1 @@
2057 -python -u test.py still
2058 +python3 -u test.py still
2059 diff --git a/test/strouhal.sh b/test/strouhal.sh
2060 index 4b0a36b..f559cc8 100755
2061 --- a/test/strouhal.sh
2062 +++ b/test/strouhal.sh
2063 @@ -1 +1 @@
2064 -python -u test.py strouhal
2065 +python3 -u test.py strouhal
2066 diff --git a/test/strouhal/strouhal.sh b/test/strouhal/strouhal.sh
2067 index b08f553..84581a7 100644
2068 --- a/test/strouhal/strouhal.sh
2069 +++ b/test/strouhal/strouhal.sh
2070 @@ -46,7 +46,7 @@ else
2071 exit 1
2072 fi
2073
2074 -if cat <<EOF | python ; then :
2075 +if cat <<EOF | python3 ; then :
2076 from check import *
2077 from sys import *
2078 if (Curve('strouhal.res',1,2) - Curve('strouhal.ref',1,2)).max() > 0.01 :
2079 diff --git a/test/swirl.sh b/test/swirl.sh
2080 index 6f8bea4..d7db147 100755
2081 --- a/test/swirl.sh
2082 +++ b/test/swirl.sh
2083 @@ -1 +1 @@
2084 -python -u test.py swirl
2085 +python3 -u test.py swirl
2086 diff --git a/test/swirl/swirl.gfs b/test/swirl/swirl.gfs
2087 index 4f0f59e..75b41a4 100644
2088 --- a/test/swirl/swirl.gfs
2089 +++ b/test/swirl/swirl.gfs
2090 @@ -78,13 +78,13 @@ EOF
2091 exit $GFS_STOP;
2092 fi
2093
2094 - if python <<EOF ; then :
2095 + if python3 <<EOF ; then :
2096 from check import *
2097 from sys import *
2098 if (Curve('nu',1,2) - Curve('analytical',1,2)).normi() > 8e-3 or \
2099 (Curve('nu',1,3) - Curve('analytical',1,3)).normi() > 8e-3 :
2100 - print (Curve('nu',1,2) - Curve('analytical',1,2)).normi()
2101 - print (Curve('nu',1,3) - Curve('analytical',1,3)).normi()
2102 + print((Curve('nu',1,2) - Curve('analytical',1,2)).normi())
2103 + print((Curve('nu',1,3) - Curve('analytical',1,3)).normi())
2104 exit(1)
2105 EOF
2106 else
2107 diff --git a/test/terrain.sh b/test/terrain.sh
2108 index 1b7ae30..6837a7f 100755
2109 --- a/test/terrain.sh
2110 +++ b/test/terrain.sh
2111 @@ -1 +1 @@
2112 -python -u test.py terrain
2113 +python3 -u test.py terrain
2114 diff --git a/test/terrain/terrain.sh b/test/terrain/terrain.sh
2115 index 6bca2fc..3e28925 100644
2116 --- a/test/terrain/terrain.sh
2117 +++ b/test/terrain/terrain.sh
2118 @@ -60,7 +60,7 @@ else
2119 exit 1
2120 fi
2121
2122 -if python <<EOF ; then :
2123 +if python3 <<EOF ; then :
2124 from check import *
2125 from sys import *
2126 c = Curve()
2127 @@ -68,10 +68,10 @@ if (Curve('error-t',1,3) - Curve('error-t.ref',1,3)).max() > 0. or\
2128 (Curve('error-t',1,4) - Curve('error-t.ref',1,4)).max() > 0. or\
2129 (Curve('error-h',1,3) - Curve('error-h.ref',1,3)).max() > 0. or\
2130 (Curve('error-h',1,4) - Curve('error-h.ref',1,4)).max() > 0.:
2131 - print (Curve('error-t',1,3) - Curve('error-t.ref',1,3)).max()
2132 - print (Curve('error-t',1,4) - Curve('error-t.ref',1,4)).max()
2133 - print (Curve('error-h',1,3) - Curve('error-h.ref',1,3)).max()
2134 - print (Curve('error-h',1,4) - Curve('error-h.ref',1,4)).max()
2135 + print((Curve('error-t',1,3) - Curve('error-t.ref',1,3)).max())
2136 + print((Curve('error-t',1,4) - Curve('error-t.ref',1,4)).max())
2137 + print((Curve('error-h',1,3) - Curve('error-h.ref',1,3)).max())
2138 + print((Curve('error-h',1,4) - Curve('error-h.ref',1,4)).max() )
2139 exit(1)
2140 EOF
2141 else
2142 diff --git a/test/test.py b/test/test.py
2143 index a2059ff..9efa297 100644
2144 --- a/test/test.py
2145 +++ b/test/test.py
2146 @@ -1,5 +1,5 @@
2147 import sys
2148 -import commands
2149 +import subprocess
2150 import os
2151 import os.path
2152 sys.path.append("../doc/examples")
2153 @@ -15,14 +15,14 @@ for start in sys.argv[1:]:
2154 test = gfs2tex.Example(root)
2155 status,msg = test.run(env)
2156 if status != None:
2157 - print "FAIL:",root
2158 + print("FAIL:",root)
2159 if len(msg) > 0:
2160 - print " ".join(msg)
2161 - print >>open(test.path + "/status",'w'), "{\color{Red}FAIL}:"
2162 + print(" ".join(msg))
2163 + print("{\color{Red}FAIL}:", file=open(test.path + "/status",'w'))
2164 failed += 1
2165 else:
2166 - print "PASS:",root
2167 - print >>open(test.path + "/status",'w'), "{\color{OliveGreen}PASS}:"
2168 + print("PASS:",root)
2169 + print("{\color{OliveGreen}PASS}:", file=open(test.path + "/status",'w'))
2170 n += 1
2171
2172 if failed:
2173 @@ -30,9 +30,9 @@ if failed:
2174 else:
2175 msg = "All " + repr(n) + " tests passed"
2176
2177 -print len(msg)*"="
2178 -print msg
2179 -print len(msg)*"="
2180 +print(len(msg)*"=")
2181 +print(msg)
2182 +print(len(msg)*"=")
2183
2184 if failed:
2185 sys.exit(1)
2186 diff --git a/test/wannier.sh b/test/wannier.sh
2187 index 8340b04..bb87d7d 100755
2188 --- a/test/wannier.sh
2189 +++ b/test/wannier.sh
2190 @@ -1 +1 @@
2191 -python -u test.py wannier
2192 +python3 -u test.py wannier
2193 diff --git a/test/wannier/bipolar/bipolar.sh b/test/wannier/bipolar/bipolar.sh
2194 index 9a29a66..f44b3be 100644
2195 --- a/test/wannier/bipolar/bipolar.sh
2196 +++ b/test/wannier/bipolar/bipolar.sh
2197 @@ -48,7 +48,7 @@ else
2198 exit 1
2199 fi
2200
2201 -if cat <<EOF | python ; then :
2202 +if cat <<EOF | python3 ; then :
2203 from check import *
2204 from sys import *
2205 if (Curve('error',1,4) - Curve('error.ref',1,4)).max() > 1e-6:
2206 diff --git a/test/wannier/wannier.sh b/test/wannier/wannier.sh
2207 index 496b278..e5dc1d6 100644
2208 --- a/test/wannier/wannier.sh
2209 +++ b/test/wannier/wannier.sh
2210 @@ -34,7 +34,7 @@ else
2211 exit 1
2212 fi
2213
2214 -if cat <<EOF | python ; then :
2215 +if cat <<EOF | python3 ; then :
2216 from check import *
2217 from sys import *
2218 if (Curve('error',1,4) - Curve('error.ref',1,4)).max() > 1e-6:
2219 diff --git a/test/waves.sh b/test/waves.sh
2220 index a518a7a..dc0dec4 100755
2221 --- a/test/waves.sh
2222 +++ b/test/waves.sh
2223 @@ -1 +1 @@
2224 -python -u test.py waves
2225 +python3 -u test.py waves
2226 diff --git a/test/waves/waves.sh b/test/waves/waves.sh
2227 index e537c6c..3a521d3 100644
2228 --- a/test/waves/waves.sh
2229 +++ b/test/waves/waves.sh
2230 @@ -29,7 +29,7 @@ awk 'BEGIN {
2231 print "\\end{tabular}"
2232 }' < correlation > correlation.tex
2233
2234 -if cat <<EOF | python ; then :
2235 +if cat <<EOF | python3 ; then :
2236 from check import *
2237 from sys import *
2238 if Curve('correlation',1,3).max() > 10.:
11 02_fix_makefiles.patch
22 03_build_funct.patch
33 05_reproducible_build.patch
4 05_Port-to-Python-3.patch