Merge pull request #34 from PhasicFlow/solvers
build floating point type report
This commit is contained in:
commit
e38a3d347a
|
@ -36,10 +36,11 @@ pFlow::commandLine::commandLine(word appName, word disptn)
|
|||
{
|
||||
|
||||
CLI::App::add_flag_callback(
|
||||
"--discription",
|
||||
"--description",
|
||||
[disptn, appName]() {
|
||||
output<<"\n"<<yellowText(versoinCopyright)<<endl<<endl;
|
||||
output<<"Discription for "<< boldText(appName)<<":\n";
|
||||
output<<"\n"<<yellowText(versoinCopyright)<<endl;
|
||||
output<<yellowText(floatingPointDescription())<<endl<<endl;
|
||||
output<<"Description for "<< boldText(appName)<<":\n";
|
||||
output<<" "<<disptn<<endl;
|
||||
},
|
||||
"What does this app do?"
|
||||
|
@ -52,7 +53,7 @@ bool pFlow::commandLine::parse(
|
|||
{
|
||||
try {
|
||||
CLI::App::parse(argc, argv);
|
||||
if(CLI::App::count("--discription")) return false;
|
||||
if(CLI::App::count("--description")) return false;
|
||||
return true;
|
||||
} catch(const ParseError &e) {
|
||||
CLI::App::exit(e);
|
||||
|
|
|
@ -30,10 +30,13 @@ namespace pFlow
|
|||
|
||||
#ifdef pFlow_Build_Double
|
||||
#define useDouble 1
|
||||
inline const char* floatingPointType__ = "double";
|
||||
#else
|
||||
#define useDouble 0
|
||||
inline const char* floatingPointType__ = "float";
|
||||
#endif
|
||||
|
||||
|
||||
// scalars
|
||||
#if useDouble
|
||||
using real = double;
|
||||
|
@ -57,6 +60,12 @@ using label = std::size_t;
|
|||
|
||||
using word = std::string;
|
||||
|
||||
inline
|
||||
auto floatingPointDescription()
|
||||
{
|
||||
return word("In this build, ") + word(floatingPointType__) +
|
||||
word(" is used for floating point operations.");
|
||||
}
|
||||
|
||||
} // end of pFlow
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@ if(!cmds.parse(argc, argv)) return 0;
|
|||
|
||||
output<<endl;
|
||||
Report(1)<< "You are using "<<yellowText(cmds.productNameCopyright())<<endReport;
|
||||
Report(1)<< yellowText(pFlow::floatingPointDescription())<<endReport;
|
||||
|
||||
|
||||
// this should be palced in each main
|
||||
|
|
Loading…
Reference in New Issue