From 1e2a23943cf2e83a69561ceee06de35ef6b221c7 Mon Sep 17 00:00:00 2001 From: Arianna Formenti Date: Mon, 16 Dec 2024 14:01:34 -0800 Subject: [PATCH] integrate suggestions --- Docs/source/usage/parameters.rst | 7 +------ ...test_3d_open_bc_poisson_solver_heffte.json | 20 ------------------- .../fields/IntegratedGreenFunctionSolver.H | 4 ++-- .../fields/IntegratedGreenFunctionSolver.cpp | 6 +++--- 4 files changed, 6 insertions(+), 31 deletions(-) delete mode 100755 Regression/Checksum/benchmarks_json/test_3d_open_bc_poisson_solver_heffte.json diff --git a/Docs/source/usage/parameters.rst b/Docs/source/usage/parameters.rst index 0885d1107c9..310a7986abf 100644 --- a/Docs/source/usage/parameters.rst +++ b/Docs/source/usage/parameters.rst @@ -290,7 +290,7 @@ Overall simulation parameters In electromagnetic mode, this solver can be used to initialize the species' self fields (``.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. + * ``warpx.use_2d_slices_fft_solver`` (`bool`, default: 0): Select the type of Integrated Green Function solver. If 0, solve Poisson equation in full 3D geometry. If 1, solve Poisson equation in a quasi 3D geometry, neglecting the :math:`z` derivatives in the Laplacian of the Poisson equation. In practice, in this case, the code performes many 2D Poisson solves on all :math:`(x,y)` slices, each slice at a given :math:`z`. @@ -298,11 +298,6 @@ Overall simulation parameters As a consequence, this solver does not need to do an FFT along the :math:`z` direction, and instead uses only transverse FFTs (along :math:`x` and :math:`y`) at each :math:`z` position (or :math:`z` "slice"). - * 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`. - * ``warpx.self_fields_required_precision`` (`float`, default: 1.e-11) The relative precision with which the electrostatic space-charge fields should be calculated. More specifically, the space-charge fields are diff --git a/Regression/Checksum/benchmarks_json/test_3d_open_bc_poisson_solver_heffte.json b/Regression/Checksum/benchmarks_json/test_3d_open_bc_poisson_solver_heffte.json deleted file mode 100755 index e32b5181df6..00000000000 --- a/Regression/Checksum/benchmarks_json/test_3d_open_bc_poisson_solver_heffte.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "lev=0": { - "Bx": 100915933.44552392, - "By": 157610622.18550807, - "Bz": 8.739731456892512e-12, - "Ex": 4.725065270619816e+16, - "Ey": 3.025394898923131e+16, - "Ez": 3276573.95147766, - "rho": 10994013582437.193 - }, - "electron": { - "particle_momentum_x": 5.701277606055911e-19, - "particle_momentum_y": 3.650451663619896e-19, - "particle_momentum_z": 1.145432768297242e-10, - "particle_position_x": 17.314086912497864, - "particle_position_y": 0.2583691267187796, - "particle_position_z": 10066.329600000008, - "particle_weight": 19969036501.910976 - } -} diff --git a/Source/ablastr/fields/IntegratedGreenFunctionSolver.H b/Source/ablastr/fields/IntegratedGreenFunctionSolver.H index 798d5edea14..9492cff885e 100755 --- a/Source/ablastr/fields/IntegratedGreenFunctionSolver.H +++ b/Source/ablastr/fields/IntegratedGreenFunctionSolver.H @@ -48,7 +48,7 @@ namespace ablastr::fields } - /** @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 * * @param[in] x x-coordinate of given location * @param[in] y y-coordinate of given location @@ -130,7 +130,7 @@ namespace ablastr::fields amrex::MultiFab & phi, std::array const & cell_size, amrex::BoxArray const & ba, - bool do_2d_slices); + bool is_igf_2d_slices); } // namespace ablastr::fields diff --git a/Source/ablastr/fields/IntegratedGreenFunctionSolver.cpp b/Source/ablastr/fields/IntegratedGreenFunctionSolver.cpp index 501458ed679..998bb179f5b 100755 --- a/Source/ablastr/fields/IntegratedGreenFunctionSolver.cpp +++ b/Source/ablastr/fields/IntegratedGreenFunctionSolver.cpp @@ -35,7 +35,7 @@ computePhiIGF ( amrex::MultiFab const & rho, amrex::MultiFab & phi, std::array const & cell_size, amrex::BoxArray const & ba, - bool const do_2d_slices) + bool const is_igf_2d_slices) { using namespace amrex::literals; @@ -59,7 +59,7 @@ computePhiIGF ( amrex::MultiFab const & rho, } if (!obc_solver || obc_solver->Domain() != domain) { amrex::FFT::Info info{}; - if (do_2d_slices) { info.setBatchMode(true); } // do 2D FFTs + if (is_igf_2d_slices) { info.setBatchMode(true); } // do 2D FFTs info.setNumProcs(nprocs); obc_solver = std::make_unique>(domain, info); } @@ -69,7 +69,7 @@ computePhiIGF ( amrex::MultiFab const & rho, amrex::Real const dy = cell_size[1]; amrex::Real const dz = cell_size[2]; - if (!do_2d_slices){ + if (!is_igf_2d_slices){ // 2D sliced solver obc_solver->setGreensFunction( [=] AMREX_GPU_DEVICE (int i, int j, int k) -> amrex::Real