Merge pull request #958 from qilicun/rename_logfile
use standard filename for output log file.
This commit is contained in:
commit
a703bfbcf1
@ -36,6 +36,7 @@
|
|||||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||||
|
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
|
#include <boost/algorithm/string/case_conv.hpp>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -76,20 +77,16 @@ try
|
|||||||
|
|
||||||
GridManager gm(deck);
|
GridManager gm(deck);
|
||||||
const UnstructuredGrid& grid = *gm.c_grid();
|
const UnstructuredGrid& grid = *gm.c_grid();
|
||||||
bool output = true;
|
using boost::filesystem::path;
|
||||||
std::string output_dir;
|
path fpath(eclipseFilename);
|
||||||
|
std::string baseName;
|
||||||
if (output) {
|
if (boost::to_upper_copy(path(fpath.extension()).string())== ".DATA") {
|
||||||
output_dir = "output";
|
baseName = path(fpath.stem()).string();
|
||||||
boost::filesystem::path fpath(output_dir);
|
} else {
|
||||||
try {
|
baseName = path(fpath.filename()).string();
|
||||||
create_directories(fpath);
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
std::string logFile = output_dir + "/LOGFILE.txt";
|
|
||||||
|
std::string logFile = baseName + ".SATFUNCLOG";
|
||||||
Opm::time::StopWatch timer;
|
Opm::time::StopWatch timer;
|
||||||
timer.start();
|
timer.start();
|
||||||
RelpermDiagnostics diagnostic(logFile);
|
RelpermDiagnostics diagnostic(logFile);
|
||||||
|
Loading…
Reference in New Issue
Block a user