Rerun UDQ Assignments After Action Processing
If an action block happens to run a UDQ ASSIGN operation and, furthermore, happens to run at the last time step of an episode then the "clear pending assignments" behaviour of the ScheduleState copy constructor leads to not performing the UDQ assignment at all. This PR works around this problem by invoking the action handler's UDQ assignment function after processing all active action blocks.
The underlying problem has been present since at least PR OPM/opm-common#3587 which introduced the "clear pending assignments" behaviour of ScheduleState's copy constructor.
While here, also make a few whitespace adjustments to FlowProblem::endTimeStep() to be more consistent with the rest of the implementation.
jenkins build this please
jenkins build this please
jenkins build this please
jenkins build this please
The call
this->actionHandler_.evalUDQAssignments(...)in beginTimeStep will only have any effect on the first time step of an episode
You're probably thinking of this statement. That's triggered from beginEpisode() I think, and not from beginTimeStep(). That said,
are they run twice now?
Even if they were, that's where we get a bit of protection from the pending assignment structure in the UDConfig class. Every time we complete a round of UDQ assignments, we clear the list of pending assignments meaning if there are no new UDQ ASSIGN operations triggered between the end of the previous timestep and the start of the next, then we won't actually trigger the assignment twice.