-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix indexing bug. #139
Fix indexing bug. #139
Conversation
@ktbolt I tried to run the tests locally and all the CFD-related ones fail just after initialization with a |
@MatteoSalvador You run the tests locally on what platform? I ran |
I ran |
@MatteoSalvador I was not careful and screwed up the indexing of another array. This is why unit tests are so useful. I found the error by turning on Array index checking. I wonder if we should run the tests with Array indexing checking turned on, even if it slowed down simulations. I could add a flag to the CMake file to enable this. |
I think it makes sense to check indexing in our tests.
@ktbolt, do you want to add the first one? |
@mrp089 Implementing unit testing is a lot of work, not sure if we want to expend the resources for this code. Next Stage for sure where we can implement the code for testing (test-driven development). |
@ktbolt I think that even if all tests are running now, there are still some issues with CFD-related ones. |
@MatteoSalvador I saw the divergence, looks like the fix uncovered another bug, looking into that now. |
…0-based index range.
@MatteoSalvador The |
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.
Thanks @ktbolt! Do you think that this MR will fix the problem @elenasmartinez found with resistance BCs in CFD simulations?
@MatteoSalvador This does fix the problem @elenasmartinez found with resistance BCs in CFD. |
* Fix indexing bug. * Fix indexing problem (again). * Modify the calls to all_fun::integ() functions to pass in an array's 0-based index range. --------- Co-authored-by: Matteo Salvador <[email protected]>
* Fix indexing bug. * Fix indexing problem (again). * Modify the calls to all_fun::integ() functions to pass in an array's 0-based index range. --------- Co-authored-by: Matteo Salvador <[email protected]>
* Fix indexing bug. * Fix indexing problem (again). * Modify the calls to all_fun::integ() functions to pass in an array's 0-based index range. --------- Co-authored-by: Matteo Salvador <[email protected]>
Current situation
This is the fix for #88.
Code of Conduct & Contributing Guidelines