Commit c8390324 authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles
Browse files

update to compile with gcc 7 against falcON

parent 0becd514
......@@ -30,7 +30,7 @@ const char * defv[] = { // use `::'string because of 'using namespace std'
"select=???\n component selected (disk,stars,halo,gas,range,all)",
"times=all\n selected time ",
"verbose=f\n verbose mode "
"VERSION=1.0\n compiled on <"__DATE__"> JCL ",
"VERSION=1.0\n compiled on <" __DATE__ "> JCL ",
NULL
};
const char * usage="Detect galaxy rotation angle";
......
......@@ -44,7 +44,7 @@ const char * defv[] = {
"title=Simulation\n simulation title",
"times=all\n selected time",
"verbose=f\n verbose on/off"
"VERSION=1.O\n compiled on <"__DATE__"> JCL ",
"VERSION=1.O\n compiled on <" __DATE__ "> JCL ",
NULL,
};
......@@ -115,7 +115,7 @@ void moveToCom(const int nbody,float * pos, float * mass)
void set_graph(char* dev,float h,float w)
{
if (h) {;}
if (cpgbeg(0,dev,1,1)!=1) /* open output device */
exit(EXIT_FAILURE);
......@@ -178,7 +178,7 @@ void snapcompute(float tsnap,float * data,int nbody,int * nret,float range[3][2]
static int n_pt,i_pvar=0;
const char * label[6]={ "x","y","z","vx","vy","vz" },
* lx=label[0], * ly=label[1], * lz=label[2];
if (nret||outfile) {;}
/* viewport coordinates */
float st=0.05,
wx1,wx2,wy1,wy2;
......@@ -411,6 +411,7 @@ int main(int argc, char ** argv )
bool first = true;
float range[3][2];
if (argc) {;}
// start NEMO
initparam(const_cast<char**>(argv),const_cast<char**>(defv));
......
......@@ -45,7 +45,7 @@ const char * defv[] = {
"pvar=x\n plotting variable, x (position) | v (velocity)",
"times=all\n selected time",
"verbose=f\n verbose on/off"
"VERSION=1.O\n compiled on <"__DATE__"> JCL ",
"VERSION=1.O\n compiled on <" __DATE__ "> JCL ",
NULL,
};
......@@ -96,7 +96,7 @@ void moveToCom(const int nbody,float * pos, float * mass)
void set_graph(char* dev,float h,float w)
{
if (h) {;}
if (cpgbeg(0,dev,1,1)!=1) /* open output device */
exit(EXIT_FAILURE);
......@@ -302,6 +302,7 @@ int main(int argc, char ** argv )
bool first = true;
float range[3][2];
if (argc) {;}
// start NEMO
initparam(const_cast<char**>(argv),const_cast<char**>(defv));
......
......@@ -29,7 +29,7 @@ const char * defv[] = { // use `::'string because of 'using namespace std'
"out=???\n gadget2 output file)",
"scale=1.0\n scaling factor (pos,hsml)",
"verbose=f\n verbose mode ",
"VERSION=1.0\n compiled on <"__DATE__"> JCL ",
"VERSION=1.0\n compiled on <" __DATE__ "> JCL ",
NULL
};
const char * usage="Simple converter tipsy to gadget2";
......@@ -74,7 +74,7 @@ void readtipsystd_(const char * filename,std::string outname,float scale)
ok=unsout->snapshot->setData("time",time);
if (ok) ; // remove compiler warning
if (ok) {;} // remove compiler warning
/* reads data for gas particles */
i = 0;
......
......@@ -40,7 +40,7 @@ const char * defv[] = { // use `::'string because of 'using namespace std'
"offset=0.01\n +/- time offset",
"ds=_\n digit separator",
"verbose=f\n verbose mode "
"VERSION=1.0\n compiled on <"__DATE__"> JCL ",
"VERSION=1.0\n compiled on <" __DATE__ "> JCL ",
NULL
};
const char * usage="A universal converting tool for UNS snapshots";
......
......@@ -31,7 +31,7 @@ const char * defv[] = {
"aux=\n default mass value",
"dens=\n default mass value",
"verbose=f\n verbose on/off",
"VERSION=1.O\n compiled on <"__DATE__"> JCL ",
"VERSION=1.O\n compiled on <" __DATE__ "> JCL ",
NULL,
};
const char * usage="add data to an UNS file";
......@@ -41,6 +41,7 @@ using namespace std;
// main program
int main(int argc, char ** argv )
{
if (argc) {;}
// start NEMO
initparam(const_cast<char**>(argv),const_cast<char**>(defv));
// get input parameters
......
......@@ -29,7 +29,7 @@ const char * defv[] = {
"out=???\n UNS output snapshot",
"mass=1.0\n default mass value",
"verbose=f\n verbose on/off",
"VERSION=1.O\n compiled on <"__DATE__"> JCL ",
"VERSION=1.O\n compiled on <" __DATE__ "> JCL ",
NULL,
};
const char * usage="add mass to an UNS file";
......@@ -39,6 +39,7 @@ using namespace std;
// main program
int main(int argc, char ** argv )
{
if (argc) {;}
// start NEMO
initparam(const_cast<char**>(argv),const_cast<char**>(defv));
// get input parameters
......
......@@ -37,7 +37,7 @@ const char * defv[] = { // use `::'string because of 'using namespace std'
"first=f\n add a trailing number to the first output file",
"offset=0.01\n +/- time offset",
"verbose=f\n verbose mode "
"VERSION=1.0\n compiled on <"__DATE__"> JCL ",
"VERSION=1.0\n compiled on <" __DATE__ "> JCL ",
NULL
};
const char * usage="Compute velocities from two consecutives displacements";
......
......@@ -31,7 +31,7 @@ const char * defv[] = {
"com=t\n center according to com",
"times=all\n selected time",
"verbose=f\n verbose on/off"
"VERSION=1.O\n compiled on <"__DATE__"> JCL ",
"VERSION=1.O\n compiled on <" __DATE__ "> JCL ",
NULL,
};
......@@ -111,6 +111,7 @@ void findRadius(uns::CunsIn * uns, const float percen,const bool com, const int
// main
int main(int argc, char ** argv )
{
if (argc) {;}
// start NEMO
initparam(const_cast<char**>(argv),const_cast<char**>(defv));
......
......@@ -29,7 +29,7 @@ const char * defv[] = {
"time=???\n selected time",
"offset=0.01\n +/- time offset",
"verbose=f\n verbose on/off",
"VERSION=1.O\n compiled on <"__DATE__"> JCL ",
"VERSION=1.O\n compiled on <" __DATE__ "> JCL ",
NULL,
};
const char * usage="Return the minimal range time + the filename which match the given time";
......@@ -39,6 +39,7 @@ using namespace std;
// main program
int main(int argc, char ** argv )
{
if (argc) {;}
// start NEMO
initparam(const_cast<char**>(argv),const_cast<char**>(defv));
// get input parameters
......
......@@ -38,7 +38,7 @@ const char * defv[] = { // use `::'string because of 'using namespace std'
"saverho=f\n save rho and hsml if exist",
"offset=0.01\n +/- time offset",
"times=all\n selected time",
"VERSION=1.0\n compiled on <"__DATE__"> JCL ",
"VERSION=1.0\n compiled on <" __DATE__ "> JCL ",
NULL
};
const char * usage="Save in NEMO format a glnemo indexes list input file";
......@@ -146,6 +146,7 @@ void nemoOut(bool stop,const bool first,const bool one_file,const bool special_n
int *id;
bool hasrho=false,hashsml=false;
CTimer timing,ttot;
if (stop||select=="") {;}
// clear vectors
selvec.clear();
pvec.clear();
......
......@@ -35,7 +35,7 @@ const char * defv[] = {
"maxline=2\n max lines per components",
"times=all\n selected time",
"verbose=f\n verbose on/off",
"VERSION=2.1\n compiled on <"__DATE__"> JCL ",
"VERSION=2.1\n compiled on <" __DATE__ "> JCL ",
NULL,
};
const char * usage="Print information about an UNS file";
......
......@@ -43,7 +43,7 @@ const char * defv[] = {
"hf=4.0\n hsml factor",
"times=all\n selected time",
"verbose=f\n verbose on/off"
"VERSION=1.O\n compiled on <"__DATE__"> JCL ",
"VERSION=1.O\n compiled on <" __DATE__ "> JCL ",
NULL,
};
......@@ -53,6 +53,7 @@ const long long one=1;
// main
int main(int argc, char ** argv )
{
if (argc) {;}
// start NEMO
nos::initparam(const_cast<char**>(argv),const_cast<char**>(defv));
......@@ -62,6 +63,7 @@ int main(int argc, char ** argv )
std::string select_c(nos::getparam((char *) "select" ));
std::string select_t(nos::getparam((char *) "times" ));
double nl=nos::getdparam((char *) "nl" );
if (nl) {;}
double hf=nos::getdparam((char *) "hf" );
int neib=nos::getiparam((char *) "neib" );
bool smr = (nos::getbparam((char *) "smr" ));
......
......@@ -64,7 +64,7 @@ const char * defv[] = { // use `::'string because of 'using namespace std'
"first=f\n add a trailing numbering to the first output file",
"offset=0.01\n +/- time offset",
"verbose=f\n verbose mode "
"VERSION=1.0\n compiled on <"__DATE__"> JCL ",
"VERSION=1.0\n compiled on <" __DATE__ "> JCL ",
NULL
};
const char * usage="Compute stars formation rate";
......
......@@ -45,7 +45,7 @@ const char * defv[] = {
"float=t\n t=float, f=double",
"time=0.0\n set output snapshot time",
"verbose=f\n verbose on/off",
"VERSION=2.O\n compiled on <"__DATE__"> JCL ",
"VERSION=2.O\n compiled on <" __DATE__ "> JCL ",
NULL,
};
const char * usage="stack two UNS systems on top of each other";
......
......@@ -33,7 +33,7 @@ const char * defv[] = { // use `::'string because of 'using namespace std'
"first=f\n add a trailing numbering to the first output file",
"offset=0.01\n +/- time offset",
"verbose=f\n verbose mode "
"VERSION=1.0\n compiled on <"__DATE__"> JCL ",
"VERSION=1.0\n compiled on <" __DATE__ "> JCL ",
NULL
};
const char * usage="Convert an UNS file to Nemo file format";
......@@ -48,6 +48,7 @@ void processComponent(std::string select,std::string comp, uns::CunsIn * uns,uns
float * pos, * vel, * mass;
int n1,n2,n3;
bool ok1,ok2,ok3;
if (select=="") {;}
ok1 = uns->snapshot->getData(comp,"pos" ,&n1,&pos );
ok2 = uns->snapshot->getData(comp,"vel" ,&n2,&vel );
......
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