From c688048d23f55f76e73f386e0632122b6ca607d3 Mon Sep 17 00:00:00 2001 From: Rick Strand Date: Mon, 22 Jul 2024 06:38:04 -0500 Subject: [PATCH] 10299 Move a PixelCounting Check An error message was being skipped because of the movement of the Get part of the old routine. anyScheduledShadingSurface was not set yet so the error message was never produced. This change should fix this problem and eliminate the change in the .err file for SolarShadingTestGPU.idf. --- src/EnergyPlus/SolarShading.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/EnergyPlus/SolarShading.cc b/src/EnergyPlus/SolarShading.cc index 4d2776e0156..e166aed955a 100644 --- a/src/EnergyPlus/SolarShading.cc +++ b/src/EnergyPlus/SolarShading.cc @@ -519,18 +519,6 @@ void GetShadowingInput(EnergyPlusData &state) state.dataSysVars->shadingMethod = ShadingMethod::PolygonClipping; } - if ((state.dataSysVars->shadingMethod == DataSystemVariables::ShadingMethod::PixelCounting) && - state.dataSolarShading->anyScheduledShadingSurface) { - ShowSevereError(state, "The Shading Calculation Method of choice is \"PixelCounting\"; "); - ShowContinueError(state, "and there is at least one shading surface of type "); - ShowContinueError(state, "Shading:Site:Detailed, Shading:Building:Detailed, or Shading:Zone:Detailed, "); - ShowContinueError(state, "that has an active transmittance schedule value greater than zero or may vary."); - ShowContinueError(state, "With \"PixelCounting\" Shading Calculation Method, the shading surfaces will be treated as "); - ShowContinueError(state, "completely opaque (transmittance = 0) during the shading calculation, "); - ShowContinueError(state, "which may result in inaccurate or unexpected results."); - ShowContinueError(state, "It is suggested switching to another Shading Calculation Method, such as \"PolygonClipping\"."); - } - aNum++; if (NumAlphas >= aNum) { if (Util::SameString(state.dataIPShortCut->cAlphaArgs(aNum), "Periodic")) { @@ -738,6 +726,18 @@ void processShadowingInput(EnergyPlusData &state) { // all shadow input processing that needed zones and surfaces to already be read into data (part of fix for Defect #10299) + if ((state.dataSysVars->shadingMethod == DataSystemVariables::ShadingMethod::PixelCounting) && + state.dataSolarShading->anyScheduledShadingSurface) { + ShowSevereError(state, "The Shading Calculation Method of choice is \"PixelCounting\"; "); + ShowContinueError(state, "and there is at least one shading surface of type "); + ShowContinueError(state, "Shading:Site:Detailed, Shading:Building:Detailed, or Shading:Zone:Detailed, "); + ShowContinueError(state, "that has an active transmittance schedule value greater than zero or may vary."); + ShowContinueError(state, "With \"PixelCounting\" Shading Calculation Method, the shading surfaces will be treated as "); + ShowContinueError(state, "completely opaque (transmittance = 0) during the shading calculation, "); + ShowContinueError(state, "which may result in inaccurate or unexpected results."); + ShowContinueError(state, "It is suggested switching to another Shading Calculation Method, such as \"PolygonClipping\"."); + } + if (state.dataSysVars->shadingMethod == DataSystemVariables::ShadingMethod::Imported) { int ExtShadingSchedNum; for (int SurfNum = 1; SurfNum <= state.dataSurface->TotSurfaces; ++SurfNum) {