本文整理汇总了C++中ThermalZone::airflowNetworkZone方法的典型用法代码示例。如果您正苦于以下问题:C++ ThermalZone::airflowNetworkZone方法的具体用法?C++ ThermalZone::airflowNetworkZone怎么用?C++ ThermalZone::airflowNetworkZone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ThermalZone
的用法示例。
在下文中一共展示了ThermalZone::airflowNetworkZone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: thermalZone
TEST_F(ModelFixture, AirflowNetwork_Zone_Basic)
{
Model model;
ThermalZone thermalZone(model);
Space space1(model);
Space space2(model);
EXPECT_FALSE(thermalZone.airflowNetworkZone());
EXPECT_FALSE(space1.thermalZone());
EXPECT_FALSE(space2.thermalZone());
EXPECT_EQ(0u, thermalZone.spaces().size());
EXPECT_TRUE(space1.setThermalZone(thermalZone));
ASSERT_TRUE(space1.thermalZone());
EXPECT_EQ(thermalZone.handle(), space1.thermalZone()->handle());
EXPECT_FALSE(space2.thermalZone());
EXPECT_EQ(1u, thermalZone.spaces().size());
ASSERT_TRUE(space1.thermalZone());
EXPECT_EQ(thermalZone.handle(), space1.thermalZone()->handle());
EXPECT_TRUE(space2.setThermalZone(thermalZone));
ASSERT_TRUE(space2.thermalZone());
EXPECT_EQ(thermalZone.handle(), space2.thermalZone()->handle());
EXPECT_EQ(2u, thermalZone.spaces().size());
auto zone = thermalZone.getAirflowNetworkZone();
auto optzone = thermalZone.airflowNetworkZone();
ASSERT_TRUE(optzone);
EXPECT_EQ(zone, optzone.get());
zone.setFacadeWidth(50.0);
CurveLinear curve(model);
curve.setCoefficient1Constant(55.0);
curve.setCoefficient2x(0.0);
AirflowNetworkOccupantVentilationControl ovc(model, curve);
EXPECT_FALSE(zone.occupantVentilationControl());
EXPECT_TRUE(zone.setOccupantVentilationControl(ovc));
ASSERT_TRUE(zone.occupantVentilationControl());
EXPECT_EQ(ovc, zone.occupantVentilationControl().get());
ThermalZone thermalZoneClone = thermalZone.clone(model).cast<ThermalZone>();
optzone = thermalZoneClone.airflowNetworkZone();
ASSERT_TRUE(optzone);
EXPECT_NE(zone, optzone.get());
EXPECT_EQ(50.0, optzone.get().facadeWidth());
ASSERT_TRUE(optzone.get().occupantVentilationControl());
EXPECT_EQ(ovc, optzone.get().occupantVentilationControl().get());
}