-
Notifications
You must be signed in to change notification settings - Fork 208
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
Addresses #4380, completing SDK support of Tubular Daylighting Devices (TDDs) #4382
Conversation
…e it makes more sense there anyways + implement C# partial classes for DaylightingDeviceTubular methods that deal with ThermalZone and TransitionZone
src/energyplus/ForwardTranslator/ForwardTranslateDaylightingDeviceLightWell.cpp
Outdated
Show resolved
Hide resolved
src/energyplus/ForwardTranslator/ForwardTranslateDaylightingDeviceTubular.cpp
Outdated
Show resolved
Hide resolved
…SubSurfaceType, cleanup imports
explicit DaylightingDeviceTubular(const SubSurface& dome, const SubSurface& diffuser, const ConstructionBase& construction, double diameter, | ||
double totalLength, double effectiveThermalResistance); |
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.
This Ctor isn't needed. The one below is enough. you can call the setters for the numeric fields. If you had zero idea about providing a default for these (that's not the case since you made one where you default them), then it would have been required to make this one.
The one is tricky to use too because it's easy to mix up the order of the double arguments.
Also, that means more code to maintain and test.
That being said, if you feel strongly you find it useful, you can leave it.
src/model/SubSurface.cpp
Outdated
boost::optional<DaylightingDeviceShelf> shelf = this->daylightingDeviceShelf(); | ||
if (shelf) { | ||
if (boost::optional<DaylightingDeviceShelf> shelf = this->daylightingDeviceShelf()) { | ||
LOG(Warn, briefDescription() << " new subSurfaceType='" << subSurfaceType << "' is incompatible with Daylighting Device Shelf. Removing the Shelf object."); |
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.
FYI I changed the messages in this file @joseph-robertson
EXPECT_EQ("Door", door.subSurfaceType()); | ||
EXPECT_EQ(0, model.getConcreteModelObjects<DaylightingDeviceLightWell>().size()); | ||
|
||
EXPECT_ANY_THROW({DaylightingDeviceLightWell lightWell(door);}); |
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.
@joseph-robertson note that gtest has macros for that. EXPECT/ASSERT_ANY/NO_THROW are the most common. You could also do EXPECT_THROW(..., openstudio::Exception)
if you want a specific exception
I made minor changes to what is otherwise a nice clean PR. Will tel CI churn, then make sure the NREL/OpenStudio-resources#149 is still passing. And that this can merge |
CI Results for 503e955:
|
I'm happy about this PR. The Reg test should be adjusted but that can happen in a second pass. |
Pull request overview
DaylightingDevice:Tubular
DaylightingDevice:LightWell
SubSurface
dome.addDaylightingDeviceTubular()
anddiffuser.addDaylightingDeviceTubular()
which create default diffuser and dome objects, respectively?Pull Request Author
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.