Merge pull request #350 from edbru/OPM-186

Implemented NOSIM keyword.
This commit is contained in:
Joakim Hove 2015-04-28 11:55:18 +02:00
commit ec7d0f9472
2 changed files with 40 additions and 28 deletions

View File

@ -233,7 +233,8 @@ try
fis_solver.reset(new NewtonIterationBlackoilSimple(param));
}
Opm::TimeMapConstPtr timeMap(eclipseState->getSchedule()->getTimeMap());
Opm::ScheduleConstPtr schedule = eclipseState->getSchedule();
Opm::TimeMapConstPtr timeMap(schedule->getTimeMap());
SimulatorTimer simtimer;
// initialize variables
@ -257,19 +258,24 @@ try
outputWriter,
threshold_pressures);
std::cout << "\n\n================ Starting main simulation loop ===============\n"
<< std::flush;
if (!schedule->initOnly()){
std::cout << "\n\n================ Starting main simulation loop ===============\n"
<< std::flush;
SimulatorReport fullReport = simulator.run(simtimer, state);
SimulatorReport fullReport = simulator.run(simtimer, state);
std::cout << "\n\n================ End of simulation ===============\n\n";
fullReport.reportFullyImplicit(std::cout);
std::cout << "\n\n================ End of simulation ===============\n\n";
fullReport.reportFullyImplicit(std::cout);
if (output) {
std::string filename = output_dir + "/walltime.txt";
std::fstream tot_os(filename.c_str(),std::fstream::trunc | std::fstream::out);
fullReport.reportParam(tot_os);
warnIfUnusedParams(param);
if (output) {
std::string filename = output_dir + "/walltime.txt";
std::fstream tot_os(filename.c_str(),std::fstream::trunc | std::fstream::out);
fullReport.reportParam(tot_os);
warnIfUnusedParams(param);
}
} else {
outputWriter.writeInit( simtimer );
std::cout << "\n\n================ Simulation turned off ===============\n" << std::flush;
}
}
catch (const std::exception &e) {

View File

@ -307,7 +307,8 @@ try
fis_solver.reset(new NewtonIterationBlackoilSimple(param, parallel_information));
}
Opm::TimeMapConstPtr timeMap(eclipseState->getSchedule()->getTimeMap());
Opm::ScheduleConstPtr schedule = eclipseState->getSchedule();
Opm::TimeMapConstPtr timeMap(schedule->getTimeMap());
SimulatorTimer simtimer;
// initialize variables
@ -330,25 +331,30 @@ try
outputWriter,
threshold_pressures);
if( grid->comm().rank()==0 )
{
std::cout << "\n\n================ Starting main simulation loop ===============\n"
<< std::flush;
}
if (!schedule->initOnly()){
if( grid->comm().rank()==0 )
{
std::cout << "\n\n================ Starting main simulation loop ===============\n"
<< std::flush;
}
SimulatorReport fullReport = simulator.run(simtimer, must_distribute ? distributed_state : state);
SimulatorReport fullReport = simulator.run(simtimer, must_distribute ? distributed_state : state);
if( grid->comm().rank()==0 )
{
std::cout << "\n\n================ End of simulation ===============\n\n";
fullReport.reportFullyImplicit(std::cout);
}
if( grid->comm().rank()==0 )
{
std::cout << "\n\n================ End of simulation ===============\n\n";
fullReport.reportFullyImplicit(std::cout);
}
if (output) {
std::string filename = output_dir + "/walltime.txt";
std::fstream tot_os(filename.c_str(),std::fstream::trunc | std::fstream::out);
fullReport.reportParam(tot_os);
warnIfUnusedParams(param);
if (output) {
std::string filename = output_dir + "/walltime.txt";
std::fstream tot_os(filename.c_str(),std::fstream::trunc | std::fstream::out);
fullReport.reportParam(tot_os);
warnIfUnusedParams(param);
}
} else {
outputWriter.writeInit( simtimer );
std::cout << "\n\n================ Simulation turned off ===============\n" << std::flush;
}
}
catch (const std::exception &e) {