Skip to content
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

add support for amrex::FFT::PoissonOpenBC for self-gravity #831

Open
BenWibking opened this issue Dec 20, 2024 · 1 comment
Open

add support for amrex::FFT::PoissonOpenBC for self-gravity #831

BenWibking opened this issue Dec 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@BenWibking
Copy link
Collaborator

BenWibking commented Dec 20, 2024

Describe the proposal
There is a new FFT-based Poisson solver for open boundary conditions in AMReX. It may provide better performance because it can explicitly compute the Green's function in Fourier space and cache it for re-use each timestep. (The Green's function only has to be computed once.)

The downside is that the Green's function requires as much memory as one component of the level 0 multifab. At extreme scales, FFT can also require more communication, but it needs to be tested to see which one is faster in practice.

Describe alternatives you've considered
Keep using the real-space amrex::OpenBC solver for self-gravity.

Additional context
Documentation: https://amrex-codes.github.io/amrex/docs_html/FFT.html#poisson-solver

If someone works out the math for the Green's function, we could also write a custom solver to do mixed periodic-open boundary conditions for solving the Poisson equation for "tall box" simulations:

FFT::PoissonOpenBC is a 3D only solver that supports open boundaries. Its implementation utilizes FFT::OpenBCSolver, which can be used for implementing convolution based solvers with a user provided Green’s function. If users want to extend the open BC solver to 2D or other types of Green’s function, they could use FFT::PoissonOpenBC as an example.

@BenWibking BenWibking added the enhancement New feature or request label Dec 20, 2024
@BenWibking
Copy link
Collaborator Author

@markkrumholz @lizmcole This project might also be of interest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant