changed: do all advanceTracerFields in one call

by looping over the tracer batches
This commit is contained in:
Arne Morten Kvarving 2022-10-06 10:16:56 +02:00
parent a2c5ec1127
commit 2c06152086

View File

@ -172,9 +172,7 @@ public:
if (this->numTracers()==0) if (this->numTracers()==0)
return; return;
advanceTracerFields(wat_); advanceTracerFields();
advanceTracerFields(oil_);
advanceTracerFields(gas_);
} }
/*! /*!
@ -404,11 +402,11 @@ protected:
} }
} }
template <class TrRe> void advanceTracerFields()
void advanceTracerFields(TrRe & tr)
{ {
for (auto& tr : tbatch) {
if (tr.numTracer() == 0) if (tr.numTracer() == 0)
return; continue;
// Note that we solve for a concentration update (compared to previous time step) // Note that we solve for a concentration update (compared to previous time step)
// Confer also assembleTracerEquations_(...) above. // Confer also assembleTracerEquations_(...) above.
@ -471,6 +469,7 @@ protected:
} }
} }
} }
}
Simulator& simulator_; Simulator& simulator_;