AMReX-Astro / AMReX-Astro/Castro
Replace monopole gravity with Poisson gravity?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 340
- Forks
- 105
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 8
Description
Even though in principle Poisson gravity can be used in the places where we currently use monopole gravity, we use monopole gravity only in 1D spherical coordinates (and can use it in 2D cylindrical and 3D Cartesian for spherically symmetric mass distributions). The first Castro paper observes that at low resolution monopole is slightly better than Poisson for the StarGrav problem (though the difference converges away; see Figures 10 and 11), and also that monopole scaled much better than Poisson on CPUs (see Figure 2).
However, maintaining monopole gravity comes at a significant cost in code complexity (and I'm not fully convinced it is actually correct with AMR). It is also difficult to parallelize the monopole algorithm effectively. So we should consider dropping monopole gravity and using Poisson gravity in its place. That way we can straightforwardly accelerate these calculations on GPUs. On today's supercomputers using GPUs we can easily achieve the resolutions at which Poisson and monopole yield similar accuracy, so the only question is performance. The scaling results in Figure 2 of the Castro paper make a compelling case for monopole gravity on CPUs, but I don't think they are relevant for modern heterogeneous architectures. It's possible that if we ported monopole gravity to GPUs it would still beat Poisson gravity in performance, but the reward for that effort is low compared to just using Poisson gravity always.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the existing monopole and Poisson gravity implementations, then compare their accuracy and scaling using the Castro paper's Figures 2, 10, and 11. Done means reaching a documented decision on whether monopole gravity can be removed in favor of Poisson gravity, including the performance implications for GPU-based architectures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- hpc, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100