-
Notifications
You must be signed in to change notification settings - Fork 114
Avoid computations with NaN in sssky_diffuse_table::compute #1355
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
Conversation
cf diagnostic at NREL/EnergyPlus#11245 I'm upstreaming my changes here
'recompact' failed with: ninja: error: tabs are not allowed, use spaces
Pull Request Test Coverage Report for Build 18205977035Details
💛 - Coveralls |
sjanzou
left a comment
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.
Looks much better. Strange how 1 additional uncovered line was added... seemed like you shortened the logic branching.
| else | ||
| gamma[n] = (-M_PI / 2) + atan(arg[n]); | ||
| tan_tilt_gamma[n] = tan(surface_tilt * DTOR + gamma[n]); | ||
| Asky_shade[n] = M_PI + M_PI / pow((1 + tan_tilt_gamma[n] * tan_tilt_gamma[n]), 0.5); |
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.
Much cleaner!
| else() | ||
| set(ADD_CFLAGS "${ADD_CFLAGS} -Wall -DWX_PRECOMP -DCHECK_SOLUTION -DYY_NEVER_INTERACTIVE -DPARSER_LP | ||
| -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine") | ||
| set(ADD_CFLAGS "${ADD_CFLAGS} -Wall -DWX_PRECOMP -DCHECK_SOLUTION -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine") |
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.
This may cause a conflict with the ORTools branch but we will address when trying to merge that pull request
Pull Request Template
Description
I'm upstreaming my changes here.
Fixes # (issue(s))
Corresponding branches and PRs:
Unit Test Impact:
[ new tests written? ]
[ expected changes in unit tests or speed of tests? ]
[ expected changes in test_results files? ]
Checklist
Reminders- this section can be deleted
[Checking for PySAM Incompatible API Changes]
(https://github.com/NREL/SAM/wiki/PySAM-Incompatible-API-Changes-&-Regenerating-PySAM-Files).
[When do the PySAM files need to be regenerated?]
(https://github.com/NREL/SAM/wiki/PySAM-Incompatible-API-Changes-&-Regenerating-PySAM-Files#when-do-the-pysam-files-need-to-be-regenerated-via-export_config)