-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vertical blind warning not reported from material get input function #10743
Conversation
if ((s_ipsc->rNumericArgs(16) < 0.0) || | ||
((s_ipsc->rNumericArgs(16) > 0.0) && (s_ipsc->rNumericArgs(16) < (s_ipsc->rNumericArgs(11) / 2)))) { | ||
(mat->LayerType == TARCOGParams::TARCOGLayerType::VENETBLIND_VERT)) { | ||
if ((s_ipsc->rNumericArgs(16) > 0.0) && (s_ipsc->rNumericArgs(16) < (s_ipsc->rNumericArgs(11) / 2))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[src/EnergyPlus/Material.cc:2670]:(style),[duplicateExpression],Same expression on both sides of '||'.
These other checks are caught by InputProcessor and are never executed. For example if I make slat thickness < 0 this input processor warning is reported.
** Severe ** <root>[WindowMaterial:ComplexShade][Shade_14_Layer][slat_thickness] - "-0.001000" - Expected number greater than 0.000000
** Fatal ** Errors occurred on processing input file. Preceding condition(s) cause termination.
WindowMaterial:ComplexShade,
N11 , \field Slat Width
\units m
\type real
\minimum> 0
\default 0.016
N12 , \field Slat Spacing
\note Distance between adjacent slat faces
\units m
\type real
\minimum> 0
\default 0.012
N13 , \field Slat Thickness
\note Distance between top and bottom surfaces of slat
\note Slat is assumed to be rectangular in cross section and flat
\type real
\units m
\minimum> 0
\default 0.0006
N14 , \field Slat Angle
\type real
\units deg
\default 90
\minimum -90
\maximum 90
N15 , \field Slat Conductivity
\type real
\units W/m-K
\minimum> 0
\default 160.0
N16 ; \field Slat Curve
\note this value represents curvature radius of the slat.
\note if the slat is flat use zero.
\note if this value is not zero, then it must be > SlatWidth/2.
\type real
\units m
\minimum 0.0
\default 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! There is so much duplicated between the IDD/input processor range checks and then inaccessible checks in the get input routines. I love it.
if (Util::makeUPPER(itObj.key()) == s_ipsc->cAlphaArgs(3)) break; | ||
} | ||
|
||
if (itObj == instances.end()) { | ||
if (itObj == instances2.end()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[src/EnergyPlus/Material.cc:2499]:(style),[shadowVariable],Local variable 'instances' shadows outer variable
[src/EnergyPlus/Material.cc:2526]:(style),[shadowVariable],Local variable 'instances' shadows outer variable
@@ -84,7 +84,7 @@ constexpr std::array<Material::Gas, 10> gases = { | |||
|
|||
constexpr std::array<std::string_view, (int)EcoRoofCalcMethod::Num> ecoRoofCalcMethodNamesUC = {"SIMPLE", "ADVANCED"}; | |||
|
|||
int GetMaterialNum(EnergyPlusData &state, std::string const &matName) | |||
int GetMaterialNum(EnergyPlusData const &state, std::string const &matName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[src/EnergyPlus/Material.cc:87]:(style),[constParameter],Parameter 'state' can be declared as reference to const
Defect file with this branch:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look fine. But I am a little confused. The title is
Vertical blind warning not reported from material get input function
But I don't really see how your changes here enabled a warning to be emitted. Was it the instances
variable shadowing?
if ((s_ipsc->rNumericArgs(16) < 0.0) || | ||
((s_ipsc->rNumericArgs(16) > 0.0) && (s_ipsc->rNumericArgs(16) < (s_ipsc->rNumericArgs(11) / 2)))) { | ||
(mat->LayerType == TARCOGParams::TARCOGLayerType::VENETBLIND_VERT)) { | ||
if ((s_ipsc->rNumericArgs(16) > 0.0) && (s_ipsc->rNumericArgs(16) < (s_ipsc->rNumericArgs(11) / 2))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! There is so much duplicated between the IDD/input processor range checks and then inaccessible checks in the get input routines. I love it.
Ahh I see. Thanks! Windows build failure is certainly unrelated, right? But do I get fresh results just to be sure? Ugh, probably. OK, I'll merge develop in and get fresh results. |
There we go, all clean. Thanks @rraustad, merging. |
Pull request overview
NOTE: ENHANCEMENTS MUST FOLLOW A SUBMISSION PROCESS INCLUDING A FEATURE PROPOSAL AND DESIGN DOCUMENT PRIOR TO SUBMITTING CODE
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.