Commit f9317521 authored by Matthieu Schaller's avatar Matthieu Schaller

No limit on h in test125cells. Add more digits to the output. Perturbed...

No limit on h in test125cells. Add more digits to the output. Perturbed version of the test125cells now works.
parent b4f68711
......@@ -47,6 +47,8 @@ tests/brute_force_27_perturbed.dat
tests/swift_dopair_27_perturbed.dat
tests/brute_force_125_standard.dat
tests/swift_dopair_125_standard.dat
tests/brute_force_125_perturbed.dat
tests/swift_dopair_125_perturbed.dat
tests/testGreetings
tests/testReading
tests/input.hdf5
......
......@@ -374,7 +374,7 @@ void dump_particle_fields(char *fileName, struct cell *main_cell,
/* Write header */
fprintf(file,
"# %4s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %8s %13s %13s "
"%13s %8s %8s %8s %8s\n",
"%13s %13s %13s %8s %8s\n",
"ID", "pos_x", "pos_y", "pos_z", "v_x", "v_y", "v_z", "h", "rho",
"div_v", "S", "u", "P", "c", "a_x", "a_y", "a_z", "h_dt", "v_sig",
"dS/dt", "du/dt");
......@@ -386,7 +386,7 @@ void dump_particle_fields(char *fileName, struct cell *main_cell,
fprintf(file,
"%6llu %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f "
"%8.5f "
"%8.5f %8.5f %13e %13e %13e %8.5f %8.5f %8.5f %8.5f\n",
"%8.5f %8.5f %13e %13e %13e %13e %13e %8.5f %8.5f\n",
main_cell->parts[pid].id, main_cell->parts[pid].x[0],
main_cell->parts[pid].x[1], main_cell->parts[pid].x[2],
main_cell->parts[pid].v[0], main_cell->parts[pid].v[1],
......@@ -425,7 +425,7 @@ void dump_particle_fields(char *fileName, struct cell *main_cell,
fprintf(file,
"%6llu %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f "
"%8.5f %8.5f "
"%8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f %8.5f\n",
"%8.5f %8.5f %13f %13f %13f %13f %13f %8.5f %8.5f\n",
solution[pid].id, solution[pid].x[0], solution[pid].x[1],
solution[pid].x[2], solution[pid].v[0], solution[pid].v[1],
solution[pid].v[2], solution[pid].h, solution[pid].rho,
......@@ -559,7 +559,8 @@ int main(int argc, char *argv[]) {
struct hydro_props hp;
hp.target_neighbours = pow_dimension(h) * kernel_norm;
hp.delta_neighbours = 2.;
hp.delta_neighbours = 4.;
hp.h_max = FLT_MAX;
hp.max_smoothing_iterations = 1;
hp.CFL_condition = 0.1;
......@@ -589,8 +590,8 @@ int main(int argc, char *argv[]) {
const double offset[3] = {i * size, j * size, k * size};
/* Construct it */
cells[i * 25 + j * 5 + k] =
make_cell(particles, offset, size, h, rho, &partId, perturbation, vel, press);
cells[i * 25 + j * 5 + k] = make_cell(
particles, offset, size, h, rho, &partId, perturbation, vel, press);
/* Store the inner cells */
if (i > 0 && i < 4 && j > 0 && j < 4 && k > 0 && k < 4) {
......@@ -618,7 +619,7 @@ int main(int argc, char *argv[]) {
/* Initialise the particles */
for (int j = 0; j < 125; ++j)
runner_do_drift_particles(&runner, cells[j], 0);
/* Reset particles. */
for (int i = 0; i < 125; ++i) {
for (int n = 0; n < cells[i]->count; ++n)
......@@ -702,13 +703,13 @@ int main(int argc, char *argv[]) {
}
}
//for (size_t n = 0; n < 100*runs; ++n) {
// for (size_t n = 0; n < 100*runs; ++n) {
// ticks self_tic = getticks();
// DOSELF2(&runner, main_cell);
// self_force_time += getticks() - self_tic;
//
//
//}
/* Output timing */
......
......@@ -11,7 +11,7 @@ do
if [ -e brute_force_125_standard.dat ]
then
python @srcdir@/difffloat.py brute_force_125_standard.dat swift_dopair_125_standard.dat @srcdir@/tolerance_125.dat 6
python @srcdir@/difffloat.py brute_force_125_standard.dat swift_dopair_125_standard.dat @srcdir@/tolerance_125_normal.dat 6
else
exit 1
fi
......
......@@ -91,7 +91,7 @@ int main() {
printf("\nVector Output for kernel_deval_2_vec\n");
printf("-------------\n");
/* Test vectorised kernel that uses two vectors. */
for (int i = 0; i < numPoints; i += VEC_SIZE) {
......@@ -100,7 +100,7 @@ int main() {
vector vx_2, vx_h_2;
vector W_vec_2, dW_vec_2;
for (int j = 0; j < VEC_SIZE; j++) {
vx.f[j] = (i + j) * 2.25f / numPoints;
vx_2.f[j] = (i + j) * 2.25f / numPoints;
......@@ -127,7 +127,7 @@ int main() {
return 1;
}
}
/* Check second vector results. */
for (int j = 0; j < VEC_SIZE; j++) {
printf("%2d: h= %f H= %f x=%f W(x,h)=%f dW(x,h)=%f\n", i + j, h,
......
# ID pos_x pos_y pos_z v_x v_y v_z h rho div_v S u P c a_x a_y a_z h_dt v_sig dS/dt du/dt
0 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4
0 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4 1e-4
Markdown is supported
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