mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Some cleanup concerning spaces, const, simplified logic.
This commit is contained in:
parent
e5b8cddfa8
commit
75561a0da7
@ -241,7 +241,7 @@ namespace Opm
|
|||||||
// Throws std::runtime_error if failed to create (if requested) output dir.
|
// Throws std::runtime_error if failed to create (if requested) output dir.
|
||||||
void setupOutput()
|
void setupOutput()
|
||||||
{
|
{
|
||||||
std::string output = param_.getDefault("output", std::string("all"));
|
const std::string output = param_.getDefault("output", std::string("all"));
|
||||||
static std::map<std::string, FileOutputValue> string2OutputEnum =
|
static std::map<std::string, FileOutputValue> string2OutputEnum =
|
||||||
{ {"none", OUTPUT_NONE },
|
{ {"none", OUTPUT_NONE },
|
||||||
{"false", OUTPUT_LOG_ONLY },
|
{"false", OUTPUT_LOG_ONLY },
|
||||||
@ -255,7 +255,9 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr<<"Value "<<output<<" passed to option output was invalid. Using \"all\" instead"<<std::endl;
|
std::cerr << "Value " << output <<
|
||||||
|
" passed to option output was invalid. Using \"all\" instead."
|
||||||
|
<< std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
output_to_files_ = output_cout_ && output_ > OUTPUT_NONE;
|
output_to_files_ = output_cout_ && output_ > OUTPUT_NONE;
|
||||||
|
@ -340,12 +340,9 @@ namespace Opm
|
|||||||
const Opm::PhaseUsage &phaseUsage)
|
const Opm::PhaseUsage &phaseUsage)
|
||||||
: output_( [¶m](){
|
: output_( [¶m](){
|
||||||
// If output parameter is true or all, then we do output
|
// If output parameter is true or all, then we do output
|
||||||
std::string outputString = param.getDefault("output", std::string("all"));
|
const std::string outputString = param.getDefault("output", std::string("all"));
|
||||||
if ( outputString == "all" || outputString == "true" )
|
return ( outputString == "all" || outputString == "true" );
|
||||||
{
|
}()
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;}()
|
|
||||||
),
|
),
|
||||||
parallelOutput_( output_ ? new ParallelDebugOutput< Grid >( grid, eclipseState, phaseUsage.num_phases, phaseUsage ) : 0 ),
|
parallelOutput_( output_ ? new ParallelDebugOutput< Grid >( grid, eclipseState, phaseUsage.num_phases, phaseUsage ) : 0 ),
|
||||||
outputDir_( eclipseState.getIOConfig().getOutputDir() ),
|
outputDir_( eclipseState.getIOConfig().getOutputDir() ),
|
||||||
|
Loading…
Reference in New Issue
Block a user