-
Notifications
You must be signed in to change notification settings - Fork 198
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 quasi-3D Integrated Green Functions solver #5089
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR! I left a few comments.
Docs/source/usage/parameters.rst
Outdated
@@ -290,6 +290,19 @@ Overall simulation parameters | |||
In electromagnetic mode, this solver can be used to initialize the species' self fields | |||
(``<species_name>.initialize_self_fields=1``) provided that the field BCs are PML (``boundary.field_lo,hi = PML``). | |||
|
|||
* warpx.use_2d_slices_fft_solver (`bool`, default: 0): Select the type of Integrated Green Function solver. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* warpx.use_2d_slices_fft_solver (`bool`, default: 0): Select the type of Integrated Green Function solver. | |
* ``warpx.use_2d_slices_fft_solver`` (`bool`, default: 0): Select the type of Integrated Green Function solver. |
@@ -0,0 +1,20 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove this .json
file? It seems that it is no longer needed/used.
Docs/source/usage/parameters.rst
Outdated
* warpx.use_distributed_3d_fft_solver (`bool`, default: 0): Choose whether the 3D FFTs performed in the | ||
full 3D Integrated Green Function solver are distributed. | ||
If 0, the FFTs are performed on a single MPI rank (the rest of the code is still fully parallel). | ||
If 1, the FFTs are distributed using the heFFTe library. The code must be compiled with `-DWarpX_HEFFTE=ON`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove this? It seems that it is not actually used in the code.
} | ||
|
||
|
||
/** @brief Implements minus equation 58 in https://doi.org/10.1016/j.jcp.2004.01.008 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** @brief Implements minus equation 58 in https://doi.org/10.1016/j.jcp.2004.01.008 | |
/** @brief Implements equation 58 in https://doi.org/10.1016/j.jcp.2004.01.008 |
I think I understand what is meant here, but the term "minus equation" might be confusing. I think it is fine to simply say "equation 58".
@@ -90,7 +129,8 @@ namespace ablastr::fields | |||
computePhiIGF (amrex::MultiFab const & rho, | |||
amrex::MultiFab & phi, | |||
std::array<amrex::Real, 3> const & cell_size, | |||
amrex::BoxArray const & ba); | |||
amrex::BoxArray const & ba, | |||
bool do_2d_slices); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to use the same name (is_igf_2d_slices
) as in the other functions - instead of do_2d_slices
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sure!
@@ -71,7 +69,9 @@ computePhiIGF ( amrex::MultiFab const & rho, | |||
amrex::Real const dy = cell_size[1]; | |||
amrex::Real const dz = cell_size[2]; | |||
|
|||
obc_solver->setGreensFunction( | |||
if (!is_igf_2d_slices){ | |||
// 2D sliced solver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment here and the one in the else part are incorrect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops! I will fix it
This is a minor follow-up to PR #5089. It fixes two comments and adds the documentation entry about `ablastr.nprocs_igf_fft`. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This PR implements a quasi-3D Poisson solver based on the Integrated Green's functions.
It solves the 2D Poisson equation on the
(x,y)
plane for every slicez
.It is useful for beam-beam simulations.
See PR #4648 for the full 3D solver.
🔪 🐟