You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a first attempt to formalize the incorporation of lattice symmetries into collision models. For now it mainly automates finding the symmetries of each stencil and converting them into the respective index permutations. The current version at least allows us to check if a collision model obeys all desired lattice symmetries (see the last test in test_symmetry.py)
The code for such a check would look like this:
import lettuce as lt
stencil = ... # some stencil
collision = ... # some collision model
f = ... # some f
symmetry_group = lt.SymmetryGroup(stencil)
for permutation in symmetry_group.permutations:
assert torch.allclose(collision(f[permutation]), collision(f)[permutation])
Breaking Change:
Swapped the order of transform and relaxation_parameters in the MRT collision model constructor.
Line 8:8: E225 missing whitespace around operator Line 60:84: E226 missing whitespace around arithmetic operator Line 61:84: E226 missing whitespace around arithmetic operator Line 214:43: E226 missing whitespace around arithmetic operator Line 234:1: W391 blank line at end of file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This is a first attempt to formalize the incorporation of lattice symmetries into collision models. For now it mainly automates finding the symmetries of each stencil and converting them into the respective index permutations. The current version at least allows us to check if a collision model obeys all desired lattice symmetries (see the last test in test_symmetry.py)
The code for such a check would look like this:
Breaking Change:
Swapped the order of
transformandrelaxation_parametersin the MRT collision model constructor.@McBs