Return geometry by value (alternative 2)#884
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.
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.