-
Notifications
You must be signed in to change notification settings - Fork 78
Return geometry by value (alternative 2) #884
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
b5e8c50
to
70e8f26
Compare
jenkins build this serial please |
assert(allcorners_ && cor_idx_); | ||
return (allcorners_->data())[cor_idx_[cor]].center(); | ||
return std::visit( | ||
Dune::overload( |
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 just noticed that there exists Opm::VisitorOverloadSet
too. Is there a reason for choosing one or the other?
70e8f26
to
989459e
Compare
jenkins build this serial please |
989459e
to
58276c4
Compare
jenkins build this serial please |
benchmark please |
Benchmark results did not get posted back here. I am on it. |
benchmark please |
Manually posting results from run on July 9:
View result details @ https://ytelses.com/opm/?page=result&id=2816 |
Benchmark result overview:
View result details @ https://www.ytelses.com/opm/?page=result&id=2823 |
58276c4
to
c2c18c1
Compare
jenkins build this serial please |
This is to conform with the dune interface
To avoid copying a shared pointer, which is rather costly, the geometry now stores a variant holding either the ownership or a non-owning view to the entity variable. In the case of entity variables owned by the grid, a non-owning storage is fine as the geometry should not outlive the grid. On grid refinement the grid points are only owned by the geometry, so a move into the geometry is preferred.
c2c18c1
to
f2e1a87
Compare
jenkins build this serial please |
To avoid copying a shared pointer, which is rather costly, the geometry now stores a variant holding either the ownership or a non-owning view to the entity variable. In the case of entity variables owned by the grid, a non-owning storage is fine as the geometry should not outlive the grid. On grid refinement the grid points are only owned by the geometry, so a move into the geometry is preferred.
Note that this PR is based on #885 which fixes all the lifetime issues of the geometry objects.