-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poisson solvers for all types of domains (triply/doubly periodic, channels, boxes) and grids (regular, stretched) #586
Comments
It'd be nice to state in writing the justification for writing a separate CPU solver for certain problems. In general, I think that any algorithm that works on the GPU will also work on the CPU. Thus at least in principle the simplest choice is presumably to use the same solver on both architectures. For example, benchmarking might show that a GPU-friendly algorithm performs poorly compared to a CPU-specific algorithm, which might justify maintaining separate solvers for the GPU and CPU. Is this the case? |
Also, I'd encourage writing this code into as self-contained a submodule as possible. I think there are other codes in the julia ecosystem (not least FourierFlows.jl!) that would benefit from fast and multi-architecture Poisson solvers. We don't have to break this into a separate package just yet, but we do want to ensure this is easy to do in the future. |
Good point, I've been meaning to set up a script for benchmarking the different pressure solvers. We should use performance benchmarking results to make decisions.
Another good point. As you pointed out some of these solvers depend on the |
Almost there... |
Implementing a vertically stretched grid (see PR #543) involves adding new Poisson solvers. This offers us a chance to:
I am just throwing down some notes and ideas in this issue.
This table summarizes the different boundary conditions and grids we may want to simulate, and the Poisson solver algorithm we would need.
Essentially we need an FFT for periodic dimensions and we have the choice of using either a DCT or a TRIdiagonal solve for wall-bounded dimensions, although TRI may only be used once.
Some notes:
forward_x_transform
,forward_y_transform
,forward_z_transform
,backward_z_transform
, etc. then we can implement many solvers without repeating code.For now, I will first just focus on getting Poisson solvers working for vertically stretched grids in doubly periodic domains on the CPU and GPU. This will offer a chance to do some refactoring and benchmarking. We also need to try out faster tridiagonal matrix algorithms.
But I'd like to keep the five initial goals in mind. This issue will probably be open for a while.
The text was updated successfully, but these errors were encountered: