mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-16 15:51:57 -06:00
document function and switch implementation.
This commit is contained in:
parent
8224e7cef9
commit
49fbf5e493
@ -325,7 +325,38 @@ namespace Opm
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Set output_to_files_ and set/create output dir. Write parameter file.
|
||||||
|
// Writes to:
|
||||||
|
// output_to_files_
|
||||||
|
// output_dir_
|
||||||
|
// Throws std::runtime_error if failed to create (if requested) output dir.
|
||||||
|
void setupOutput()
|
||||||
|
{
|
||||||
|
// Write parameters used for later reference. (only if rank is zero)
|
||||||
|
output_to_files_ = output_cout_ && param_.getDefault("output", true);
|
||||||
|
if (output_to_files_) {
|
||||||
|
// Create output directory if needed.
|
||||||
|
output_dir_ =
|
||||||
|
param_.getDefault("output_dir", std::string("."));
|
||||||
|
boost::filesystem::path fpath(output_dir_);
|
||||||
|
if (!is_directory(fpath)) {
|
||||||
|
try {
|
||||||
|
create_directories(fpath);
|
||||||
|
}
|
||||||
|
catch (...) {
|
||||||
|
OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Write simulation parameters.
|
||||||
|
param_.writeParam(output_dir_ + "/simulation.param");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Setup OpmLog backend with output_dir.
|
||||||
void setupLogging()
|
void setupLogging()
|
||||||
{
|
{
|
||||||
std::string deck_filename = param_.get<std::string>("deck_filename");
|
std::string deck_filename = param_.get<std::string>("deck_filename");
|
||||||
@ -364,38 +395,6 @@ namespace Opm
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Set output_to_files_ and set/create output dir. Write parameter file.
|
|
||||||
// Writes to:
|
|
||||||
// output_to_files_
|
|
||||||
// output_dir_
|
|
||||||
// Throws std::runtime_error if failed to create (if requested) output dir.
|
|
||||||
void setupOutput()
|
|
||||||
{
|
|
||||||
// Write parameters used for later reference. (only if rank is zero)
|
|
||||||
output_to_files_ = output_cout_ && param_.getDefault("output", true);
|
|
||||||
if (output_to_files_) {
|
|
||||||
// Create output directory if needed.
|
|
||||||
output_dir_ =
|
|
||||||
param_.getDefault("output_dir", std::string("."));
|
|
||||||
boost::filesystem::path fpath(output_dir_);
|
|
||||||
if (!is_directory(fpath)) {
|
|
||||||
try {
|
|
||||||
create_directories(fpath);
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Write simulation parameters.
|
|
||||||
param_.writeParam(output_dir_ + "/simulation.param");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Parser the input and creates the Deck and EclipseState objects.
|
// Parser the input and creates the Deck and EclipseState objects.
|
||||||
// Writes to:
|
// Writes to:
|
||||||
// deck_
|
// deck_
|
||||||
|
Loading…
Reference in New Issue
Block a user