mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fix default output dir
This commit is contained in:
parent
e3e4f3acac
commit
bcb501e3d3
@ -274,8 +274,9 @@ namespace Opm
|
|||||||
baseName = path(fpath.filename()).string();
|
baseName = path(fpath.filename()).string();
|
||||||
}
|
}
|
||||||
|
|
||||||
logFileStream << output_dir_ << "/" << baseName;
|
const std::string& output_dir = eclState().getIOConfig().getOutputDir();
|
||||||
debugFileStream << output_dir_ << "/" << "." << baseName;
|
logFileStream << output_dir << "/" << baseName;
|
||||||
|
debugFileStream << output_dir << "/" << "." << baseName;
|
||||||
|
|
||||||
if ( must_distribute_ && mpi_rank_ != 0 )
|
if ( must_distribute_ && mpi_rank_ != 0 )
|
||||||
{
|
{
|
||||||
@ -375,13 +376,13 @@ namespace Opm
|
|||||||
|
|
||||||
namespace fs = boost::filesystem;
|
namespace fs = boost::filesystem;
|
||||||
fs::path output_path(".");
|
fs::path output_path(".");
|
||||||
|
const std::string& output_dir = eclState().getIOConfig().getOutputDir();
|
||||||
if ( param_.has("output_dir") )
|
if ( param_.has("output_dir") )
|
||||||
{
|
{
|
||||||
output_path = fs::path(output_dir_);
|
output_path = fs::path(output_dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
fs::path deck_filename(param_.get<std::string>("deck_filename"));
|
fs::path deck_filename(param_.get<std::string>("deck_filename"));
|
||||||
|
|
||||||
std::for_each(fs::directory_iterator(output_path),
|
std::for_each(fs::directory_iterator(output_path),
|
||||||
fs::directory_iterator(),
|
fs::directory_iterator(),
|
||||||
detail::ParallelFileMerger(output_path, deck_filename.stem().string()));
|
detail::ParallelFileMerger(output_path, deck_filename.stem().string()));
|
||||||
@ -398,12 +399,12 @@ namespace Opm
|
|||||||
deckFileParam += deckFileName;
|
deckFileParam += deckFileName;
|
||||||
argv.push_back(deckFileParam.c_str());
|
argv.push_back(deckFileParam.c_str());
|
||||||
|
|
||||||
const std::string default_output_dir = boost::filesystem::basename(deckFileName);
|
|
||||||
output_dir_ = param_.getDefault("output_dir", default_output_dir);
|
|
||||||
|
|
||||||
std::string outputDirParam("--ecl-output-dir=");
|
std::string outputDirParam("--ecl-output-dir=");
|
||||||
outputDirParam += output_dir_;
|
if (param_.has("output_dir")) {
|
||||||
argv.push_back(outputDirParam.c_str());
|
const std::string& output_dir = param_.get<std::string>("output_dir");
|
||||||
|
outputDirParam += output_dir;
|
||||||
|
argv.push_back(outputDirParam.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
const bool restart_double_si = param_.getDefault("restart_double_si", false);
|
const bool restart_double_si = param_.getDefault("restart_double_si", false);
|
||||||
std::string outputDoublePrecisionParam("--ecl-output-double-precision=");
|
std::string outputDoublePrecisionParam("--ecl-output-double-precision=");
|
||||||
@ -662,7 +663,6 @@ namespace Opm
|
|||||||
bool must_distribute_ = false;
|
bool must_distribute_ = false;
|
||||||
ParameterGroup param_;
|
ParameterGroup param_;
|
||||||
bool output_to_files_ = false;
|
bool output_to_files_ = false;
|
||||||
std::string output_dir_ = std::string(".");
|
|
||||||
std::unique_ptr<OutputWriter> output_writer_;
|
std::unique_ptr<OutputWriter> output_writer_;
|
||||||
boost::any parallel_information_;
|
boost::any parallel_information_;
|
||||||
std::unique_ptr<NewtonIterationBlackoilInterface> fis_solver_;
|
std::unique_ptr<NewtonIterationBlackoilInterface> fis_solver_;
|
||||||
|
Loading…
Reference in New Issue
Block a user