Merge pull request #5714 from bska/chase-udqconfig-api-update

Chase API Update of UDQConfig's Evaluation Functions
This commit is contained in:
Bård Skaflestad 2024-11-06 11:13:48 +01:00 committed by GitHub
commit faa485b9bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 17 deletions

View File

@ -289,14 +289,11 @@ void ActionHandler<Scalar>::
evalUDQAssignments(const unsigned episodeIdx,
UDQState& udq_state)
{
const auto& udq = schedule_[episodeIdx].udq();
udq.eval_assign(episodeIdx,
this->schedule_,
this->schedule_.wellMatcher(episodeIdx),
this->schedule_.segmentMatcherFactory(episodeIdx),
this->summaryState_,
udq_state);
this->schedule_[episodeIdx].udq()
.eval_assign(this->schedule_.wellMatcher(episodeIdx),
this->schedule_.segmentMatcherFactory(episodeIdx),
this->summaryState_,
udq_state);
}
template class ActionHandler<double>;

View File

@ -677,7 +677,6 @@ evalSummary(const int reportStepNum,
this->schedule_.getUDQConfig(udq_step)
.eval(udq_step,
this->schedule_,
this->schedule_.wellMatcher(udq_step),
this->schedule_.segmentMatcherFactory(udq_step),
[es = std::cref(this->eclState_)]() {

View File

@ -462,9 +462,12 @@ public:
.applyActions(episodeIdx, simulator.time() + simulator.timeStepSize(),
[this](const bool global)
{
using TransUpdateQuantities = typename Vanguard::TransmissibilityType::TransUpdateQuantities;
using TransUpdateQuantities = typename
Vanguard::TransmissibilityType::TransUpdateQuantities;
this->transmissibilities_
.update(global, TransUpdateQuantities::All, [&vg = this->simulator().vanguard()]
.update(global, TransUpdateQuantities::All,
[&vg = this->simulator().vanguard()]
(const unsigned int i)
{
return vg.gridIdxToEquilGridIdx(i);
@ -482,15 +485,15 @@ public:
MICPModule::checkCloggingMICP(model, phi, globalDofIdx);
}
}
}
/*!
* \brief Called by the simulator after the end of an episode.
*/
void endEpisode() override
{
OPM_TIMEBLOCK(endEpisode);
const int episodeIdx = this->episodeIndex();
// Rerun UDQ assignents following action processing on the final
// time step of this episode to make sure that any UDQ ASSIGN
// operations triggered in action blocks take effect. This is
@ -502,14 +505,15 @@ public:
// assignment would be dropped and the rest of the simulator will
// never see its effect without this hack.
this->actionHandler_
.evalUDQAssignments(episodeIdx, this->simulator().vanguard().udqState());
.evalUDQAssignments(this->episodeIndex(), this->simulator().vanguard().udqState());
FlowProblemType::endEpisode();
}
void writeReports(const SimulatorTimer& timer) {
if (enableEclOutput_){
eclWriter_->writeReports(timer);
void writeReports(const SimulatorTimer& timer)
{
if (this->enableEclOutput_) {
this->eclWriter_->writeReports(timer);
}
}