acroucher / PyTOUGH

A Python library for automating TOUGH2 simulations of subsurface fluid and heat flow
GNU Lesser General Public License v3.0
96 stars 36 forks source link

Bugfix in calculate_block_centres where blkname was a t2block #8

Closed johnburnell closed 9 years ago

johnburnell commented 9 years ago

Fixed a problem with calculate_block_centres. The loop variable is a t2block not a string. Editing the file may also have changed line endings in the whole file.

acroucher commented 9 years ago

Thanks for spotting that bug- it crept in when I added support for block mappings. Your fix wasn't quite right either, unfortunately- it needs to be looping over block names in the geometry, not the t2grid, otherwise it won't work when a block mapping is used. So I haven't merged this pull request, but I have made the correct changes to testing and master branches.