Commit f06cfcd1 authored by COULAUD Olivier's avatar COULAUD Olivier
Browse files

Add output

parent 349766f6
...@@ -83,8 +83,8 @@ void genDistusage() { ...@@ -83,8 +83,8 @@ void genDistusage() {
<< " Distributions " << std::endl << " Distributions " << std::endl
<< " Uniform on " << std::endl << " Uniform on " << std::endl
<< " -unitCube uniform distribution on unit cube" <<std::endl << " -unitCube uniform distribution on unit cube" <<std::endl
<< " -cuboid uniform distribution on rectangular cuboid of size a:a:c" <<std::endl << " -cuboid uniform distribution on rectangular cuboid of size a:b:c" <<std::endl
<< " -lengths a:a:c - default value for R is 1.0:1.0:2.0" <<std::endl << " -lengths a:b:c - default values are 1.0:1.0:2.0" <<std::endl
<< " -unitSphere uniform distribution on unit sphere" <<std::endl << " -unitSphere uniform distribution on unit sphere" <<std::endl
<< " -sphere uniform distribution on sphere of radius given by" <<std::endl << " -sphere uniform distribution on sphere of radius given by" <<std::endl
<< " -radius R - default value for R is 2.0" <<std::endl << " -radius R - default value for R is 2.0" <<std::endl
...@@ -163,7 +163,7 @@ int main(int argc, char ** argv){ ...@@ -163,7 +163,7 @@ int main(int argc, char ** argv){
std::string dd(":"),aspectRatio = FParameters::getStr(argc,argv,"-lengths", "1:1:2"); std::string dd(":"),aspectRatio = FParameters::getStr(argc,argv,"-lengths", "1:1:2");
FReal A,B,C ; FReal A,B,C ;
size_t pos = aspectRatio.find(":"); aspectRatio.replace(pos,1," "); size_t pos = aspectRatio.find(":"); aspectRatio.replace(pos,1," ");
pos = aspectRatio.find(":"); aspectRatio.replace(pos,1," "); pos = aspectRatio.find(":"); aspectRatio.replace(pos,1," ");
std::stringstream ss(aspectRatio); ss >>A >> B >> C ; std::stringstream ss(aspectRatio); ss >>A >> B >> C ;
unifRandonPointsOnCube(NbPoints, A,B,C,particles) ; unifRandonPointsOnCube(NbPoints, A,B,C,particles) ;
BoxWith = FMath::Max(A,FMath::Max(B,C) ); BoxWith = FMath::Max(A,FMath::Max(B,C) );
...@@ -232,7 +232,8 @@ int main(int argc, char ** argv){ ...@@ -232,7 +232,8 @@ int main(int argc, char ** argv){
else { else {
name += ".fma"; name += ".fma";
} }
FFmaGenericWriter writer(name,binaryMode) ; std::cout << "Write "<< NbPoints <<" Particles in file " << name <<std::endl;
FFmaGenericWriter writer(name) ;
writer.writeHeader(Centre,BoxWith, NbPoints, *ppart) ; writer.writeHeader(Centre,BoxWith, NbPoints, *ppart) ;
writer.writeArrayOfParticles(ppart, NbPoints); writer.writeArrayOfParticles(ppart, NbPoints);
// //
......
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