Commit 2589835e authored by Vladislav Perepelkin's avatar Vladislav Perepelkin
Browse files

fixing bugs

parent 323f2460
......@@ -9,25 +9,29 @@ run: hpprp FORCE
hpprp: hpprp.c config.c collide.c
g++ -fopenmp -O3 hpprp.c -o hpprp -lrt -Wall
collide.c: rules.txt scripts/rules_gen.py
python scripts/rules_gen.py rules.txt collide.c
collide.c: rules.txt system/rules_gen.py
python system/rules_gen.py rules.txt collide.c
rules.txt: scripts/rules.txt.example
if [ -f rules.txt ] ; then echo "rules.txt exists, not overriding" ; touch rules.txt ; else echo "rules.txt does not exist, create from scripts/rules.txt.example" ; cp scripts/rules.txt.example rules.txt ; fi
rules.txt: system/rules.txt.example
if [ -f rules.txt ] ; then echo "rules.txt exists, not overriding" ; touch rules.txt ; else echo "rules.txt does not exist, create from system/rules.txt.example" ; cp system/rules.txt.example rules.txt ; fi
config.c: scripts/config.c.example
if [ -f config.c ] ; then echo "config.c exists, not overriding" ; touch config.c ; else echo "config.c does not exist, create from scripts/config.c.example" ; cp scripts/config.c.example config.c ; fi
config.c: system/config.c.example
if [ -f config.c ] ; then echo "config.c exists, not overriding" ; touch config.c ; else echo "config.c does not exist, create from system/config.c.example" ; cp system/config.c.example config.c ; fi
density/density.avi:
scripts/image_gen.sh density density/density.avi
system/image_gen.sh density density/density.avi
rest/rest.avi:
scripts/image_gen.sh rest rest/rest.avi
system/image_gen.sh rest rest/rest.avi
move/move.avi:
scripts/image_gen.sh move move/move.avi
system/image_gen.sh move move/move.avi
clean:
rm -f density/* rest/* move/* hpprp collide.c
clean_all:
make clean
rm -f config.c rules.txt
FORCE:
Задание таблицы переходов: в файле rules.txt
Задание источников: в файле config.c
......
......@@ -25,17 +25,6 @@ void fill(int i0, int j0, int i1, int j1,
#include "config.c"
#include "collide.c"
void sources(int iter)
{
/* Moved to init
if (iter==0) {
fill(0, WIDTH/2-10, HEIGHT, WIDTH/2+10, // area
1.0, 1.0, 1.0, 1.0, // move
0.75, 0.0, 0.0, 0.0); // rest
}
*/
}
inline int get_move(char cell)
{
int mass=0;
......
......@@ -3,7 +3,7 @@
zmin=3.2
zmax=4.7
for x in `ls $1/*.txt`; do
for x in `ls $1/*.xls`; do
echo 'set term png
set yrange['$zmin':'$zmax']
set output '\"$x.png\"'
......@@ -28,7 +28,7 @@ unset key' > $tmp_script
first=true
for x in `ls $1/*.txt`; do
for x in `ls $1/*.xls`; do
$first && echo "plot '$x' with lines lw 4\\" >> $tmp_script
$first || echo ", '$x' with lines lw 4\\" >> $tmp_script
......
#!/usr/bin/python
# USER CONFIG
TITLE="0.45-0.45-0.1 (4R)"
GRID_X_PERIOD=250
GRID_Y_PERIOD=0.1
LABEL_X="Density"
LABEL_Y="Space coordinate"
# SCRIPT, DO NOT MODIFY BELOW THIS LINE
import sys, os
def plot(csv_path):
#out_path=
files=[f for f in os.listdir() if f.endswith('.csv')]
for f in files:
plot(f)
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