Commit 1d33cf59 authored by James Willis's avatar James Willis
Browse files

Added extra test case to test27cells.sh and test27cellsPerturbed.sh to perturb...

Added extra test case to test27cells.sh and test27cellsPerturbed.sh to perturb the smoothing lengths further to pick up extra edge cases.
parent 65700f2f
......@@ -100,6 +100,6 @@ EXTRA_DIST = testReading.sh makeInput.py testActivePair.sh \
test27cells.sh test27cellsPerturbed.sh testParser.sh testPeriodicBC.sh \
testPeriodicBCPerturbed.sh test125cells.sh test125cellsPerturbed.sh testParserInput.yaml \
difffloat.py tolerance_125_normal.dat tolerance_125_perturbed.dat \
tolerance_27_normal.dat tolerance_27_perturbed.dat tolerance_27_perturbed_h.dat \
tolerance_27_normal.dat tolerance_27_perturbed.dat tolerance_27_perturbed_h.dat tolerance_27_perturbed_h2.dat \
tolerance_testInteractions.dat tolerance_pair_active.dat \
fft_params.yml tolerance_periodic_BC_normal.dat tolerance_periodic_BC_perturbed.dat
......@@ -28,6 +28,34 @@ do
done
# Test for particles with random smoothing lengths
for v in {0..3}
do
echo ""
rm -f brute_force_27_standard.dat swift_dopair_27_standard.dat
echo "Running ./test27cells -n 6 -r 1 -d 0 -f standard -v $v -p 1.1"
./test27cells -n 6 -r 1 -d 0 -f standard -v $v -p 1.1
if [ -e brute_force_27_standard.dat ]
then
if python @srcdir@/difffloat.py brute_force_27_standard.dat swift_dopair_27_standard.dat @srcdir@/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 "------------"
done
# Test for particles with random smoothing lengths
for v in {0..3}
do
......@@ -40,7 +68,7 @@ do
if [ -e brute_force_27_standard.dat ]
then
if python @srcdir@/difffloat.py brute_force_27_standard.dat swift_dopair_27_standard.dat @srcdir@/tolerance_27_perturbed_h.dat 6
if python @srcdir@/difffloat.py brute_force_27_standard.dat swift_dopair_27_standard.dat @srcdir@/tolerance_27_perturbed_h2.dat 6
then
echo "Accuracy test passed"
else
......
......@@ -35,8 +35,8 @@ do
rm -f brute_force_27_perturbed.dat swift_dopair_27_perturbed.dat
echo "Running ./test27cells -n 6 -r 1 -d 0.1 -f perturbed -v $v -p 1.3"
./test27cells -n 6 -r 1 -d 0.1 -f perturbed -v $v -p 1.3
echo "Running ./test27cells -n 6 -r 1 -d 0.1 -f perturbed -v $v -p 1.1"
./test27cells -n 6 -r 1 -d 0.1 -f perturbed -v $v -p 1.1
if [ -e brute_force_27_perturbed.dat ]
then
......@@ -56,4 +56,31 @@ do
done
# Test for particles with random smoothing lengths
for v in {0..3}
do
echo ""
rm -f brute_force_27_perturbed.dat swift_dopair_27_perturbed.dat
echo "Running ./test27cells -n 6 -r 1 -d 0.1 -f perturbed -v $v -p 1.3"
./test27cells -n 6 -r 1 -d 0.1 -f perturbed -v $v -p 1.3
if [ -e brute_force_27_perturbed.dat ]
then
if python @srcdir@/difffloat.py brute_force_27_perturbed.dat swift_dopair_27_perturbed.dat @srcdir@/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 "------------"
done
exit $?
# ID pos_x pos_y pos_z v_x v_y v_z rho rho_dh wcount wcount_dh div_v curl_vx curl_vy curl_vz
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 3e-6 1e-4 5e-4 1.5e-2 1.4e-5 3e-6 3e-6 9e-6
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1.5e-6 1.57e-2 1e-5 4.74e-3 3.89e-4 3e-3 3e-3 3e-3
0 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e-6 1e0 1e-6 4e-6 4e-6 4e-6
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment