FourierFlows.jl icon indicating copy to clipboard operation
FourierFlows.jl copied to clipboard

`dealiasing` should be part of the `equation`, not the `grid`

Open navidcy opened this issue 4 years ago • 5 comments

It makes more sense.

Yes, dealiasing is related to wavenumbers. But whether dealiasing should happened and what sort of dealiasing (2/3, 1/2, ...) depends on the order of nonlinearity that calcN! includes. So it makes more sense to make kralias, kalias, ... part of the Equation struct.

navidcy avatar Jun 02 '21 10:06 navidcy

I think this could work.

But I'd point out that dealiasing is really not a property of a PDE, but a property of arithmetic operations between fields. With a fully-fledged field abstraction, I think dealiasing would have to be part of the grid.

glwagner avatar Jun 02 '21 22:06 glwagner

Hm... OK. Dealiasing should be part of the grid. But for different equations the aliasing_factor could be different...

navidcy avatar Jun 02 '21 23:06 navidcy

We'll leave this for future, not something to be done in #285.

navidcy avatar Jun 02 '21 23:06 navidcy

I guess equations / problems might have to enforce certain grid properties?

glwagner avatar Jun 02 '21 23:06 glwagner

Yes, ideally either the equation or the problem might be able to change the aliased_fraction property of the grid...

navidcy avatar Jun 02 '21 23:06 navidcy