Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vladislav Perepelkin
hppca
Commits
9a1f211c
Commit
9a1f211c
authored
Nov 09, 2016
by
Vladislav Perepelkin
Browse files
minor fixes
parent
aa143a7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
hpprp.c
View file @
9a1f211c
...
...
@@ -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
);
...
...
system/image_gen.sh
View file @
9a1f211c
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment