-
Notifications
You must be signed in to change notification settings - Fork 113
Return group/well potentials from GuideRate object #4567
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 |
jenkins build this please |
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
jenkins build this please |
jenkins build this opm-simulators=6170 please |
Add a helper method to return group/well potentials. This is to be used by the reservoir coupling code in opm-simulators.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
jenkins build this opm-simulators=6170 please |
1 similar comment
jenkins build this opm-simulators=6170 please |
if (!this->hasPotentials(name)) { | ||
auto message = fmt::format("Potentials for '{}' do not exist.", name); | ||
throw std::logic_error {message}; | ||
} | ||
return this->potentials.at(name); | ||
} |
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.
You are triggering two searches here: one in hasPotentials and the other one ins at
. In addition there is double error handling as at
does another check.
If you want the better error message then we could do:
if (!this->hasPotentials(name)) { | |
auto message = fmt::format("Potentials for '{}' do not exist.", name); | |
throw std::logic_error {message}; | |
} | |
return this->potentials.at(name); | |
} | |
if (const auto candidate = this->potentials.find(name); candidate == this->potentials.end()) { | |
auto message = fmt::format("Potentials for '{}' do not exist.", name); | |
throw std::logic_error {message}; | |
} else { | |
return candidate->second; | |
} | |
} |
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.
The failing test mpi.compareECLFiles_flow+MOD4_UDQ_ACTIONX is strange.
At least this PR seems innocent.
jenkins build this opm-simulators=6170 serial please |
It seems like compilation in serial is broken for the opm-simulator part. |
Add a helper method to return group/well potentials. This is to be used by the reservoir coupling code in opm-simulators, see OPM/opm-simulators#6170