mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-30 17:40:08 -05:00
remove unused bools for looping
replace with while true. the only exit condition from these loops are explicit break statements
This commit is contained in:
1 parent
1f83780e70
commit
4d2c6e80d5
1 file changed
+2
-5
@@ -647,14 +647,13 @@ SimulatorReport
|
||||
AdaptiveTimeStepping<TypeTag>::SubStepper<Solver>::
|
||||
runStepReservoirCouplingMaster_()
|
||||
{
|
||||
bool substep_done = false;
|
||||
int iteration = 0;
|
||||
const double original_time_step = this->simulator_timer_.currentStepLength();
|
||||
double current_time{this->simulator_timer_.simulationTimeElapsed()};
|
||||
double step_end_time = current_time + original_time_step;
|
||||
auto current_step_length = original_time_step;
|
||||
SimulatorReport report;
|
||||
while(!substep_done) {
|
||||
while (true) {
|
||||
reservoirCouplingMaster_().receiveNextReportDateFromSlaves();
|
||||
if (iteration == 0) {
|
||||
maybeUpdateTuning_(current_time, current_step_length, /*substep=*/0);
|
||||
@@ -696,13 +695,12 @@ SimulatorReport
|
||||
AdaptiveTimeStepping<TypeTag>::SubStepper<Solver>::
|
||||
runStepReservoirCouplingSlave_()
|
||||
{
|
||||
bool substep_done = false;
|
||||
int iteration = 0;
|
||||
const double original_time_step = this->simulator_timer_.currentStepLength();
|
||||
double current_time{this->simulator_timer_.simulationTimeElapsed()};
|
||||
double step_end_time = current_time + original_time_step;
|
||||
SimulatorReport report;
|
||||
while(!substep_done) {
|
||||
while (true) {
|
||||
reservoirCouplingSlave_().sendNextReportDateToMasterProcess();
|
||||
auto timestep = reservoirCouplingSlave_().receiveNextTimeStepFromMaster();
|
||||
if (iteration == 0) {
|
||||
@@ -725,7 +723,6 @@ runStepReservoirCouplingSlave_()
|
||||
report += sub_steps_report;
|
||||
current_time += timestep;
|
||||
if (final_step) {
|
||||
substep_done = true;
|
||||
break;
|
||||
}
|
||||
iteration++;
|
||||
|
||||
Reference in new issue
Block a user