| 293 | } |
| 294 | |
| 295 | boost::optional<double> PlanarSurface_Impl::interiorVisibleAbsorptance() const { |
| 296 | OptionalDouble result; |
| 297 | OptionalSqlFile sqlFile = model().sqlFile(); |
| 298 | OptionalConstructionBase oConstruction = this->construction(); |
| 299 | |
| 300 | if (oConstruction) { |
| 301 | // from input |
| 302 | OptionalDouble inputResult = oConstruction->interiorVisibleAbsorptance(); |
| 303 | |
| 304 | // from output |
| 305 | OptionalDouble outputResult; |
| 306 | if (sqlFile) { |
| 307 | OptionalString constructionName = oConstruction->name(); |
| 308 | if (constructionName) { |
| 309 | std::string query = "SELECT InsideAbsorpVis FROM constructions WHERE Name=?;"; |
| 310 | outputResult = sqlFile->execAndReturnFirstDouble(query, |
| 311 | // bindArgs |
| 312 | to_upper_copy(*constructionName)); |
| 313 | } |
| 314 | } |
| 315 | |
| 316 | if (inputResult) { |
| 317 | result = inputResult; |
| 318 | if (outputResult) { |
| 319 | compareInputAndOutput(*oConstruction, "interior visible absorptance", *inputResult, *outputResult, 1.0E-5); |
| 320 | } |
| 321 | } else { |
| 322 | result = outputResult; |
| 323 | } |
| 324 | } |
| 325 | |
| 326 | return result; |
| 327 | } |
| 328 | |
| 329 | /// get exterior visible absorptance (unitless) |
| 330 | boost::optional<double> PlanarSurface_Impl::exteriorVisibleAbsorptance() const { |
nothing calls this directly
no test coverage detected