Skip to content
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

Add return types for normalization factor. #9

Merged
merged 7 commits into from
Dec 16, 2019

Conversation

ajscimone
Copy link
Contributor

No description provided.

@ajscimone ajscimone requested a review from nealkruis November 20, 2019 23:20
@codecov-io
Copy link

codecov-io commented Nov 20, 2019

Codecov Report

Merging #9 into master will increase coverage by 1.27%.
The diff coverage is 88.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #9      +/-   ##
==========================================
+ Coverage   84.41%   85.68%   +1.27%     
==========================================
  Files           8        8              
  Lines         417      419       +2     
==========================================
+ Hits          352      359       +7     
+ Misses         65       60       -5
Impacted Files Coverage Δ
src/btwxt.h 11.11% <ø> (ø) ⬆️
src/gridpoint.h 0% <ø> (ø) ⬆️
src/btwxt.cpp 71.05% <100%> (+7.89%) ⬆️
src/gridpoint.cpp 90.5% <80%> (+1.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a95d109...4634057. Read the comment docs.

@nealkruis
Copy link
Member

@ajscimone Let's add a couple of unit tests in this repo to ensure we're getting the right output back. You can more-or-less use the same cases we used for EnergyPlus.

@ajscimone
Copy link
Contributor Author

@nealkruis unit tests should now be added for scalar return functionality for both btwxt itself and GridPoints. There are two unit tests apiece, adding four total to the library. I have created a new test fixture named "TwoDSimpleNormalizationFixture" which is a 2D fixture which has very simple data corresponding to a f(x,y)=x*y type linear function to make this testing simpler and easy to read/understand. I am currently testing that both a single scalar target and a compound scalar are normalizing and returning correctly. Please take a look and let me know if you find these satisfactory, if they need cleaned up stylistically, or if tests should be expanded further.

test/gridpoint_test.cpp Outdated Show resolved Hide resolved
test/fixtures.hpp Outdated Show resolved Hide resolved
test/btwxt_test.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@tanaya-mankad tanaya-mankad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to go through the math manually, but as Neal's done it, I'll click approve.

…ons and generate regular grid interpolator data using a function instead of hard coding values via a lookup table.
@nealkruis nealkruis merged commit 692bcce into master Dec 16, 2019
@nealkruis nealkruis deleted the return-normalization-factor branch December 16, 2019 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants