Commit 9a1f211c authored by Vladislav Perepelkin's avatar Vladislav Perepelkin
Browse files

minor fixes

parent aa143a7e
......@@ -139,17 +139,21 @@ void save(int iter)
for (j=AVERAGING_RADIUS; j<WIDTH-AVERAGING_RADIUS-1; j++) {
int rest=0, move=0;
double new_density, new_move, new_rest;
for (i=AVERAGING_RADIUS; i<HEIGHT-AVERAGING_RADIUS-1; i++) {
sum_mass(i, j, &rest, &move);
}
write(fl_density, j, ensemble, old_density,
1.0*(rest+move)/(HEIGHT-AVERAGING_RADIUS*2-1)/square);
write(fl_move, j, ensemble, old_move,
1.0*move/(HEIGHT-AVERAGING_RADIUS*2-1)/square);
write(fl_rest, j, ensemble, old_rest,
1.0*rest/(HEIGHT-AVERAGING_RADIUS*2-1)/square);
new_density=1.0*(rest+move)/(HEIGHT-AVERAGING_RADIUS*2-1)/square;
new_move=1.0*move/(HEIGHT-AVERAGING_RADIUS*2-1)/square;
new_rest=1.0*rest/(HEIGHT-AVERAGING_RADIUS*2-1)/square;
write(fl_density, j, ensemble, old_density, new_density);
write(fl_move, j, ensemble, old_move, new_move);
write(fl_rest, j, ensemble, old_rest, new_rest);
}
fclose(fl_density);
......
......@@ -21,7 +21,7 @@ tmp_script=`tempfile`
echo 'set term png
set yrange['$zmin':'$zmax']
set output '\"$x.png\"'
set output '\"$1/all.png\"'
set grid ytics lw 1 lt 0
set grid xtics lw 1 lt 0
unset key' > $tmp_script
......@@ -39,3 +39,4 @@ done
gnuplot $tmp_script 2>/dev/null
rm $tmp_script
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