nickabattista / IB2d

An easy to use immersed boundary method in 2D, with full implementations in MATLAB and Python that contains over 75 built-in examples, including multiple options for fiber-structure models and advection-diffusion, Boussinesq approximations, and/or artificial forcing.
GNU General Public License v3.0
164 stars 90 forks source link

I think there might be an issue in the IBM_Driver.py? #15

Closed BATDRAWER closed 3 years ago

BATDRAWER commented 3 years ago

If you take a look at line 1014 of the IBM_Driver.py, you should see that this line should belong to the if statement above it, not alongside the if statement. Because the variable springs2 will only be created if the variable m is less than 5. If there are 5 columns of data in structure.spring file, among which the last column is degree of non-linearity, the program will report an error, the reason is that springs2 does not exist. Move the line 1014 into the if statement should be able to avoid this issue. I am not sure whether my findings are correct or not. Hope the author can give me a reply. Thanks. 屏幕截图 2021-05-27 165511

nickabattista commented 3 years ago

Thank you for pointing this out! Yes, you are correct. I will make this change and push the changes to the master branch.