mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-16 20:24:48 -06:00
Merge pull request #332 from atgeirr/fix-compile-error
Fix compile error instroduced by merging #275.
This commit is contained in:
commit
64769f1062
@ -109,10 +109,8 @@ int
|
|||||||
main(int argc, char** argv)
|
main(int argc, char** argv)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Must ensure an instance of the helper is created to initialise MPI,
|
// Must ensure an instance of the helper is created to initialise MPI.
|
||||||
// but we don't use the helper here.
|
const Dune::MPIHelper& mpi_helper = Dune::MPIHelper::instance(argc, argv);
|
||||||
// Dune::MPIHelper& helper = Dune::MPIHelper::instance(argc, argv);
|
|
||||||
Dune::MPIHelper::instance(argc, argv);
|
|
||||||
using namespace Opm;
|
using namespace Opm;
|
||||||
|
|
||||||
std::cout << "\n================ Test program for fully implicit three-phase black-oil flow ===============\n\n";
|
std::cout << "\n================ Test program for fully implicit three-phase black-oil flow ===============\n\n";
|
||||||
@ -134,7 +132,9 @@ try
|
|||||||
// int max_well_control_iterations = 0;
|
// int max_well_control_iterations = 0;
|
||||||
double gravity[3] = { 0.0 };
|
double gravity[3] = { 0.0 };
|
||||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||||
bool output = param.getDefault("output", true);
|
|
||||||
|
// Write parameters used for later reference. (only if rank is zero)
|
||||||
|
bool output = ( mpi_helper.rank() == 0 ) && param.getDefault("output", true);
|
||||||
std::string output_dir;
|
std::string output_dir;
|
||||||
if (output) {
|
if (output) {
|
||||||
// Create output directory if needed.
|
// Create output directory if needed.
|
||||||
@ -165,7 +165,7 @@ try
|
|||||||
std::shared_ptr<EclipseState> eclipseState;
|
std::shared_ptr<EclipseState> eclipseState;
|
||||||
try {
|
try {
|
||||||
deck = parser->parseFile(deck_filename);
|
deck = parser->parseFile(deck_filename);
|
||||||
Opm::checkDeck(deck, logger);
|
Opm::checkDeck(deck);
|
||||||
eclipseState.reset(new Opm::EclipseState(deck));
|
eclipseState.reset(new Opm::EclipseState(deck));
|
||||||
}
|
}
|
||||||
catch (const std::invalid_argument& e) {
|
catch (const std::invalid_argument& e) {
|
||||||
@ -287,24 +287,6 @@ try
|
|||||||
fis_solver.reset(new NewtonIterationBlackoilSimple(param, parallel_information));
|
fis_solver.reset(new NewtonIterationBlackoilSimple(param, parallel_information));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write parameters used for later reference. (only if rank is zero)
|
|
||||||
bool output = ( grid->comm().rank() == 0 ) && param.getDefault("output", true);
|
|
||||||
std::string output_dir;
|
|
||||||
if (output) {
|
|
||||||
// Create output directory if needed.
|
|
||||||
output_dir =
|
|
||||||
param.getDefault("output_dir", std::string("output"));
|
|
||||||
boost::filesystem::path fpath(output_dir);
|
|
||||||
try {
|
|
||||||
create_directories(fpath);
|
|
||||||
}
|
|
||||||
catch (...) {
|
|
||||||
OPM_THROW(std::runtime_error, "Creating directories failed: " << fpath);
|
|
||||||
}
|
|
||||||
// Write simulation parameters.
|
|
||||||
param.writeParam(output_dir + "/simulation.param");
|
|
||||||
}
|
|
||||||
|
|
||||||
Opm::TimeMapConstPtr timeMap(eclipseState->getSchedule()->getTimeMap());
|
Opm::TimeMapConstPtr timeMap(eclipseState->getSchedule()->getTimeMap());
|
||||||
SimulatorTimer simtimer;
|
SimulatorTimer simtimer;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user