Commit d5f913b8 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'master' of gitlab.cosma.dur.ac.uk:swift/swiftsim

parents b8e7f90a 42fe194b
......@@ -89,13 +89,12 @@ for i in range(n_lines_to_check):
abs_diff = abs(data1[i,j] - data2[i,j])
sum = abs(data1[i,j] + data2[i,j])
if abs(data1[i,j]) + abs(data2[i,j]) < 2.5e-7: continue
if sum > 0:
rel_diff = abs(data1[i,j] - data2[i,j]) / sum
else:
rel_diff = 0.
if( abs_diff > absTol[j]):
if( abs_diff > 1.1*absTol[j]):
print "Absolute difference larger than tolerance (%e) for particle %d, column %d:"%(absTol[j], i,j)
print "%10s: a = %e"%("File 1", data1[i,j])
print "%10s: b = %e"%("File 2", data2[i,j])
......@@ -103,7 +102,9 @@ for i in range(n_lines_to_check):
print ""
error = True
if( rel_diff > relTol[j]):
if abs(data1[i,j]) < 1e-6 and + abs(data2[i,j]) < 1e-6 : continue
if( rel_diff > 1.1*relTol[j]):
print "Relative difference larger than tolerance (%e) for particle %d, column %d:"%(relTol[j], i,j)
print "%10s: a = %e"%("File 1", data1[i,j])
print "%10s: b = %e"%("File 2", data2[i,j])
......
......@@ -472,8 +472,8 @@ int main(int argc, char *argv[]) {
prog_const.const_newton_G = 1.f;
struct hydro_props hp;
hp.target_neighbours = h * h * h * kernel_norm;
hp.delta_neighbours = 1.;
hp.target_neighbours = pow_dimension(h) * kernel_norm;
hp.delta_neighbours = 2.;
hp.max_smoothing_iterations = 1;
hp.CFL_condition = 0.1;
......
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