-
Notifications
You must be signed in to change notification settings - Fork 63
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
Simplify HY_Features_MPI via subclassing #668
base: master
Are you sure you want to change the base?
Conversation
5e4a9bc
to
8250d1f
Compare
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.
Looks good
std::unordered_map<std::string, std::shared_ptr<HY_Catchment>> _catchments; | ||
std::unordered_map<std::string, std::shared_ptr<HY_PointHydroNexusRemote>> _nexuses; |
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.
Since this class now inherits from HY_Features
, shouldn't these be protected in that class and these removed? I think this shadows those variables, but there are two "instances" of _catchments
in this class now IIRC, just one of them is not accessible (I could be wrong here haha)
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 missed that, only looked at the changes but this is correct.
How's the test coverage on this? Automated and/or manual? |
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.
Please change HY_Features and HY_Features_MPI so that the child class does not shadow base class variables for nexus and catchments,
Maintaining the
HY_Features_MPI
collection class as a completely independent unit seems to have lead to significant code duplication and has been the source of some errors in previous work, e.g. layers. This PR attempts to isolate the logic specific to the MPI collection and reuse the base components as much as possible.Changes
HY_Features_MPI
a true subclass ofHY_Features_MPI
and remove redundant codeChecklist
Target Environment support