GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 85.2% 218 / 0 / 256
Functions: 93.4% 57 / 0 / 61
Branches: 52.0% 157 / 0 / 302

src/model/MaterialPropertyMoisturePenetrationDepthSettings.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 <vector>
7 #include "Material.hpp"
8 #include "Material_Impl.hpp"
9 #include "StandardOpaqueMaterial.hpp"
10 #include "StandardOpaqueMaterial_Impl.hpp"
11 #include "MasslessOpaqueMaterial.hpp"
12 #include "MasslessOpaqueMaterial_Impl.hpp"
13 #include "MaterialPropertyMoisturePenetrationDepthSettings.hpp"
14 #include "MaterialPropertyMoisturePenetrationDepthSettings_Impl.hpp"
15 #include "ModelExtensibleGroup.hpp"
16 #include "Model.hpp"
17 #include "Model_Impl.hpp"
18
19 #include <utilities/idd/IddEnums.hxx>
20 #include <utilities/idd/OS_MaterialProperty_MoisturePenetrationDepth_Settings_FieldEnums.hxx>
21
22 #include "../utilities/core/Assert.hpp"
23
24 namespace openstudio {
25 namespace model {
26
27 namespace detail {
28
29 10 MaterialPropertyMoisturePenetrationDepthSettings_Impl::MaterialPropertyMoisturePenetrationDepthSettings_Impl(const IdfObject& idfObject,
30 10 Model_Impl* model, bool keepHandle)
31 10 : ModelObject_Impl(idfObject, model, keepHandle) {
32
4/6
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
✗ Branch 10 not taken.
✓ Branch 11 taken 10 times.
✗ Branch 13 not taken.
10 OS_ASSERT(idfObject.iddObject().type() == MaterialPropertyMoisturePenetrationDepthSettings::iddObjectType());
33 10 }
34
35 ✗ MaterialPropertyMoisturePenetrationDepthSettings_Impl::MaterialPropertyMoisturePenetrationDepthSettings_Impl(
36 ✗ const openstudio::detail::WorkspaceObject_Impl& other, Model_Impl* model, bool keepHandle)
37 ✗ : ModelObject_Impl(other, model, keepHandle) {
38 ✗ OS_ASSERT(other.iddObject().type() == MaterialPropertyMoisturePenetrationDepthSettings::iddObjectType());
39 ✗ }
40
41 1 MaterialPropertyMoisturePenetrationDepthSettings_Impl::MaterialPropertyMoisturePenetrationDepthSettings_Impl(
42 1 const MaterialPropertyMoisturePenetrationDepthSettings_Impl& other, Model_Impl* model, bool keepHandle)
43 1 : ModelObject_Impl(other, model, keepHandle) {}
44
45 ✗ const std::vector<std::string>& MaterialPropertyMoisturePenetrationDepthSettings_Impl::outputVariableNames() const {
46 ✗ static const std::vector<std::string> result;
47 ✗ return result;
48 }
49
50 ✗ IddObjectType MaterialPropertyMoisturePenetrationDepthSettings_Impl::iddObjectType() const {
51 ✗ return MaterialPropertyMoisturePenetrationDepthSettings::iddObjectType();
52 }
53
54 2 std::string MaterialPropertyMoisturePenetrationDepthSettings_Impl::materialName() const {
55 boost::optional<Material> material =
56
2/2
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
2 getObject<ModelObject>().getModelObjectTarget<Material>(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MaterialName);
57
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 4 not taken.
2 OS_ASSERT(material);
58
4/4
✓ Branch 1 taken 2 times.
✓ Branch 4 taken 2 times.
✓ Branch 7 taken 2 times.
✓ Branch 10 taken 2 times.
4 return material.get().name().get();
59 2 }
60
61 3 Material MaterialPropertyMoisturePenetrationDepthSettings_Impl::material() const {
62 boost::optional<Material> material =
63
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
3 getObject<ModelObject>().getModelObjectTarget<Material>(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MaterialName);
64
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
3 OS_ASSERT(material);
65
2/2
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
6 return material.get();
66 3 }
67
68 3 double MaterialPropertyMoisturePenetrationDepthSettings_Impl::waterVaporDiffusionResistanceFactor() const {
69
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<double> value = getDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::WaterVaporDiffusionResistanceFactor);
70
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
3 OS_ASSERT(value);
71
1/1
✓ Branch 1 taken 3 times.
6 return value.get();
72 }
73
74 4 double MaterialPropertyMoisturePenetrationDepthSettings_Impl::moistureEquationCoefficientA() const {
75
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficienta);
76
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
77
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
78 }
79
80 4 double MaterialPropertyMoisturePenetrationDepthSettings_Impl::moistureEquationCoefficientB() const {
81
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficientb);
82
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
83
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
84 }
85
86 4 double MaterialPropertyMoisturePenetrationDepthSettings_Impl::moistureEquationCoefficientC() const {
87
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficientc);
88
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
89
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
90 }
91
92 4 double MaterialPropertyMoisturePenetrationDepthSettings_Impl::moistureEquationCoefficientD() const {
93
1/1
✓ Branch 1 taken 4 times.
4 boost::optional<double> value = getDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficientd);
94
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 4 times.
✗ Branch 4 not taken.
4 OS_ASSERT(value);
95
1/1
✓ Branch 1 taken 4 times.
8 return value.get();
96 }
97
98 1 std::vector<double> MaterialPropertyMoisturePenetrationDepthSettings_Impl::moistureEquationCoefficients() const {
99
1/1
✓ Branch 1 taken 1 time.
1 boost::optional<double> valuea = getDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficienta);
100
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
1 OS_ASSERT(valuea);
101
1/1
✓ Branch 1 taken 1 time.
1 boost::optional<double> valueb = getDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficientb);
102
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
1 OS_ASSERT(valueb);
103
1/1
✓ Branch 1 taken 1 time.
1 boost::optional<double> valuec = getDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficientc);
104
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
1 OS_ASSERT(valuec);
105
1/1
✓ Branch 1 taken 1 time.
1 boost::optional<double> valued = getDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficientd);
106
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 4 not taken.
1 OS_ASSERT(valued);
107
5/5
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
3 return {valuea.get(), valueb.get(), valuec.get(), valued.get()};
108 }
109
110 2 boost::optional<double> MaterialPropertyMoisturePenetrationDepthSettings_Impl::surfaceLayerPenetrationDepth() {
111 2 return getDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::SurfaceLayerPenetrationDepth, true);
112 }
113
114 3 bool MaterialPropertyMoisturePenetrationDepthSettings_Impl::isSurfaceLayerPenetrationDepthAutocalculated() {
115 3 bool result = false;
116
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<std::string> value = getString(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::SurfaceLayerPenetrationDepth, true);
117
1/2
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
3 if (value) {
118
3/3
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
6 result = openstudio::istringEqual(value.get(), "Autocalculate");
119 }
120 3 return result;
121 3 }
122
123 2 boost::optional<double> MaterialPropertyMoisturePenetrationDepthSettings_Impl::deepLayerPenetrationDepth() {
124 2 return getDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::DeepLayerPenetrationDepth, true);
125 }
126
127 3 bool MaterialPropertyMoisturePenetrationDepthSettings_Impl::isDeepLayerPenetrationDepthAutocalculated() {
128 3 bool result = false;
129
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<std::string> value = getString(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::DeepLayerPenetrationDepth, true);
130
1/2
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
3 if (value) {
131
3/3
✓ Branch 1 taken 3 times.
✓ Branch 4 taken 3 times.
✓ Branch 7 taken 3 times.
6 result = openstudio::istringEqual(value.get(), "Autocalculate");
132 }
133 3 return result;
134 3 }
135
136 3 double MaterialPropertyMoisturePenetrationDepthSettings_Impl::coatingLayerThickness() const {
137
1/1
✓ Branch 1 taken 3 times.
3 boost::optional<double> value = getDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::CoatingLayerThickness);
138
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
3 OS_ASSERT(value);
139
1/1
✓ Branch 1 taken 3 times.
6 return value.get();
140 }
141
142 3 double MaterialPropertyMoisturePenetrationDepthSettings_Impl::coatingLayerWaterVaporDiffusionResistanceFactor() const {
143 boost::optional<double> value =
144
1/1
✓ Branch 1 taken 3 times.
3 getDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::CoatingLayerWaterVaporDiffusionResistanceFactor);
145
1/3
✗ Branch 1 not taken.
✓ Branch 2 taken 3 times.
✗ Branch 4 not taken.
3 OS_ASSERT(value);
146
1/1
✓ Branch 1 taken 3 times.
6 return value.get();
147 }
148
149 10 bool MaterialPropertyMoisturePenetrationDepthSettings_Impl::setWaterVaporDiffusionResistanceFactor(double waterVaporDiffusionResistanceFactor) {
150 10 bool result = setDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::WaterVaporDiffusionResistanceFactor,
151 waterVaporDiffusionResistanceFactor);
152
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
10 OS_ASSERT(result);
153 10 return result;
154 }
155
156 10 bool MaterialPropertyMoisturePenetrationDepthSettings_Impl::setMoistureEquationCoefficientA(double moistureEquationCoefficientA) {
157 bool result =
158 10 setDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficienta, moistureEquationCoefficientA);
159
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
10 OS_ASSERT(result);
160 10 return result;
161 }
162
163 10 bool MaterialPropertyMoisturePenetrationDepthSettings_Impl::setMoistureEquationCoefficientB(double moistureEquationCoefficientB) {
164 bool result =
165 10 setDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficientb, moistureEquationCoefficientB);
166
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
10 OS_ASSERT(result);
167 10 return result;
168 }
169
170 10 bool MaterialPropertyMoisturePenetrationDepthSettings_Impl::setMoistureEquationCoefficientC(double moistureEquationCoefficientC) {
171 bool result =
172 10 setDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficientc, moistureEquationCoefficientC);
173
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
10 OS_ASSERT(result);
174 10 return result;
175 }
176
177 10 bool MaterialPropertyMoisturePenetrationDepthSettings_Impl::setMoistureEquationCoefficientD(double moistureEquationCoefficientD) {
178 bool result =
179 10 setDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficientd, moistureEquationCoefficientD);
180
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
10 OS_ASSERT(result);
181 10 return result;
182 }
183
184 1 bool MaterialPropertyMoisturePenetrationDepthSettings_Impl::setMoistureEquationCoefficients(double moistureEquationCoefficientA,
185 double moistureEquationCoefficientB,
186 double moistureEquationCoefficientC,
187 double moistureEquationCoefficientD) {
188 bool resulta =
189 1 setDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficienta, moistureEquationCoefficientA);
190
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(resulta);
191 bool resultb =
192 1 setDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficientb, moistureEquationCoefficientB);
193
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(resultb);
194 bool resultc =
195 1 setDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficientc, moistureEquationCoefficientC);
196
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(resultc);
197 bool resultd =
198 1 setDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MoistureEquationCoefficientd, moistureEquationCoefficientD);
199
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(resultd);
200
4/8
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✗ Branch 3 not taken.
✓ Branch 4 taken 1 time.
✗ Branch 5 not taken.
✓ Branch 6 taken 1 time.
✗ Branch 7 not taken.
1 if (resulta && resultb && resultc && resultd) {
201 1 return true;
202 } else {
203 ✗ return false;
204 }
205 }
206
207 1 bool MaterialPropertyMoisturePenetrationDepthSettings_Impl::setSurfaceLayerPenetrationDepth(double surfaceLayerPenetrationDepth) {
208 bool result =
209 1 setDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::SurfaceLayerPenetrationDepth, surfaceLayerPenetrationDepth);
210
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
211 1 return result;
212 }
213
214 10 void MaterialPropertyMoisturePenetrationDepthSettings_Impl::autocalculateSurfaceLayerPenetrationDepth() {
215
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
20 bool result = setString(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::SurfaceLayerPenetrationDepth, "");
216
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
10 OS_ASSERT(result);
217 10 }
218
219 1 bool MaterialPropertyMoisturePenetrationDepthSettings_Impl::setDeepLayerPenetrationDepth(double deepLayerPenetrationDepth) {
220 1 bool result = setDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::DeepLayerPenetrationDepth, deepLayerPenetrationDepth);
221
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 OS_ASSERT(result);
222 1 return result;
223 }
224
225 10 void MaterialPropertyMoisturePenetrationDepthSettings_Impl::autocalculateDeepLayerPenetrationDepth() {
226
2/2
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
20 bool result = setString(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::DeepLayerPenetrationDepth, "");
227
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
10 OS_ASSERT(result);
228 10 }
229
230 10 bool MaterialPropertyMoisturePenetrationDepthSettings_Impl::setCoatingLayerThickness(double coatingLayerThickness) {
231 10 bool result = setDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::CoatingLayerThickness, coatingLayerThickness);
232
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
10 OS_ASSERT(result);
233 10 return result;
234 }
235
236 10 bool MaterialPropertyMoisturePenetrationDepthSettings_Impl::setCoatingLayerWaterVaporDiffusionResistanceFactor(
237 double coatingLayerWaterVaporDiffusionResistanceFactor) {
238 10 bool result = setDouble(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::CoatingLayerWaterVaporDiffusionResistanceFactor,
239 coatingLayerWaterVaporDiffusionResistanceFactor);
240
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 10 times.
10 OS_ASSERT(result);
241 10 return result;
242 }
243
244 } // namespace detail
245
246 10 MaterialPropertyMoisturePenetrationDepthSettings::MaterialPropertyMoisturePenetrationDepthSettings(
247 StandardOpaqueMaterial& material, double waterVaporDiffusionResistanceFactor, double moistureEquationCoefficientA,
248 double moistureEquationCoefficientB, double moistureEquationCoefficientC, double moistureEquationCoefficientD, double coatingLayerThickness,
249 10 double coatingLayerWaterVaporDiffusionResistanceFactor)
250
3/3
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 10 times.
✓ Branch 7 taken 10 times.
10 : ModelObject(MaterialPropertyMoisturePenetrationDepthSettings::iddObjectType(), material.model()) {
251
1/3
✗ Branch 2 not taken.
✓ Branch 3 taken 10 times.
✗ Branch 5 not taken.
10 OS_ASSERT(getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>());
252
253
3/3
✓ Branch 1 taken 10 times.
✓ Branch 4 taken 1 time.
✓ Branch 5 taken 9 times.
20 if (material.materialPropertyMoisturePenetrationDepthSettings()) {
254
19/19
✓ Branch 1 taken 1 time.
✓ Branch 4 taken 1 time.
✓ Branch 7 taken 1 time.
✓ Branch 10 taken 1 time.
✓ Branch 13 taken 1 time.
✓ Branch 17 taken 1 time.
✓ Branch 20 taken 1 time.
✓ Branch 23 taken 1 time.
✓ Branch 29 taken 1 time.
✓ Branch 32 taken 1 time.
✓ Branch 35 taken 1 time.
✓ Branch 38 taken 1 time.
✓ Branch 41 taken 1 time.
✓ Branch 44 taken 1 time.
✓ Branch 47 taken 1 time.
✓ Branch 50 taken 1 time.
✓ Branch 53 taken 1 time.
✓ Branch 58 taken 1 time.
✓ Branch 61 taken 1 time.
1 LOG_AND_THROW("Material '" << material.nameString() << "' already has an associated MaterialPropertyMoisturePenetrationDepthSettings object");
255 }
256
257 9 bool ok = true;
258
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
9 OS_ASSERT(ok);
259
260
2/2
✓ Branch 1 taken 9 times.
✓ Branch 4 taken 9 times.
9 ok = setPointer(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MaterialName, material.handle());
261
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
9 OS_ASSERT(ok);
262
263
1/1
✓ Branch 1 taken 9 times.
9 ok = setWaterVaporDiffusionResistanceFactor(waterVaporDiffusionResistanceFactor);
264
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
9 OS_ASSERT(ok);
265
266
1/1
✓ Branch 1 taken 9 times.
9 ok = setMoistureEquationCoefficientA(moistureEquationCoefficientA);
267
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
9 OS_ASSERT(ok);
268
269
1/1
✓ Branch 1 taken 9 times.
9 ok = setMoistureEquationCoefficientB(moistureEquationCoefficientB);
270
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
9 OS_ASSERT(ok);
271
272
1/1
✓ Branch 1 taken 9 times.
9 ok = setMoistureEquationCoefficientC(moistureEquationCoefficientC);
273
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
9 OS_ASSERT(ok);
274
275
1/1
✓ Branch 1 taken 9 times.
9 ok = setMoistureEquationCoefficientD(moistureEquationCoefficientD);
276
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
9 OS_ASSERT(ok);
277
278
1/1
✓ Branch 1 taken 9 times.
9 autocalculateSurfaceLayerPenetrationDepth();
279
1/1
✓ Branch 1 taken 9 times.
9 autocalculateDeepLayerPenetrationDepth();
280
281
1/1
✓ Branch 1 taken 9 times.
9 ok = setCoatingLayerThickness(coatingLayerThickness);
282
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
9 OS_ASSERT(ok);
283
284
1/1
✓ Branch 1 taken 9 times.
9 ok = setCoatingLayerWaterVaporDiffusionResistanceFactor(coatingLayerWaterVaporDiffusionResistanceFactor);
285
1/3
✗ Branch 0 not taken.
✓ Branch 1 taken 9 times.
✗ Branch 3 not taken.
9 OS_ASSERT(ok);
286 10 }
287
288 ✗ MaterialPropertyMoisturePenetrationDepthSettings::MaterialPropertyMoisturePenetrationDepthSettings(
289 MasslessOpaqueMaterial& material, double waterVaporDiffusionResistanceFactor, double moistureEquationCoefficientA,
290 double moistureEquationCoefficientB, double moistureEquationCoefficientC, double moistureEquationCoefficientD, double coatingLayerThickness,
291 ✗ double coatingLayerWaterVaporDiffusionResistanceFactor)
292 ✗ : ModelObject(MaterialPropertyMoisturePenetrationDepthSettings::iddObjectType(), material.model()) {
293 ✗ OS_ASSERT(getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>());
294
295 ✗ if (material.materialPropertyMoisturePenetrationDepthSettings()) {
296 ✗ LOG_AND_THROW("Material '" << material.nameString() << "' already has an associated MaterialPropertyMoisturePenetrationDepthSettings object");
297 }
298
299 ✗ bool ok = true;
300 ✗ OS_ASSERT(ok);
301
302 ✗ ok = setPointer(OS_MaterialProperty_MoisturePenetrationDepth_SettingsFields::MaterialName, material.handle());
303 ✗ OS_ASSERT(ok);
304
305 ✗ ok = setWaterVaporDiffusionResistanceFactor(waterVaporDiffusionResistanceFactor);
306 ✗ OS_ASSERT(ok);
307
308 ✗ ok = setMoistureEquationCoefficientA(moistureEquationCoefficientA);
309 ✗ OS_ASSERT(ok);
310
311 ✗ ok = setMoistureEquationCoefficientB(moistureEquationCoefficientB);
312 ✗ OS_ASSERT(ok);
313
314 ✗ ok = setMoistureEquationCoefficientC(moistureEquationCoefficientC);
315 ✗ OS_ASSERT(ok);
316
317 ✗ ok = setMoistureEquationCoefficientD(moistureEquationCoefficientD);
318 ✗ OS_ASSERT(ok);
319
320 ✗ autocalculateSurfaceLayerPenetrationDepth();
321 ✗ autocalculateDeepLayerPenetrationDepth();
322
323 ✗ ok = setCoatingLayerThickness(coatingLayerThickness);
324 ✗ OS_ASSERT(ok);
325
326 ✗ ok = setCoatingLayerWaterVaporDiffusionResistanceFactor(coatingLayerWaterVaporDiffusionResistanceFactor);
327 ✗ OS_ASSERT(ok);
328 ✗ }
329
330 9255 IddObjectType MaterialPropertyMoisturePenetrationDepthSettings::iddObjectType() {
331
1/1
✓ Branch 1 taken 9255 times.
9255 return {IddObjectType::OS_MaterialProperty_MoisturePenetrationDepth_Settings};
332 }
333
334 2 std::string MaterialPropertyMoisturePenetrationDepthSettings::materialName() const {
335
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->materialName();
336 }
337
338 3 Material MaterialPropertyMoisturePenetrationDepthSettings::material() const {
339
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->material();
340 }
341
342 3 double MaterialPropertyMoisturePenetrationDepthSettings::waterVaporDiffusionResistanceFactor() const {
343
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->waterVaporDiffusionResistanceFactor();
344 }
345
346 4 double MaterialPropertyMoisturePenetrationDepthSettings::moistureEquationCoefficientA() const {
347
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->moistureEquationCoefficientA();
348 }
349
350 4 double MaterialPropertyMoisturePenetrationDepthSettings::moistureEquationCoefficientB() const {
351
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->moistureEquationCoefficientB();
352 }
353
354 4 double MaterialPropertyMoisturePenetrationDepthSettings::moistureEquationCoefficientC() const {
355
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->moistureEquationCoefficientC();
356 }
357
358 4 double MaterialPropertyMoisturePenetrationDepthSettings::moistureEquationCoefficientD() const {
359
1/1
✓ Branch 3 taken 4 times.
4 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->moistureEquationCoefficientD();
360 }
361
362 1 std::vector<double> MaterialPropertyMoisturePenetrationDepthSettings::moistureEquationCoefficients() const {
363
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->moistureEquationCoefficients();
364 }
365
366 2 boost::optional<double> MaterialPropertyMoisturePenetrationDepthSettings::surfaceLayerPenetrationDepth() {
367
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->surfaceLayerPenetrationDepth();
368 }
369
370 3 bool MaterialPropertyMoisturePenetrationDepthSettings::isSurfaceLayerPenetrationDepthAutocalculated() {
371
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->isSurfaceLayerPenetrationDepthAutocalculated();
372 }
373
374 2 boost::optional<double> MaterialPropertyMoisturePenetrationDepthSettings::deepLayerPenetrationDepth() {
375
1/1
✓ Branch 3 taken 2 times.
2 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->deepLayerPenetrationDepth();
376 }
377
378 3 bool MaterialPropertyMoisturePenetrationDepthSettings::isDeepLayerPenetrationDepthAutocalculated() {
379
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->isDeepLayerPenetrationDepthAutocalculated();
380 }
381
382 3 double MaterialPropertyMoisturePenetrationDepthSettings::coatingLayerThickness() const {
383
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->coatingLayerThickness();
384 }
385
386 3 double MaterialPropertyMoisturePenetrationDepthSettings::coatingLayerWaterVaporDiffusionResistanceFactor() const {
387
1/1
✓ Branch 3 taken 3 times.
3 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->coatingLayerWaterVaporDiffusionResistanceFactor();
388 }
389
390 10 bool MaterialPropertyMoisturePenetrationDepthSettings::setWaterVaporDiffusionResistanceFactor(double waterVaporDiffusionResistanceFactor) {
391
1/1
✓ Branch 3 taken 10 times.
20 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->setWaterVaporDiffusionResistanceFactor(
392 20 waterVaporDiffusionResistanceFactor);
393 }
394
395 10 bool MaterialPropertyMoisturePenetrationDepthSettings::setMoistureEquationCoefficientA(double moistureEquationCoefficientA) {
396
1/1
✓ Branch 3 taken 10 times.
10 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->setMoistureEquationCoefficientA(moistureEquationCoefficientA);
397 }
398
399 10 bool MaterialPropertyMoisturePenetrationDepthSettings::setMoistureEquationCoefficientB(double moistureEquationCoefficientB) {
400
1/1
✓ Branch 3 taken 10 times.
10 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->setMoistureEquationCoefficientB(moistureEquationCoefficientB);
401 }
402
403 10 bool MaterialPropertyMoisturePenetrationDepthSettings::setMoistureEquationCoefficientC(double moistureEquationCoefficientC) {
404
1/1
✓ Branch 3 taken 10 times.
10 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->setMoistureEquationCoefficientC(moistureEquationCoefficientC);
405 }
406
407 10 bool MaterialPropertyMoisturePenetrationDepthSettings::setMoistureEquationCoefficientD(double moistureEquationCoefficientD) {
408
1/1
✓ Branch 3 taken 10 times.
10 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->setMoistureEquationCoefficientD(moistureEquationCoefficientD);
409 }
410
411 1 bool MaterialPropertyMoisturePenetrationDepthSettings::setMoistureEquationCoefficients(double moistureEquationCoefficientA,
412 double moistureEquationCoefficientB,
413 double moistureEquationCoefficientC,
414 double moistureEquationCoefficientD) {
415
1/1
✓ Branch 3 taken 1 time.
2 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->setMoistureEquationCoefficients(
416 2 moistureEquationCoefficientA, moistureEquationCoefficientB, moistureEquationCoefficientC, moistureEquationCoefficientD);
417 }
418
419 1 bool MaterialPropertyMoisturePenetrationDepthSettings::setSurfaceLayerPenetrationDepth(double surfaceLayerPenetrationDepth) {
420
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->setSurfaceLayerPenetrationDepth(surfaceLayerPenetrationDepth);
421 }
422
423 10 void MaterialPropertyMoisturePenetrationDepthSettings::autocalculateSurfaceLayerPenetrationDepth() {
424
1/1
✓ Branch 3 taken 10 times.
10 getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->autocalculateSurfaceLayerPenetrationDepth();
425 10 }
426
427 1 bool MaterialPropertyMoisturePenetrationDepthSettings::setDeepLayerPenetrationDepth(double deepLayerPenetrationDepth) {
428
1/1
✓ Branch 3 taken 1 time.
1 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->setDeepLayerPenetrationDepth(deepLayerPenetrationDepth);
429 }
430
431 10 void MaterialPropertyMoisturePenetrationDepthSettings::autocalculateDeepLayerPenetrationDepth() {
432
1/1
✓ Branch 3 taken 10 times.
10 getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->autocalculateDeepLayerPenetrationDepth();
433 10 }
434
435 10 bool MaterialPropertyMoisturePenetrationDepthSettings::setCoatingLayerThickness(double coatingLayerThickness) {
436
1/1
✓ Branch 3 taken 10 times.
10 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->setCoatingLayerThickness(coatingLayerThickness);
437 }
438
439 10 bool MaterialPropertyMoisturePenetrationDepthSettings::setCoatingLayerWaterVaporDiffusionResistanceFactor(
440 double coatingLayerWaterVaporDiffusionResistanceFactor) {
441
1/1
✓ Branch 3 taken 10 times.
20 return getImpl<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl>()->setCoatingLayerWaterVaporDiffusionResistanceFactor(
442 20 coatingLayerWaterVaporDiffusionResistanceFactor);
443 }
444
445 /// @cond
446 10 MaterialPropertyMoisturePenetrationDepthSettings::MaterialPropertyMoisturePenetrationDepthSettings(
447 10 std::shared_ptr<detail::MaterialPropertyMoisturePenetrationDepthSettings_Impl> impl)
448
1/1
✓ Branch 3 taken 10 times.
10 : ModelObject(std::move(impl)) {}
449 /// @endcond
450
451 } // namespace model
452 } // namespace openstudio
453