Commit 2b34da41 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Make the test125, test27 and testBC also work with vectorized minimal hydro.

parent ee9f1446
......@@ -660,7 +660,6 @@ int main(int argc, char *argv[]) {
runner_do_sort(&runner, cells[j], 0x1FFF, 0, 0);
/* Do the density calculation */
#if !(defined(MINIMAL_SPH) && defined(WITH_VECTORIZATION))
/* Initialise the particle cache. */
#ifdef WITH_VECTORIZATION
......@@ -704,13 +703,10 @@ int main(int argc, char *argv[]) {
for (int j = 0; j < 27; ++j)
runner_doself1_density(&runner, inner_cells[j]);
#endif
/* Ghost to finish everything on the central cells */
for (int j = 0; j < 27; ++j) runner_do_ghost(&runner, inner_cells[j], 0);
/* Do the force calculation */
#if !(defined(MINIMAL_SPH) && defined(WITH_VECTORIZATION))
#ifdef WITH_VECTORIZATION
/* Initialise the cache. */
......@@ -746,7 +742,6 @@ int main(int argc, char *argv[]) {
DOSELF2(&runner, main_cell);
timings[26] += getticks() - self_tic;
#endif
/* Finally, give a gentle kick */
runner_do_end_force(&runner, main_cell, 0);
......@@ -792,18 +787,17 @@ int main(int argc, char *argv[]) {
const ticks tic = getticks();
/* Kick the central cell */
// runner_do_kick1(&runner, main_cell, 0);
/* Kick the central cell */
// runner_do_kick1(&runner, main_cell, 0);
/* And drift it */
// runner_do_drift_particles(&runner, main_cell, 0);
/* And drift it */
// runner_do_drift_particles(&runner, main_cell, 0);
/* Initialise the particles */
// for (int j = 0; j < 125; ++j) runner_do_drift_particles(&runner, cells[j],
// 0);
/* Initialise the particles */
// for (int j = 0; j < 125; ++j) runner_do_drift_particles(&runner, cells[j],
// 0);
/* Do the density calculation */
#if !(defined(MINIMAL_SPH) && defined(WITH_VECTORIZATION))
/* Do the density calculation */
/* Run all the pairs (only once !)*/
for (int i = 0; i < 5; i++) {
......@@ -838,13 +832,10 @@ int main(int argc, char *argv[]) {
/* And now the self-interaction for the central cells*/
for (int j = 0; j < 27; ++j) self_all_density(&runner, inner_cells[j]);
#endif
/* Ghost to finish everything on the central cells */
for (int j = 0; j < 27; ++j) runner_do_ghost(&runner, inner_cells[j], 0);
/* Do the force calculation */
#if !(defined(MINIMAL_SPH) && defined(WITH_VECTORIZATION))
/* Do the force calculation */
/* Do the pairs (for the central 27 cells) */
for (int i = 1; i < 4; i++) {
......@@ -861,8 +852,6 @@ int main(int argc, char *argv[]) {
/* And now the self-interaction for the main cell */
self_all_force(&runner, main_cell);
#endif
/* Finally, give a gentle kick */
runner_do_end_force(&runner, main_cell, 0);
// runner_do_kick2(&runner, main_cell, 0);
......
......@@ -489,8 +489,6 @@ int main(int argc, char *argv[]) {
const ticks tic = getticks();
#if !(defined(MINIMAL_SPH) && defined(WITH_VECTORIZATION))
#ifdef WITH_VECTORIZATION
runner.ci_cache.count = 0;
cache_init(&runner.ci_cache, 512);
......@@ -537,8 +535,6 @@ int main(int argc, char *argv[]) {
timings[13] += getticks() - self_tic;
#endif
const ticks toc = getticks();
time += toc - tic;
......@@ -577,8 +573,6 @@ int main(int argc, char *argv[]) {
const ticks tic = getticks();
#if !(defined(MINIMAL_SPH) && defined(WITH_VECTORIZATION))
/* Run all the brute-force pairs */
for (int j = 0; j < 27; ++j)
if (cells[j] != main_cell) pairs_all_density(&runner, main_cell, cells[j]);
......@@ -586,8 +580,6 @@ int main(int argc, char *argv[]) {
/* And now the self-interaction */
self_all_density(&runner, main_cell);
#endif
const ticks toc = getticks();
/* Let's get physical ! */
......
......@@ -33,14 +33,14 @@
#define ACC_THRESHOLD 1e-5
#if defined(WITH_VECTORIZATION)
#define DOSELF1 runner_doself1_density_vec
#define DOSELF1 runner_doself1_branch_density
#define DOPAIR1 runner_dopair1_branch_density
#define DOSELF1_NAME "runner_doself1_density_vec"
#define DOPAIR1_NAME "runner_dopair1_density_vec"
#endif
#ifndef DOSELF1
#define DOSELF1 runner_doself1_density
#define DOSELF1 runner_doself1_branch_density
#define DOSELF1_NAME "runner_doself1_density"
#endif
......@@ -283,6 +283,7 @@ void runner_doself1_density(struct runner *r, struct cell *ci);
void runner_doself1_density_vec(struct runner *r, struct cell *ci);
void runner_dopair1_branch_density(struct runner *r, struct cell *ci,
struct cell *cj);
void runner_doself1_branch_density(struct runner *r, struct cell *c);
void test_boundary_conditions(struct cell **cells, struct runner runner,
const int loc_i, const int loc_j, const int loc_k,
......@@ -296,8 +297,6 @@ void test_boundary_conditions(struct cell **cells, struct runner runner,
for (int j = 0; j < dim * dim * dim; ++j) zero_particle_fields(cells[j]);
/* Run all the pairs */
#if !(defined(MINIMAL_SPH) && defined(WITH_VECTORIZATION))
#ifdef WITH_VECTORIZATION
runner.ci_cache.count = 0;
cache_init(&runner.ci_cache, 512);
......@@ -329,8 +328,6 @@ void test_boundary_conditions(struct cell **cells, struct runner runner,
DOSELF1(&runner, main_cell);
#endif
/* Let's get physical ! */
end_calculation(main_cell, runner.e->cosmology);
......@@ -342,8 +339,6 @@ void test_boundary_conditions(struct cell **cells, struct runner runner,
/* Zero the fields */
for (int i = 0; i < dim * dim * dim; ++i) zero_particle_fields(cells[i]);
#if !(defined(MINIMAL_SPH) && defined(WITH_VECTORIZATION))
/* Now loop over all the neighbours of this cell
* and perform the pair interactions. */
for (int ii = -1; ii < 2; ii++) {
......@@ -367,8 +362,6 @@ void test_boundary_conditions(struct cell **cells, struct runner runner,
/* And now the self-interaction */
self_all_density(&runner, main_cell);
#endif
/* Let's get physical ! */
end_calculation(main_cell, runner.e->cosmology);
......
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