boutproject / boutdata

GNU Lesser General Public License v3.0
0 stars 2 forks source link

Fix for collect() when t_array is missing #45

Closed johnomotani closed 3 years ago

johnomotani commented 3 years ago

When collect() is used within restart.redistribute(), t_array will not be present (because it is not saved in restart files). In this case, just set nt=1 because there is no time dimension.

Bug was introduced in #40 (I think).

johnomotani commented 3 years ago

As the tests are passing, could a small test be added referring to this incident?

I've added a test for restart.redistribute() that would have caught this bug. It's a basic test for now - does not parameterise arguments to restart.redistribute(), check different grid topologies, or check that we get exceptions for new values of processor numbers that are not possible. If anyone has time to extend it now or in future, there shouldn't be any particular problem with doing so...