Commit 0293bd79 authored by BRAMAS Berenger's avatar BRAMAS Berenger
Browse files

add non unif option

parent bc9efc6b
...@@ -74,6 +74,7 @@ const FParameterNames LocalOptionBlocSize { {"-bs"}, "The size of the block of t ...@@ -74,6 +74,7 @@ const FParameterNames LocalOptionBlocSize { {"-bs"}, "The size of the block of t
const FParameterNames LocalOptionNoValidate { {"-no-validation"}, "To avoid comparing with direct computation"}; const FParameterNames LocalOptionNoValidate { {"-no-validation"}, "To avoid comparing with direct computation"};
const FParameterNames LocalOptionProlate { {"-prolate"}, "To generate prolate distribution"}; const FParameterNames LocalOptionProlate { {"-prolate"}, "To generate prolate distribution"};
const FParameterNames LocalOptionProlateNonUnif { {"-prolate-nonunif"}, "To generate prolate distribution"}; const FParameterNames LocalOptionProlateNonUnif { {"-prolate-nonunif"}, "To generate prolate distribution"};
const FParameterNames LocalOptionNonUnif { {"-nonunif"}, "To generate non uniform"};
#include <cstdlib> #include <cstdlib>
#include <time.h> #include <time.h>
...@@ -376,8 +377,9 @@ struct RunContainer{ ...@@ -376,8 +377,9 @@ struct RunContainer{
#ifdef RANDOM_PARTICLES #ifdef RANDOM_PARTICLES
const bool prolate = FParameters::existParameter(argc,argv,LocalOptionProlate.options); const bool prolate = FParameters::existParameter(argc,argv,LocalOptionProlate.options);
const bool prolatenonunif = FParameters::existParameter(argc,argv,LocalOptionProlateNonUnif.options); const bool prolatenonunif = FParameters::existParameter(argc,argv,LocalOptionProlateNonUnif.options);
const bool nonunif = FParameters::existParameter(argc,argv,LocalOptionNonUnif.options);
FSphericalRandomLoader<FReal> loader(FParameters::getValue(argc,argv,FParameterDefinitions::NbParticles.options, 2000), FSphericalRandomLoader<FReal> loader(FParameters::getValue(argc,argv,FParameterDefinitions::NbParticles.options, 2000),
false, false, false, prolate, false, prolatenonunif); nonunif, false, false, prolate, false, prolatenonunif);
#else #else
const char* const filename = FParameters::getStr(argc,argv,FParameterDefinitions::InputFile.options, "../Data/test20k.fma"); const char* const filename = FParameters::getStr(argc,argv,FParameterDefinitions::InputFile.options, "../Data/test20k.fma");
FFmaGenericLoader<FReal> loader(filename); FFmaGenericLoader<FReal> loader(filename);
...@@ -580,8 +582,9 @@ struct RunContainer{ ...@@ -580,8 +582,9 @@ struct RunContainer{
#ifdef RANDOM_PARTICLES #ifdef RANDOM_PARTICLES
const bool prolate = FParameters::existParameter(argc,argv,LocalOptionProlate.options); const bool prolate = FParameters::existParameter(argc,argv,LocalOptionProlate.options);
const bool prolatenonunif = FParameters::existParameter(argc,argv,LocalOptionProlateNonUnif.options); const bool prolatenonunif = FParameters::existParameter(argc,argv,LocalOptionProlateNonUnif.options);
const bool nonunif = FParameters::existParameter(argc,argv,LocalOptionNonUnif.options);
FSphericalRandomLoader<FReal> loader(FParameters::getValue(argc,argv,FParameterDefinitions::NbParticles.options, 2000), FSphericalRandomLoader<FReal> loader(FParameters::getValue(argc,argv,FParameterDefinitions::NbParticles.options, 2000),
false, false, false, prolate, false, prolatenonunif); nonunif, false, false, prolate, false, prolatenonunif);
#else #else
const char* const filename = FParameters::getStr(argc,argv,FParameterDefinitions::InputFile.options, "../Data/test20k.fma"); const char* const filename = FParameters::getStr(argc,argv,FParameterDefinitions::InputFile.options, "../Data/test20k.fma");
FFmaGenericLoader<FReal> loader(filename); FFmaGenericLoader<FReal> loader(filename);
...@@ -694,7 +697,7 @@ int main(int argc, char* argv[]){ ...@@ -694,7 +697,7 @@ int main(int argc, char* argv[]){
FHelpDescribeAndExit(argc, argv, "Test the blocked tree by counting the particles.", FHelpDescribeAndExit(argc, argv, "Test the blocked tree by counting the particles.",
FParameterDefinitions::OctreeHeight, FParameterDefinitions::OctreeSubHeight, FParameterDefinitions::OctreeHeight, FParameterDefinitions::OctreeSubHeight,
#ifdef RANDOM_PARTICLES #ifdef RANDOM_PARTICLES
FParameterDefinitions::NbParticles, LocalOptionProlate,LocalOptionProlateNonUnif, FParameterDefinitions::NbParticles, LocalOptionProlate,LocalOptionProlateNonUnif,LocalOptionNonUnif,
#else #else
FParameterDefinitions::InputFile, FParameterDefinitions::InputFile,
#endif #endif
......
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