-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Refactor Globals #7695
Refactor Globals #7695
Conversation
add defaults to struct declaration
… ep_globals.NumFans
@Myoldmopar @brianlball per discussions today, I made a design change and moved the clear_state to the header. We should think about whether this is the right path. |
@lefticus thank you very much for your support and your review. I'll try to address a few things:
Absolutely. We can include this in the current version of this branch as a prototype of limiting access to different parts of the state.
Yep, another one that will be easy and a precedent should be set. We should simply assume const until such point in the call stack that we need to modify it, and only be non-const from that point upward.
I will very much enjoy seeing the point where OutputFiles just becomes another "part" of the this new "state" of EnergyPlus. I don't think we will address it in this current branch. For this branch, we aren't adding any more new stuff to this extracted state, just going to clean up what we've already done. As you are still making your output file changes, I'd like to just leave things as-is here except what we need to do, and then we can make a single effort to get OutputFiles onto the main state in one branch. After that you can proceed to do output files and we will be able to proceed on our stuff and it shouldn't conflict too much.
That file is an artifact of the Fortran conversion and the contents of that file could almost certainly be put into better locations. But I'm not sure it's a problem either.
The SolveRoot stuff is a bit hairy so I think anything in this area should just be considered a stop-gap solution that will be remedied once we have things fully fleshed out.
Uh, good call. I wonder why the CI scripts are not finding the style problems.
Yup, agreed, we can go ahead and delete all the commented members now that we feel good about proceeding down this path. |
Uhh, CI looks exceedingly happy. 🍏 📗 🟢 💚 I think Windows took a nap, I'll try to wake him up soon, but anyway, this looks really really good. I like the latest changes where you took the advice of @lefticus and started passing in only portions of the state variable, not the whole thing. That's good stuff. |
GetFanOutletNode(Fans) getFanInNodeIndex(Fans)
GetFanSpeedRatioCurveIndex(fans)
SimZoneExhaustFan(fans) SimComponentModelFan(fans)
found some const
I am not an official reviewer, but I wanted to chime in and say that I strongly support this. This opens the door for new features that could be very exciting, including:
|
OK, this is very happy. Thanks for those who have reviewed this. Anyone have final thoughts? I'll likely merge this in the morning. |
I added a couple of review comments here and here. FYI @lefticus @Myoldmopar Other than that, "I'm @mitchute and I approve these changes." |
Top notch everyone. I'm merging this. |
Initial workspace to test moving global vars to a single location to support the upcoming reset-state work.