Bugfixes for SWIFTGalaxies
#77
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a bug likely introduced in #72 causing the "data server" in the
SWIFTGalaxiesiterator to mask the data arrays used while evaluating the mask for bound particles. This leads to a crash if a second galaxy uses the same "data server", i.e. lives in the same region as the masked data has an unexpected shape the next time it is accessed to evaluate the mask for the next galaxy. This has been fixed - thanks to Anna Durant for spotting that there was a problem.There was also an issue when exactly 2 regions were being iterated over. There is an array used internally that has shape
(1, N, M-1)whereMis the number of regions. This array was thensqueezed with the intention of dropping the dimension with size 1, but also removed theM-1dimension whenM=2. The axis that thesqueezeshould operate on is now specified explicitly.