diff options
author | 2022-05-03 09:45:34 -0700 | |
---|---|---|
committer | 2022-05-03 16:45:34 +0000 | |
commit | a7cf8a4959df0e5cd5c5a97fce0bcafbeeee5655 (patch) | |
tree | 00a08fe7faacd20a93fa5025b15aa63d65db32bc /Source/FieldSolver/ElectrostaticSolver.cpp | |
parent | 2106601d3962f2f9655be9b9c9257742525260f4 (diff) | |
download | WarpX-a7cf8a4959df0e5cd5c5a97fce0bcafbeeee5655.tar.gz WarpX-a7cf8a4959df0e5cd5c5a97fce0bcafbeeee5655.tar.zst WarpX-a7cf8a4959df0e5cd5c5a97fce0bcafbeeee5655.zip |
Release 22.05 (#3076)
* AMReX: 22.05
* PICSAR: 22.05
* WarpX: 22.05
* Fix issue with RZ electrostatic solver
Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
Diffstat (limited to 'Source/FieldSolver/ElectrostaticSolver.cpp')
-rw-r--r-- | Source/FieldSolver/ElectrostaticSolver.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/FieldSolver/ElectrostaticSolver.cpp b/Source/FieldSolver/ElectrostaticSolver.cpp index 19615a04f..c2ec7d591 100644 --- a/Source/FieldSolver/ElectrostaticSolver.cpp +++ b/Source/FieldSolver/ElectrostaticSolver.cpp @@ -333,6 +333,7 @@ WarpX::computePhi (const amrex::Vector<std::unique_ptr<amrex::MultiFab> >& rho, } // Define the linear operator (Poisson operator) MLEBNodeFDLaplacian linop( {geom_scaled[lev]}, {boxArray(lev)}, {DistributionMap(lev)}, info ); + linop.setSigma({0._rt, 1._rt}); #else // Set the value of beta amrex::Array<amrex::Real,AMREX_SPACEDIM> beta_solver = @@ -370,7 +371,9 @@ WarpX::computePhi (const amrex::Vector<std::unique_ptr<amrex::MultiFab> >& rho, // With embedded boundary: extract EB info MLEBNodeFDLaplacian linop( {Geom(lev)}, {boxArray(lev)}, {DistributionMap(lev)}, info, {&WarpX::fieldEBFactory(lev)}); -#ifndef WARPX_DIM_RZ +#ifdef WARPX_DIM_RZ + linop.setSigma({0._rt, 1._rt}); +#else // Note: this assumes that the beam is propagating along // one of the axes of the grid, i.e. that only *one* of the Cartesian // components of `beta` is non-negligible. |