#!/bin/bash

###################################
## Diffusion
## (define DIF model in defs.h)
###################################

## remove all previously generated files
#./clean -f
./clean

if [ ! -e genesis ]; then
  ln -s ../src/genesis .
fi
if [ ! -e rescal ]; then
  ln -s ../src/rescal .
fi

## parameters file (input)
PAR_FILE="dif.par"
#PAR_FILE="dif2.par"

## general log files (output)
GENESIS_LOG_FILE="GENESIS.log"
RESCAL_LOG_FILE="RESCAL.log"

## generation of binary cellular space 
#./genesis -f $PAR_FILE -s 2000 > $GENESIS_LOG_FILE

## generation of png images, data files and info logs, then stop after 30 minutes
./rescal $PAR_FILE -dlog 100t0 -dpng 1000t0 >> $RESCAL_LOG_FILE


