The symmetry projection algorithm implemented as u -> (u + sigma u)/2 assumes the symmetry sigma obeys sigma^2 = 1. This is true for coordinate inversion symmetries, half box shifts, and combinations thereof, but it's not for phase shifts of other fractions. E.g. a symmetry operation with sigma^3 = 1 would require projection u -> (u + sigma u + sigma^2 u)/3.
I believe that in periodic channel flows, you can always reconfigure the domain so that any symmetries involve only half-box shifts. (This is not true in pipes, however!) But it's still possible for users to configure domains and symmetries suboptimally, say integrating a field with Lx/3-shift symmetry on an Lx-wide domain.
Should we generallize the projection operation so that it works for sigma^n =1 for arbitrary n? We'd probably have to add an order field (n) to the Symmetry class and determine during construction the smallest n for which sigma^n = 1. I think it would be fine to limit that to fairly small n, like n<=4 or 10. The test would have to be |sigma^n - 1| < small number in order to handle Lx/3 shifts etc.
This issue came up while writing the channelflow-2 paper.
The symmetry projection algorithm implemented as u -> (u + sigma u)/2 assumes the symmetry sigma obeys sigma^2 = 1. This is true for coordinate inversion symmetries, half box shifts, and combinations thereof, but it's not for phase shifts of other fractions. E.g. a symmetry operation with sigma^3 = 1 would require projection u -> (u + sigma u + sigma^2 u)/3.
I believe that in periodic channel flows, you can always reconfigure the domain so that any symmetries involve only half-box shifts. (This is not true in pipes, however!) But it's still possible for users to configure domains and symmetries suboptimally, say integrating a field with Lx/3-shift symmetry on an Lx-wide domain.
Should we generallize the projection operation so that it works for sigma^n =1 for arbitrary n? We'd probably have to add an order field (n) to the Symmetry class and determine during construction the smallest n for which sigma^n = 1. I think it would be fine to limit that to fairly small n, like n<=4 or 10. The test would have to be |sigma^n - 1| < small number in order to handle Lx/3 shifts etc.
This issue came up while writing the channelflow-2 paper.