mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-27 03:30:17 -06:00
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:
parent
29f4be0f6c
commit
6d80b5b03f
@ -249,15 +249,17 @@ try
|
||||
// Use timer for last epoch to obtain total time.
|
||||
simtimer.init(timeMap);
|
||||
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.
|
||||
simtimer.setCurrentStepNum(step);
|
||||
simtimer.setTotalTime(total_time);
|
||||
|
||||
// Report on start of report step.
|
||||
std::cout << "\n\n-------------- Starting report step " << reportStepIdx << " --------------"
|
||||
<< "\n (number of time steps: "
|
||||
<< simtimer.numSteps() - step << ")\n\n" << std::flush;
|
||||
// std::cout << "\n\n-------------- Starting report step " << reportStepIdx << " --------------"
|
||||
// << "\n (number of time steps: "
|
||||
// << simtimer.numSteps() - step << ")\n\n" << std::flush;
|
||||
|
||||
// Create new wells, well_state
|
||||
WellsManager wells(eclipseState , reportStepIdx , *grid->c_grid(), props->permeability());
|
||||
|
Loading…
Reference in New Issue
Block a user