Remove static local variables from Mesh::hasBndry*Y#3209
Conversation
Fixes #3160 Didn't strictly need to make these virtual, but given they need to be calculated after `load`, this was probably the easiest way of achieving this
There was a problem hiding this comment.
Should we add some checks to ensure that the result is valid, before we return it?
I would be fine with it being CHECK4() - but that might catch a future use before it is set.
Without being virtual, this function should get inlined by the compiler. Do you see a use where it is not sufficient to set has_boundary_upper_y?
edit: we would need to move that from BoutMesh to Mesh - which seems fine?
|
Well, it could only get inlined with LTO as the definition was in the I'm not sure what check would be required? If we've called |
dschwoerer
left a comment
There was a problem hiding this comment.
Now that the heavy lifting is in the load part, it could make sense to put it in the header.
It certainly does not make things worse, so I am happy to merge it as it, I just thought if we allow for more inlineing, that would be a good thing.
|
Yes, I agree! The mesh situation is a bit of mess, we could remove the subclass, and just have |
Fixes #3160
Didn't strictly need to make these virtual, but given they need to be calculated
after
load, this was probably the easiest way of achieving this