FourierFlows / FourierFlows.jl

Tools for building fast, hackable, pseudospectral partial differential equation solvers on periodic domains
https://bit.ly/FourierFlows
MIT License
207 stars 29 forks source link

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

Open navidcy opened 3 years ago

navidcy commented 3 years ago

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.

glwagner commented 3 years ago

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.

navidcy commented 3 years ago

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

navidcy commented 3 years ago

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

glwagner commented 3 years ago

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

navidcy commented 3 years ago

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