src/model/SurfacePropertyConvectionCoefficients.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /*********************************************************************************************************************** | ||
| 2 | * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC. | ||
| 3 | * See also https://openstudio.net/license | ||
| 4 | ***********************************************************************************************************************/ | ||
| 5 | |||
| 6 | #include "SurfacePropertyConvectionCoefficients.hpp" | ||
| 7 | #include "SurfacePropertyConvectionCoefficients_Impl.hpp" | ||
| 8 | |||
| 9 | #include "Model.hpp" | ||
| 10 | #include "Model_Impl.hpp" | ||
| 11 | #include "Surface.hpp" | ||
| 12 | #include "Surface_Impl.hpp" | ||
| 13 | #include "SubSurface.hpp" | ||
| 14 | #include "SubSurface_Impl.hpp" | ||
| 15 | #include "InternalMass.hpp" | ||
| 16 | #include "InternalMass_Impl.hpp" | ||
| 17 | #include "Schedule.hpp" | ||
| 18 | #include "Schedule_Impl.hpp" | ||
| 19 | |||
| 20 | #include <utilities/idd/IddFactory.hxx> | ||
| 21 | #include <utilities/idd/IddEnums.hxx> | ||
| 22 | #include <utilities/idd/OS_SurfaceProperty_ConvectionCoefficients_FieldEnums.hxx> | ||
| 23 | |||
| 24 | #include "../utilities/units/Unit.hpp" | ||
| 25 | |||
| 26 | #include "../utilities/core/Assert.hpp" | ||
| 27 | |||
| 28 | namespace openstudio { | ||
| 29 | namespace model { | ||
| 30 | |||
| 31 | namespace detail { | ||
| 32 | |||
| 33 | 7 | SurfacePropertyConvectionCoefficients_Impl::SurfacePropertyConvectionCoefficients_Impl(const IdfObject& idfObject, Model_Impl* model, | |
| 34 | 7 | bool keepHandle) | |
| 35 | 7 | : ModelObject_Impl(idfObject, model, keepHandle) { | |
| 36 |
4/6✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
✓ Branch 7 taken 7 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 7 times.
✗ Branch 13 not taken.
|
7 | OS_ASSERT(idfObject.iddObject().type() == SurfacePropertyConvectionCoefficients::iddObjectType()); |
| 37 | 7 | } | |
| 38 | |||
| 39 | ✗ | SurfacePropertyConvectionCoefficients_Impl::SurfacePropertyConvectionCoefficients_Impl(const openstudio::detail::WorkspaceObject_Impl& other, | |
| 40 | ✗ | Model_Impl* model, bool keepHandle) | |
| 41 | ✗ | : ModelObject_Impl(other, model, keepHandle) { | |
| 42 | ✗ | OS_ASSERT(other.iddObject().type() == SurfacePropertyConvectionCoefficients::iddObjectType()); | |
| 43 | ✗ | } | |
| 44 | |||
| 45 | 10 | SurfacePropertyConvectionCoefficients_Impl::SurfacePropertyConvectionCoefficients_Impl(const SurfacePropertyConvectionCoefficients_Impl& other, | |
| 46 | 10 | Model_Impl* model, bool keepHandle) | |
| 47 | 10 | : ModelObject_Impl(other, model, keepHandle) {} | |
| 48 | |||
| 49 | 4 | ModelObject SurfacePropertyConvectionCoefficients_Impl::clone(Model model) const { | |
| 50 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | ModelObject result = ModelObject_Impl::clone(model); |
| 51 | |||
| 52 |
1/1✓ Branch 1 taken 4 times.
|
4 | Model m = this->model(); |
| 53 |
2/3✓ Branch 1 taken 4 times.
✓ Branch 3 taken 4 times.
✗ Branch 4 not taken.
|
4 | if (model == m) { |
| 54 | // cloned into same model, erase reference to parent | ||
| 55 | // this object is now invalid but having two objects point to same surface would also be invalid | ||
| 56 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
12 | result.setString(OS_SurfaceProperty_ConvectionCoefficientsFields::SurfaceName, ""); |
| 57 | } | ||
| 58 | |||
| 59 | 8 | return result; | |
| 60 | 4 | } | |
| 61 | |||
| 62 | ✗ | const std::vector<std::string>& SurfacePropertyConvectionCoefficients_Impl::outputVariableNames() const { | |
| 63 | ✗ | static const std::vector<std::string> result; | |
| 64 | ✗ | return result; | |
| 65 | } | ||
| 66 | |||
| 67 | ✗ | IddObjectType SurfacePropertyConvectionCoefficients_Impl::iddObjectType() const { | |
| 68 | ✗ | return SurfacePropertyConvectionCoefficients::iddObjectType(); | |
| 69 | } | ||
| 70 | |||
| 71 | 13 | bool SurfacePropertyConvectionCoefficients_Impl::setSurface(const ModelObject& surface) { | |
| 72 | 13 | boost::optional<SurfacePropertyConvectionCoefficients> currentCoef; | |
| 73 |
1/1✓ Branch 1 taken 13 times.
|
13 | OptionalSurface surfaceSurface = surface.optionalCast<Surface>(); |
| 74 |
1/1✓ Branch 1 taken 13 times.
|
13 | OptionalSubSurface surfaceSubSurface = surface.optionalCast<SubSurface>(); |
| 75 |
1/1✓ Branch 1 taken 13 times.
|
13 | OptionalInternalMass surfaceInternalMass = surface.optionalCast<InternalMass>(); |
| 76 |
2/2✓ Branch 0 taken 6 times.
✓ Branch 1 taken 7 times.
|
13 | if (surfaceSurface) { |
| 77 |
2/2✓ Branch 1 taken 6 times.
✓ Branch 4 taken 6 times.
|
6 | currentCoef = surfaceSurface->surfacePropertyConvectionCoefficients(); |
| 78 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 4 times.
|
7 | } else if (surfaceSubSurface) { |
| 79 |
2/2✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
|
3 | currentCoef = surfaceSubSurface->surfacePropertyConvectionCoefficients(); |
| 80 | } else { | ||
| 81 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
|
4 | OS_ASSERT(surfaceInternalMass); |
| 82 |
2/2✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
|
4 | currentCoef = surfaceInternalMass->surfacePropertyConvectionCoefficients(); |
| 83 | } | ||
| 84 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 13 times.
|
13 | if (currentCoef) { |
| 85 | ✗ | if (currentCoef->handle() == this->handle()) { | |
| 86 | ✗ | return true; | |
| 87 | } | ||
| 88 | ✗ | currentCoef->remove(); | |
| 89 | } | ||
| 90 |
2/2✓ Branch 1 taken 13 times.
✓ Branch 4 taken 13 times.
|
13 | return setPointer(OS_SurfaceProperty_ConvectionCoefficientsFields::SurfaceName, surface.handle()); |
| 91 | 13 | } | |
| 92 | |||
| 93 | 7 | ModelObject SurfacePropertyConvectionCoefficients_Impl::surfaceAsModelObject() const { | |
| 94 | 7 | boost::optional<ModelObject> surfaceObj; | |
| 95 |
2/2✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
|
7 | surfaceObj = getObject<ModelObject>().getModelObjectTarget<ModelObject>(OS_SurfaceProperty_ConvectionCoefficientsFields::SurfaceName); |
| 96 |
1/3✗ Branch 1 not taken.
✓ Branch 2 taken 7 times.
✗ Branch 4 not taken.
|
7 | OS_ASSERT(surfaceObj); |
| 97 |
2/2✓ Branch 1 taken 7 times.
✓ Branch 4 taken 7 times.
|
14 | return *surfaceObj; |
| 98 | 7 | } | |
| 99 | |||
| 100 | 27 | boost::optional<Surface> SurfacePropertyConvectionCoefficients_Impl::surfaceAsSurface() const { | |
| 101 |
2/2✓ Branch 1 taken 27 times.
✓ Branch 4 taken 27 times.
|
27 | return getObject<ModelObject>().getModelObjectTarget<Surface>(OS_SurfaceProperty_ConvectionCoefficientsFields::SurfaceName); |
| 102 | } | ||
| 103 | |||
| 104 | 11 | boost::optional<SubSurface> SurfacePropertyConvectionCoefficients_Impl::surfaceAsSubSurface() const { | |
| 105 |
2/2✓ Branch 1 taken 11 times.
✓ Branch 4 taken 11 times.
|
11 | return getObject<ModelObject>().getModelObjectTarget<SubSurface>(OS_SurfaceProperty_ConvectionCoefficientsFields::SurfaceName); |
| 106 | } | ||
| 107 | |||
| 108 | 14 | boost::optional<InternalMass> SurfacePropertyConvectionCoefficients_Impl::surfaceAsInternalMass() const { | |
| 109 |
2/2✓ Branch 1 taken 14 times.
✓ Branch 4 taken 14 times.
|
14 | return getObject<ModelObject>().getModelObjectTarget<InternalMass>(OS_SurfaceProperty_ConvectionCoefficientsFields::SurfaceName); |
| 110 | } | ||
| 111 | |||
| 112 | 6 | boost::optional<std::string> SurfacePropertyConvectionCoefficients_Impl::convectionCoefficient1Location() const { | |
| 113 | 6 | return getString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1Location, true, true); | |
| 114 | } | ||
| 115 | |||
| 116 | 7 | boost::optional<std::string> SurfacePropertyConvectionCoefficients_Impl::convectionCoefficient1Type() const { | |
| 117 | 7 | return getString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1Type, true, true); | |
| 118 | } | ||
| 119 | |||
| 120 | 5 | boost::optional<double> SurfacePropertyConvectionCoefficients_Impl::convectionCoefficient1() const { | |
| 121 | 5 | return getDouble(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1, true); | |
| 122 | } | ||
| 123 | |||
| 124 | 5 | boost::optional<Schedule> SurfacePropertyConvectionCoefficients_Impl::convectionCoefficient1Schedule() const { | |
| 125 |
1/1✓ Branch 1 taken 5 times.
|
10 | return getObject<ModelObject>().getModelObjectTarget<Schedule>( |
| 126 |
1/1✓ Branch 1 taken 5 times.
|
10 | OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1ScheduleName); |
| 127 | } | ||
| 128 | |||
| 129 | 6 | boost::optional<std::string> SurfacePropertyConvectionCoefficients_Impl::convectionCoefficient2Location() const { | |
| 130 | 6 | return getString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2Location, true, true); | |
| 131 | } | ||
| 132 | |||
| 133 | 7 | boost::optional<std::string> SurfacePropertyConvectionCoefficients_Impl::convectionCoefficient2Type() const { | |
| 134 | 7 | return getString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2Type, true, true); | |
| 135 | } | ||
| 136 | |||
| 137 | 5 | boost::optional<double> SurfacePropertyConvectionCoefficients_Impl::convectionCoefficient2() const { | |
| 138 | 5 | return getDouble(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2, true); | |
| 139 | } | ||
| 140 | |||
| 141 | 5 | boost::optional<Schedule> SurfacePropertyConvectionCoefficients_Impl::convectionCoefficient2Schedule() const { | |
| 142 |
1/1✓ Branch 1 taken 5 times.
|
10 | return getObject<ModelObject>().getModelObjectTarget<Schedule>( |
| 143 |
1/1✓ Branch 1 taken 5 times.
|
10 | OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2ScheduleName); |
| 144 | } | ||
| 145 | |||
| 146 | 4 | bool SurfacePropertyConvectionCoefficients_Impl::setConvectionCoefficient1Location(const std::string& convectionCoefficient1Location) { | |
| 147 | 4 | bool result = setString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1Location, convectionCoefficient1Location); | |
| 148 | 4 | return result; | |
| 149 | } | ||
| 150 | |||
| 151 | 1 | void SurfacePropertyConvectionCoefficients_Impl::resetConvectionCoefficient1Location() { | |
| 152 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1Location, ""); |
| 153 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 154 | 1 | } | |
| 155 | |||
| 156 | 5 | bool SurfacePropertyConvectionCoefficients_Impl::setConvectionCoefficient1Type(const std::string& convectionCoefficient1Type) { | |
| 157 | 5 | bool result = setString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1Type, convectionCoefficient1Type); | |
| 158 | 5 | return result; | |
| 159 | } | ||
| 160 | |||
| 161 | 1 | void SurfacePropertyConvectionCoefficients_Impl::resetConvectionCoefficient1Type() { | |
| 162 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1Type, ""); |
| 163 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 164 | 1 | } | |
| 165 | |||
| 166 | 3 | bool SurfacePropertyConvectionCoefficients_Impl::setConvectionCoefficient1(double convectionCoefficient1) { | |
| 167 | 3 | return setDouble(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1, convectionCoefficient1); | |
| 168 | } | ||
| 169 | |||
| 170 | 1 | void SurfacePropertyConvectionCoefficients_Impl::resetConvectionCoefficient1() { | |
| 171 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1, ""); |
| 172 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 173 | 1 | } | |
| 174 | |||
| 175 | 1 | bool SurfacePropertyConvectionCoefficients_Impl::setConvectionCoefficient1Schedule(Schedule& schedule) { | |
| 176 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
4 | bool result = setSchedule(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1ScheduleName, |
| 177 | "SurfacePropertyConvectionCoefficients", "Convection Coefficient 1", schedule); | ||
| 178 | 1 | return result; | |
| 179 | } | ||
| 180 | |||
| 181 | 1 | void SurfacePropertyConvectionCoefficients_Impl::resetConvectionCoefficient1Schedule() { | |
| 182 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1ScheduleName, ""); |
| 183 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 184 | 1 | } | |
| 185 | |||
| 186 | 4 | bool SurfacePropertyConvectionCoefficients_Impl::setConvectionCoefficient2Location(const std::string& convectionCoefficient2Location) { | |
| 187 | 4 | return setString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2Location, convectionCoefficient2Location); | |
| 188 | } | ||
| 189 | |||
| 190 | 1 | void SurfacePropertyConvectionCoefficients_Impl::resetConvectionCoefficient2Location() { | |
| 191 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2Location, ""); |
| 192 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 193 | 1 | } | |
| 194 | |||
| 195 | 5 | bool SurfacePropertyConvectionCoefficients_Impl::setConvectionCoefficient2Type(const std::string& convectionCoefficient2Type) { | |
| 196 | 5 | return setString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2Type, convectionCoefficient2Type); | |
| 197 | } | ||
| 198 | |||
| 199 | 1 | void SurfacePropertyConvectionCoefficients_Impl::resetConvectionCoefficient2Type() { | |
| 200 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2Type, ""); |
| 201 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 202 | 1 | } | |
| 203 | |||
| 204 | 1 | bool SurfacePropertyConvectionCoefficients_Impl::setConvectionCoefficient2(double convectionCoefficient2) { | |
| 205 | 1 | return setDouble(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2, convectionCoefficient2); | |
| 206 | } | ||
| 207 | |||
| 208 | 1 | void SurfacePropertyConvectionCoefficients_Impl::resetConvectionCoefficient2() { | |
| 209 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2, ""); |
| 210 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 211 | 1 | } | |
| 212 | |||
| 213 | 3 | bool SurfacePropertyConvectionCoefficients_Impl::setConvectionCoefficient2Schedule(Schedule& schedule) { | |
| 214 |
3/3✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
|
12 | bool result = setSchedule(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2ScheduleName, |
| 215 | "SurfacePropertyConvectionCoefficients", "Convection Coefficient 2", schedule); | ||
| 216 | 3 | return result; | |
| 217 | } | ||
| 218 | |||
| 219 | 1 | void SurfacePropertyConvectionCoefficients_Impl::resetConvectionCoefficient2Schedule() { | |
| 220 |
2/2✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
|
2 | bool result = setString(OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2ScheduleName, ""); |
| 221 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
|
1 | OS_ASSERT(result); |
| 222 | 1 | } | |
| 223 | |||
| 224 | } // namespace detail | ||
| 225 | |||
| 226 | 4 | SurfacePropertyConvectionCoefficients::SurfacePropertyConvectionCoefficients(const Surface& surface) | |
| 227 |
3/3✓ Branch 1 taken 4 times.
✓ Branch 4 taken 4 times.
✓ Branch 7 taken 4 times.
|
4 | : ModelObject(SurfacePropertyConvectionCoefficients::iddObjectType(), surface.model()) { |
| 228 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 4 times.
✗ Branch 5 not taken.
|
4 | OS_ASSERT(getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()); |
| 229 |
1/1✓ Branch 1 taken 4 times.
|
4 | setSurface(surface); |
| 230 | 4 | } | |
| 231 | |||
| 232 | 1 | SurfacePropertyConvectionCoefficients::SurfacePropertyConvectionCoefficients(const SubSurface& surface) | |
| 233 |
3/3✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
|
1 | : ModelObject(SurfacePropertyConvectionCoefficients::iddObjectType(), surface.model()) { |
| 234 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 1 time.
✗ Branch 5 not taken.
|
1 | OS_ASSERT(getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()); |
| 235 |
1/1✓ Branch 1 taken 1 time.
|
1 | setSurface(surface); |
| 236 | 1 | } | |
| 237 | |||
| 238 | 2 | SurfacePropertyConvectionCoefficients::SurfacePropertyConvectionCoefficients(const InternalMass& surface) | |
| 239 |
3/3✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
|
2 | : ModelObject(SurfacePropertyConvectionCoefficients::iddObjectType(), surface.model()) { |
| 240 |
1/3✗ Branch 2 not taken.
✓ Branch 3 taken 2 times.
✗ Branch 5 not taken.
|
2 | OS_ASSERT(getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()); |
| 241 |
1/1✓ Branch 1 taken 2 times.
|
2 | setSurface(surface); |
| 242 | 2 | } | |
| 243 | |||
| 244 | 15028 | IddObjectType SurfacePropertyConvectionCoefficients::iddObjectType() { | |
| 245 |
1/1✓ Branch 1 taken 15028 times.
|
15028 | return {IddObjectType::OS_SurfaceProperty_ConvectionCoefficients}; |
| 246 | } | ||
| 247 | |||
| 248 | 7 | ModelObject SurfacePropertyConvectionCoefficients::surfaceAsModelObject() const { | |
| 249 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<ImplType>()->surfaceAsModelObject(); |
| 250 | } | ||
| 251 | |||
| 252 | 27 | boost::optional<Surface> SurfacePropertyConvectionCoefficients::surfaceAsSurface() const { | |
| 253 |
1/1✓ Branch 3 taken 27 times.
|
27 | return getImpl<ImplType>()->surfaceAsSurface(); |
| 254 | } | ||
| 255 | |||
| 256 | 11 | boost::optional<SubSurface> SurfacePropertyConvectionCoefficients::surfaceAsSubSurface() const { | |
| 257 |
1/1✓ Branch 3 taken 11 times.
|
11 | return getImpl<ImplType>()->surfaceAsSubSurface(); |
| 258 | } | ||
| 259 | |||
| 260 | 14 | boost::optional<InternalMass> SurfacePropertyConvectionCoefficients::surfaceAsInternalMass() const { | |
| 261 |
1/1✓ Branch 3 taken 14 times.
|
14 | return getImpl<ImplType>()->surfaceAsInternalMass(); |
| 262 | } | ||
| 263 | |||
| 264 | 13 | bool SurfacePropertyConvectionCoefficients::setSurface(const ModelObject& surface) { | |
| 265 |
1/1✓ Branch 3 taken 13 times.
|
13 | return getImpl<ImplType>()->setSurface(surface); |
| 266 | } | ||
| 267 | |||
| 268 | 1 | std::vector<std::string> SurfacePropertyConvectionCoefficients::convectionCoefficient1LocationValues() { | |
| 269 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
2 | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), |
| 270 |
1/1✓ Branch 1 taken 1 time.
|
2 | OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1Location); |
| 271 | } | ||
| 272 | |||
| 273 | 1 | std::vector<std::string> SurfacePropertyConvectionCoefficients::convectionCoefficient1TypeValues() { | |
| 274 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
2 | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), |
| 275 |
1/1✓ Branch 1 taken 1 time.
|
2 | OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient1Type); |
| 276 | } | ||
| 277 | |||
| 278 | 1 | std::vector<std::string> SurfacePropertyConvectionCoefficients::convectionCoefficient2LocationValues() { | |
| 279 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
2 | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), |
| 280 |
1/1✓ Branch 1 taken 1 time.
|
2 | OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2Location); |
| 281 | } | ||
| 282 | |||
| 283 | 1 | std::vector<std::string> SurfacePropertyConvectionCoefficients::convectionCoefficient2TypeValues() { | |
| 284 |
4/4✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
|
2 | return getIddKeyNames(IddFactory::instance().getObject(iddObjectType()).get(), |
| 285 |
1/1✓ Branch 1 taken 1 time.
|
2 | OS_SurfaceProperty_ConvectionCoefficientsFields::ConvectionCoefficient2Type); |
| 286 | } | ||
| 287 | |||
| 288 | 6 | boost::optional<std::string> SurfacePropertyConvectionCoefficients::convectionCoefficient1Location() const { | |
| 289 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->convectionCoefficient1Location(); |
| 290 | } | ||
| 291 | |||
| 292 | 7 | boost::optional<std::string> SurfacePropertyConvectionCoefficients::convectionCoefficient1Type() const { | |
| 293 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->convectionCoefficient1Type(); |
| 294 | } | ||
| 295 | |||
| 296 | 5 | boost::optional<double> SurfacePropertyConvectionCoefficients::convectionCoefficient1() const { | |
| 297 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->convectionCoefficient1(); |
| 298 | } | ||
| 299 | |||
| 300 | 5 | boost::optional<Schedule> SurfacePropertyConvectionCoefficients::convectionCoefficient1Schedule() const { | |
| 301 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->convectionCoefficient1Schedule(); |
| 302 | } | ||
| 303 | |||
| 304 | 6 | boost::optional<std::string> SurfacePropertyConvectionCoefficients::convectionCoefficient2Location() const { | |
| 305 |
1/1✓ Branch 3 taken 6 times.
|
6 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->convectionCoefficient2Location(); |
| 306 | } | ||
| 307 | |||
| 308 | 7 | boost::optional<std::string> SurfacePropertyConvectionCoefficients::convectionCoefficient2Type() const { | |
| 309 |
1/1✓ Branch 3 taken 7 times.
|
7 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->convectionCoefficient2Type(); |
| 310 | } | ||
| 311 | |||
| 312 | 5 | boost::optional<double> SurfacePropertyConvectionCoefficients::convectionCoefficient2() const { | |
| 313 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->convectionCoefficient2(); |
| 314 | } | ||
| 315 | |||
| 316 | 5 | boost::optional<Schedule> SurfacePropertyConvectionCoefficients::convectionCoefficient2Schedule() const { | |
| 317 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->convectionCoefficient2Schedule(); |
| 318 | } | ||
| 319 | |||
| 320 | 4 | bool SurfacePropertyConvectionCoefficients::setConvectionCoefficient1Location(const std::string& convectionCoefficient1Location) { | |
| 321 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->setConvectionCoefficient1Location(convectionCoefficient1Location); |
| 322 | } | ||
| 323 | |||
| 324 | 1 | void SurfacePropertyConvectionCoefficients::resetConvectionCoefficient1Location() { | |
| 325 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->resetConvectionCoefficient1Location(); |
| 326 | 1 | } | |
| 327 | |||
| 328 | 5 | bool SurfacePropertyConvectionCoefficients::setConvectionCoefficient1Type(const std::string& convectionCoefficient1Type) { | |
| 329 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->setConvectionCoefficient1Type(convectionCoefficient1Type); |
| 330 | } | ||
| 331 | |||
| 332 | 1 | void SurfacePropertyConvectionCoefficients::resetConvectionCoefficient1Type() { | |
| 333 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->resetConvectionCoefficient1Type(); |
| 334 | 1 | } | |
| 335 | |||
| 336 | 3 | bool SurfacePropertyConvectionCoefficients::setConvectionCoefficient1(double convectionCoefficient1) { | |
| 337 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->setConvectionCoefficient1(convectionCoefficient1); |
| 338 | } | ||
| 339 | |||
| 340 | 1 | void SurfacePropertyConvectionCoefficients::resetConvectionCoefficient1() { | |
| 341 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->resetConvectionCoefficient1(); |
| 342 | 1 | } | |
| 343 | |||
| 344 | 1 | bool SurfacePropertyConvectionCoefficients::setConvectionCoefficient1Schedule(Schedule& schedule) { | |
| 345 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->setConvectionCoefficient1Schedule(schedule); |
| 346 | } | ||
| 347 | |||
| 348 | 1 | void SurfacePropertyConvectionCoefficients::resetConvectionCoefficient1Schedule() { | |
| 349 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->resetConvectionCoefficient1Schedule(); |
| 350 | 1 | } | |
| 351 | |||
| 352 | 4 | bool SurfacePropertyConvectionCoefficients::setConvectionCoefficient2Location(const std::string& convectionCoefficient2Location) { | |
| 353 |
1/1✓ Branch 3 taken 4 times.
|
4 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->setConvectionCoefficient2Location(convectionCoefficient2Location); |
| 354 | } | ||
| 355 | |||
| 356 | 1 | void SurfacePropertyConvectionCoefficients::resetConvectionCoefficient2Location() { | |
| 357 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->resetConvectionCoefficient2Location(); |
| 358 | 1 | } | |
| 359 | |||
| 360 | 5 | bool SurfacePropertyConvectionCoefficients::setConvectionCoefficient2Type(const std::string& convectionCoefficient2Type) { | |
| 361 |
1/1✓ Branch 3 taken 5 times.
|
5 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->setConvectionCoefficient2Type(convectionCoefficient2Type); |
| 362 | } | ||
| 363 | |||
| 364 | 1 | void SurfacePropertyConvectionCoefficients::resetConvectionCoefficient2Type() { | |
| 365 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->resetConvectionCoefficient2Type(); |
| 366 | 1 | } | |
| 367 | |||
| 368 | 1 | bool SurfacePropertyConvectionCoefficients::setConvectionCoefficient2(double convectionCoefficient2) { | |
| 369 |
1/1✓ Branch 3 taken 1 time.
|
1 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->setConvectionCoefficient2(convectionCoefficient2); |
| 370 | } | ||
| 371 | |||
| 372 | 1 | void SurfacePropertyConvectionCoefficients::resetConvectionCoefficient2() { | |
| 373 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->resetConvectionCoefficient2(); |
| 374 | 1 | } | |
| 375 | |||
| 376 | 3 | bool SurfacePropertyConvectionCoefficients::setConvectionCoefficient2Schedule(Schedule& schedule) { | |
| 377 |
1/1✓ Branch 3 taken 3 times.
|
3 | return getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->setConvectionCoefficient2Schedule(schedule); |
| 378 | } | ||
| 379 | |||
| 380 | 1 | void SurfacePropertyConvectionCoefficients::resetConvectionCoefficient2Schedule() { | |
| 381 |
1/1✓ Branch 3 taken 1 time.
|
1 | getImpl<detail::SurfacePropertyConvectionCoefficients_Impl>()->resetConvectionCoefficient2Schedule(); |
| 382 | 1 | } | |
| 383 | |||
| 384 | /// @cond | ||
| 385 | 49 | SurfacePropertyConvectionCoefficients::SurfacePropertyConvectionCoefficients( | |
| 386 | 49 | std::shared_ptr<detail::SurfacePropertyConvectionCoefficients_Impl> impl) | |
| 387 |
1/1✓ Branch 3 taken 49 times.
|
49 | : ModelObject(std::move(impl)) {} |
| 388 | /// @endcond | ||
| 389 | |||
| 390 | } // namespace model | ||
| 391 | } // namespace openstudio | ||
| 392 |