-
Notifications
You must be signed in to change notification settings - Fork 130
Refactor TargetCalculator #6626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
jenkins build this please |
eb6d568 to
956f23a
Compare
|
jenkins build this please |
956f23a to
e05e5ee
Compare
|
jenkins build this please |
e05e5ee to
969448b
Compare
|
jenkins build this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot. Looks good. Just a few comments.
This needs a rebase before merging.
| GroupState<Scalar> empty_group_state; | ||
| auto& group_state = solving_with_zero_rate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a reason to remove the const here. Please keep it. It might prevent unexpected changes
| const GroupStateHelperType& groupStateHelper, | ||
| DeferredLogger& deferred_logger) override; // should be const? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Indentation is a bit off.
969448b to
1056857
Compare
|
jenkins build this please |
Refactor TargetCalculator::groupTarget() to WellGroupHelper::getProductionGroupTarget(), and don't pass Group::ProductionControls as a parameter. Since TargetCalculator only works for a given group, passing control as a parameter is confusing and can be error prone if being passed a control for a different group than the TargetCalculator was constructed for.
Added a comment explaining why we cannot push a const group state to GroupStateHelper
1056857 to
823abc8
Compare
|
jenkins build this please |
Refactor
TargetCalculator::groupTarget()andInjectionTargetCalculator::groupTarget()toWellGroupHelper::getProductionGroupTarget(), andWellGroupHelper::getInjectionGroupTarget(). This will be used by reservoir coupling to compute master group targets. Also avoid passingGroup::ProductionControlsas a parameter to these methods. SinceTargetCalculatoris constructed with a single group in mind, passingcontrolas a parameter is confusing and can be error prone if being passed a control for a different group than theTargetCalculatorwas constructed for. This means thatTargetCalculatorneeds aWellGroupHelperreference, which led to a changes in 20 other files to support passing WellGroupHelper around to different methods that useTargetCalculator.