Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
adriannepilleboue committed Oct 13, 2015
1 parent 168dbff commit 46661ce
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
5 changes: 4 additions & 1 deletion src/sampler-sobolT2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ int main(int argc, char** argv)
stk::io::PointSetOutputStream<2, double, double> stream;
stream.setValueType(stk::io::PointSetStream::VAL_NONE);
stream.setPositionType(stk::io::PointSetStream::POS_DOUBLE);
stream.setBinary(true);
if(vm.count("binary"))
{
stream.setBinary(true);
}
stream.open(fn_output);

double meanTime = 0;
Expand Down
7 changes: 6 additions & 1 deletion src/sampler-stratifiedT2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,16 @@ int main(int argc, char** argv)

try
{
srand48(time(NULL));

//Open Output
stk::io::PointSetOutputStream<2, double, double> stream;
stream.setValueType(stk::io::PointSetStream::VAL_NONE);
stream.setPositionType(stk::io::PointSetStream::POS_DOUBLE);
stream.setBinary(true);
if(vm.count("binary"))
{
stream.setBinary(true);
}
stream.open(fn_output);

double meanTime = 0;
Expand Down
7 changes: 6 additions & 1 deletion src/sampler-whitenoiseT2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,16 @@ int main(int argc, char** argv)

try
{
srand48(time(NULL));

//Open Output
stk::io::PointSetOutputStream<2, double, double> stream;
stream.setValueType(stk::io::PointSetStream::VAL_NONE);
stream.setPositionType(stk::io::PointSetStream::POS_DOUBLE);
stream.setBinary(true);
if(vm.count("binary"))
{
stream.setBinary(true);
}
stream.open(fn_output);

double meanTime = 0;
Expand Down
10 changes: 6 additions & 4 deletions test/sampler-analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ analyseSampler(){
METHOD=$1
N=$2
M=$3
FILENAME=./results/"$METHOD"T2-n$N-$M.mpts
FILENAME=./test/results/"$METHOD"T2-n$N-$M.mpts

../bin/stk-sampler-"$METHOD"T2 -n $N -m $M -o "$FILENAME"
../bin/stk-draw-pts -i "$FILENAME" -o ./results/"$METHOD"T2-pointset.png
../bin/stk-fourier -i "$FILENAME" -O ./results/"$METHOD"T2-powerspec.png -R ./results/"$METHOD"T2-radialpowerspec.png -A ./results/"$METHOD"T2-anisotropy.png
./bin/stk-sampler-"$METHOD"T2 -n $N -m $M -o "$FILENAME"
./bin/stk-draw-pts -i "$FILENAME" -o ./test/results/"$METHOD"T2-pointset.png
./bin/stk-fourier -i "$FILENAME" -O ./test/results/"$METHOD"T2-powerspec.png -R ./test/results/"$METHOD"T2-radialpowerspec.png -A ./test/results/"$METHOD"T2-anisotropy.png
}

mkdir ./test/results

analyseSampler whitenoise 4096 10
analyseSampler stratified 4096 10
analyseSampler fpo 4096 10
Expand Down

0 comments on commit 46661ce

Please sign in to comment.