-
Notifications
You must be signed in to change notification settings - Fork 466
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
r-test: update of lin file comparison #1694
Conversation
This has definitely been needed. One future addition that would be useful is to calculate the eigenvalues to get the frequencies. Those are almost more important than the matrices themselves. |
I've now tuned a bit the rtol/atol for the matrix comparisons based on the reasoning that we only have 3 digits after the decimal, so we can expect a I've also added test for the frequencies and damping. These tests occur before the matrix/states comparisons. With the tuning in rtol atal, only those two tests fails: The frequency/damping test indicate some changes in damping that occured.
|
This pull request is ready to be merged
Feature or improvement description
Comparison of
.lin
files has been broken so the r-tests have not been working as intended, and were not performing any comparison. I'm not sure since when this is the case.Instead of using and ad-hoc script for reading the
.lin
file, this pull request uses a file from the python toolbox to read the lin files (not my greatest script, but it should be fairly robust). For now, I've copy pasted the file in thelib
folder. In the future, we could simply git clone the python toolbox.Errors will be thrown if:
The script returns fairly verbose messages (which file, variable and array index fails).
For instance:
Related issue, if one exists
#1693
Impacted areas of the software
r-test linearization tests.
Additional supporting information
The script currently uses
numpy.all_close
, but I believe it is the same as the functionisclose
which was previously implemented. The tolerancesatol=1e-5
andrtol=1e-5
are still used.It might be that if this test is finicky, we will have to revise the comparison of elements.
Test results, if applicable
Currently with
atol=1e-5
andrtol=1e-5
the following 4 tests fail:43 - 5MW_Land_BD_Linear (Failed)
44 - 5MW_OC4Semi_Linear (Failed)
45 - StC_test_OC4Semi_Linear_Nac (Failed)
46 - StC_test_OC4Semi_Linear_Tow (Failed)
The differences are sufficiently large that I don't think that increasing the tolerance value will make the test pass. We'll likely have to redo the baseline.
Checklist