Skip to content
Snippets Groups Projects
Commit daaf1d29 authored by Josh Borrow's avatar Josh Borrow Committed by Matthieu Schaller
Browse files

Initialised artificial viscosity variables in the cell tests

parent 6bea6a42
No related branches found
No related tags found
No related merge requests found
......@@ -834,6 +834,7 @@ static INLINE void cache_clean(struct cache *c) {
free(c->balsara);
free(c->soundspeed);
}
c->count = 0;
}
#endif /* WITH_VECTORIZATION */
......
......@@ -590,6 +590,7 @@ int main(int argc, char *argv[]) {
prog_const.const_newton_G = 1.f;
struct hydro_props hp;
hydro_props_init_no_hydro(&hp);
hp.eta_neighbours = h;
hp.h_tolerance = 1e0;
hp.h_max = FLT_MAX;
......@@ -675,8 +676,8 @@ int main(int argc, char *argv[]) {
/* Initialise the particle cache. */
#ifdef WITH_VECTORIZATION
runner.ci_cache.count = 0;
cache_init(&runner.ci_cache, 512);
runner.cj_cache.count = 0;
cache_init(&runner.ci_cache, 512);
cache_init(&runner.cj_cache, 512);
#endif
......@@ -724,8 +725,8 @@ int main(int argc, char *argv[]) {
#ifdef WITH_VECTORIZATION
/* Initialise the cache. */
runner.ci_cache.count = 0;
runner.cj_cache.count = 0;
cache_clean(&runner.ci_cache);
cache_clean(&runner.cj_cache);
cache_init(&runner.ci_cache, 512);
cache_init(&runner.cj_cache, 512);
#endif
......@@ -890,5 +891,8 @@ int main(int argc, char *argv[]) {
for (int i = 0; i < 125; ++i) clean_up(cells[i]);
free(solution);
cache_clean(&runner.ci_cache);
cache_clean(&runner.cj_cache);
return 0;
}
......@@ -456,6 +456,7 @@ int main(int argc, char *argv[]) {
space.dim[2] = 3.;
struct hydro_props hp;
hydro_props_init_no_hydro(&hp);
hp.eta_neighbours = h;
hp.h_tolerance = 1e0;
hp.h_max = FLT_MAX;
......@@ -615,5 +616,8 @@ int main(int argc, char *argv[]) {
/* Clean things to make the sanitizer happy ... */
for (int i = 0; i < 27; ++i) clean_up(cells[i]);
cache_clean(&runner.ci_cache);
cache_clean(&runner.cj_cache);
return 0;
}
......@@ -125,5 +125,6 @@ int main(int argc, char *argv[]) {
message("x * icbrtf took %9.3f %s (acc = %18.11e).",
clocks_from_ticks(getticks() - tic_ours), clocks_getunit(), acc_ours);
free(data);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment