MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / setSourceZone

Method setSourceZone

src/model/ZoneMixing.cpp:147–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 }
146
147 bool ZoneMixing_Impl::setSourceZone(const ThermalZone& zone) {
148
149 auto receiving = this->zoneOrSpace();
150 // source zone cannot be the same as this zone
151 if (zone.handle() == receiving.handle()) {
152 LOG(Warn, "For " << briefDescription() << ", Source Zone cannot be the same as the Receiving Zone '" << zone.nameString() << "'.");
153 return false;
154 }
155 if (receiving.iddObjectType() != IddObjectType::OS_ThermalZone) {
156 LOG(Warn, "For " << briefDescription() << ", Receiving is a Space, so you cannot set Source as a Zone.");
157 return false;
158 }
159
160 return setPointer(OS_ZoneMixingFields::SourceZoneorSpaceName, zone.handle());
161 }
162
163 bool ZoneMixing_Impl::setSourceSpace(const Space& space) {
164 auto receiving = this->zoneOrSpace();

Callers 4

TEST_FFunction · 0.80
translateZoneMixingMethod · 0.80
TEST_FFunction · 0.80

Calls 4

zoneOrSpaceMethod · 0.95
nameStringMethod · 0.80
handleMethod · 0.45
iddObjectTypeMethod · 0.45

Tested by 2

TEST_FFunction · 0.64
TEST_FFunction · 0.64