In sim_2p_incomp, avoid running everything twice.

There were loops (over all timesteps) both in the
main() function and the simulator class.

Note:
This simulator cannot properly handle changing
well configurations, and will now use only the
initial configuration (first report step), instead
of possibly crashing later.
This commit is contained in:
Atgeirr Flø Rasmussen 2015-10-21 15:28:27 +02:00
parent d460952d08
commit 62f59fa624

View File

@ -249,15 +249,17 @@ try
// Use timer for last epoch to obtain total time. // Use timer for last epoch to obtain total time.
simtimer.init(timeMap); simtimer.init(timeMap);
const double total_time = simtimer.totalTime(); const double total_time = simtimer.totalTime();
for (size_t reportStepIdx = 0; reportStepIdx < timeMap->numTimesteps(); ++reportStepIdx) { // for (size_t reportStepIdx = 0; reportStepIdx < timeMap->numTimesteps(); ++reportStepIdx) {
size_t reportStepIdx = 0; // Only handle a single, unchanging well setup.
{
// Update the timer. // Update the timer.
simtimer.setCurrentStepNum(step); simtimer.setCurrentStepNum(step);
simtimer.setTotalTime(total_time); simtimer.setTotalTime(total_time);
// Report on start of report step. // Report on start of report step.
std::cout << "\n\n-------------- Starting report step " << reportStepIdx << " --------------" // std::cout << "\n\n-------------- Starting report step " << reportStepIdx << " --------------"
<< "\n (number of time steps: " // << "\n (number of time steps: "
<< simtimer.numSteps() - step << ")\n\n" << std::flush; // << simtimer.numSteps() - step << ")\n\n" << std::flush;
// Create new wells, well_state // Create new wells, well_state
WellsManager wells(eclipseState , reportStepIdx , *grid->c_grid(), props->permeability()); WellsManager wells(eclipseState , reportStepIdx , *grid->c_grid(), props->permeability());