Skip to content
Snippets Groups Projects
Commit 8a07c59a authored by James Willis's avatar James Willis
Browse files

Updates after merging with master.

parent 9ebfdd79
No related branches found
No related tags found
1 merge request!406Doself2 vectorisation
......@@ -807,11 +807,11 @@ __attribute__((always_inline)) INLINE void runner_doself2_force_vec(
vector v_hi, v_vix, v_viy, v_viz, v_hig2, v_r2;
vector v_rhoi, v_grad_hi, v_pOrhoi2, v_balsara_i, v_ci;
// TIMER_TIC
TIMER_TIC
if (!cell_is_active(c, e)) return;
if (!cell_is_drifted(c, e)) cell_drift_particles(c, e);
if (!cell_are_part_drifted(c, e)) error("Interacting undrifted cell.");
/* Get the particle cache from the runner and re-allocate
* the cache if it is not big enough for the cell. */
......
......@@ -635,12 +635,6 @@ int main(int argc, char *argv[]) {
hydro_init_part(&cells[i]->parts[n], &space.hs);
}
/* Reset particles. */
for (int i = 0; i < 125; ++i) {
for (int n = 0; n < cells[i]->count; ++n)
hydro_init_part(&cells[i]->parts[n], &space.hs);
}
/* First, sort stuff */
for (int j = 0; j < 125; ++j) runner_do_sort(&runner, cells[j], 0x1FFF, 0);
......@@ -735,12 +729,6 @@ int main(int argc, char *argv[]) {
outputFileNameExtension);
dump_particle_fields(outputFileName, main_cell, solution, 0);
}
/* Reset stuff */
for (int i = 0; i < 125; ++i) {
for (int n = 0; n < cells[i]->count; ++n)
hydro_init_part(&cells[i]->parts[n], &space.hs);
}
}
for (size_t n = 0; n < 100 * runs; ++n) {
......
......@@ -7,18 +7,26 @@ do
rm -f brute_force_125_perturbed.dat swift_dopair_125_perturbed.dat
echo "./test125cells -n 6 -r 1 -d 0.1 -v $v -p $p -f perturbed"
echo "Running ./test125cells -n 6 -r 1 -d 0.1 -v $v -p $p -f perturbed"
./test125cells -n 6 -r 1 -d 0.1 -v $v -p $p -f perturbed
if [ -e brute_force_125_perturbed.dat ]
then
python ./difffloat.py brute_force_125_perturbed.dat swift_dopair_125_perturbed.dat ./tolerance_125_perturbed.dat 6
if python ./difffloat.py brute_force_125_perturbed.dat swift_dopair_125_perturbed.dat ./tolerance_125_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 "------------"
done
done
exit $?
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment