-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathtest27cellsStarsPerturbed.sh.in
76 lines (59 loc) · 1.99 KB
/
test27cellsStarsPerturbed.sh.in
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
#!/bin/bash
# Test for particles with the same smoothing length
echo ""
rm -f star_brute_force_27_perturbed.dat swift_star_dopair_27_perturbed.dat
echo "Running ./test27cellsStars -n 6 -N 7 -r 1 -d 0.1 -f perturbed"
./test27cellsStars -n 6 -N 7 -r 1 -d 0.1 -f perturbed
if [ -e star_brute_force_27_perturbed.dat ]
then
if python3 @srcdir@/difffloat.py star_brute_force_27_perturbed.dat swift_star_dopair_27_perturbed.dat @srcdir@/star_tolerance_27_perturbed.dat 6
then
echo "Accuracy test passed"
else
echo "Accuracy test failed"
exit 1
fi
else
echo "Error Missing test output file"
exit 1
fi
echo "------------"
# Test for particles with random smoothing lengths
echo ""
rm -f star_brute_force_27_perturbed.dat swift_star_dopair_27_perturbed.dat
echo "Running ./test27cellsStars -n 6 -N 7 -r 1 -d 0.1 -f perturbed -p 1.1"
./test27cellsStars -n 6 -N 7 -r 1 -d 0.1 -f perturbed -p 1.1
if [ -e star_brute_force_27_perturbed.dat ]
then
if python3 @srcdir@/difffloat.py star_brute_force_27_perturbed.dat swift_star_dopair_27_perturbed.dat @srcdir@/star_tolerance_27_perturbed_h.dat 6
then
echo "Accuracy test passed"
else
echo "Accuracy test failed"
exit 1
fi
else
echo "Error Missing test output file"
exit 1
fi
echo "------------"
# Test for particles with random smoothing lengths
echo ""
rm -f star_brute_force_27_perturbed.dat swift_star_dopair_27_perturbed.dat
echo "Running ./test27cellsStars -n 6 -N 7 -r 1 -d 0.1 -f perturbed -p 1.3"
./test27cellsStars -n 6 -N 7 -r 1 -d 0.1 -f perturbed -p 1.3
if [ -e star_brute_force_27_perturbed.dat ]
then
if python3 @srcdir@/difffloat.py star_brute_force_27_perturbed.dat swift_star_dopair_27_perturbed.dat @srcdir@/star_tolerance_27_perturbed_h2.dat 6
then
echo "Accuracy test passed"
else
echo "Accuracy test failed"
exit 1
fi
else
echo "Error Missing test output file"
exit 1
fi
echo "------------"
exit $?