aboutsummaryrefslogtreecommitdiff
path: root/Source/Parallelization/WarpXComm.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-06-16Generalize buffers for `SyncRho`, `SyncCurrent`, and related functions (#3995)Gravatar Edoardo Zoni 1-30/+34
2023-06-13Enforce const correctness using clang-tidy CI test (#3921)Gravatar Luca Fedeli 1-14/+14
* add clang-tidy workflow * fix missing newline * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * make clang.14.sh executable * remove non explicitly selected checks * complete list of dependencies * fix bug * specify path of clang-tidy file * fix bug * add new check * remove one check * add magic numbers check * removed one check * keep only one check * Docs: Conda Dev w/ Boost (#3911) Add the `boost` package to the conda developer environment. Used for QED table generation. * Fix typo in Adastra cluster documentation (#3918) * add back three checks * prepare clang-tidy wrapper * actually use clang-tidy in the script * test * fix bug * actually use clang-tidy * fixed bug * fixed bug * fixed bug * fixed bug * remove all checks except the selected 3 * fixed bug * fixed bug * fixed bug * enforce const correctness using clang-tidy * remove one check * Fix Concurrency Issue * BLAS++/LAPACK++ for RZ+PSATD * Build all 4 WarpX DIMS * add few echo for test purposes * try to debug mysterious error * don't test RZ with clang-tidy * add back RZ test * add some const * fix bug * check also header files * remove header filter since it does not work as expected * fixed bug * check also WarpX headers * fix bugs * continue enforcing const correctness * continue enforcing const correctness * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed bug * fix bugs and add new const * clean .clang-tidy * make regex more precise according to Weiqun's suggestion * add more const * fix bugs * fix bug * silence warning on float comparison * fixed bug * fixed bugs * fix bug and add const * fixed bugs * fix bug * fix bug * fix bug * fixed bug * fix bug
2023-06-12Replace amrex::Abort with WARPX_ABORT_WITH_MESSAGE (#3965)Gravatar Luca Fedeli 1-4/+4
* replace amrex::Abort with WarpX macros * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * adding back missing include * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * use amrex::Abort in a GPU kernel * bump precision
2023-06-09Fix SyncCurrent and SyncRho for multi-levels (#3777)Gravatar Weiqun Zhang 1-36/+195
* Fix SyncCurrent and SyncRho for multi-levels Previously these two function did not work when max_level > 1. For example, when max_level = 2, the coarse patch data from level 2 were coarsened and added to the fine patch on level 1. However, the coarse patch on level 1 did not have any contribution from level 2 as it should have, because the coarsening was performed before the fine patch on level 1 received the level 2 contribution. The order has been fixed in this commit. * Improve inline comment Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> * Improve inline comments * Reset CI benchmark * Add comments * Update Source/Parallelization/WarpXComm.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Parallelization/WarpXComm.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Parallelization/WarpXComm.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> --------- Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <ezoni@lbl.gov> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2023-04-10`SyncRho`: Pass References To Charge MultiFabs (#3814)Gravatar Remi Lehe 1-6/+13
* `SyncRho`: Pass References To Charge MultiFabs * Keep a function SyncRho for the Python interface * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-12-08ABLASTR: Coarsen Functions (#3433)Gravatar Axel Huebl 1-9/+9
* ABLASTR: Coarsen Functions Move coarsen functions to ABLASTR. Rename by property of the coarsening function. * Remove unused imports Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2022-11-07Allow `None` for Maxwell solver (#3504)Gravatar Roelof Groenewald 1-1/+1
* Add "None" as an option for the Maxwell solver * fixed some of the reasons for failing CI tests * no longer pass `do_electrostatic` to `GuardCellManager` * renamed `MaxwellSolverAlgo` to `ElectromagneticSolverAlgo` * rename `do_electrostatic` to `electrostatic_solver_id` * rename `maxwell_solver_id` to `electromagnetic_solver_id` * changes requested during PR review * remove `do_no_deposit` from tests without field evolution * Fix doc-string in `GuardCellManager.H` Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2022-10-28ABLASTR: Always Sync Option (#3467)Gravatar Axel Huebl 1-12/+12
* ABLASTR: Always Sync Option Add an option to ABLASTR/WarpX to always sync nodal cells that are owned by multiple blocks. This can be used for debugging. * Fix typo Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Use New Option in One CI Test * Fix Logic: Force only to be `true`, not `false` Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2022-10-10Partial refactoring of the utils directory (#3404)Gravatar Luca Fedeli 1-1/+0
* initial work to clean WarpX Utils * remove AMRCore from Ionization tables * progress * refactoring of a part of the utils directory * fix bug * fixed bug * fixed bug * remove debug line accidentally slipped into the code * remove debug line accidentally slipped into the code * remove debug line accidentally slipped into the code * cleaning * fixed bug
2022-09-09`SyncCurrent`: Split Filter and Sum over Guard Cells (#3222)Gravatar Edoardo Zoni 1-93/+114
* Split ApplyFilterandSumBoundaryJ * Fix Bug * Fix Bug * Fix CI * Pass Correct Periodicity to SumBoundaryJ * Use ApplyFilterJ and SumBoundaryJ w/ MR * Fix Bug (duplicate loops over dimensions) * Use ApplyFilterJ and SumBoundaryJ w/ MR * Clean up Variable Names in ApplyFilterJ * Increase Guard Cells of All MultiFabs, Not Only J * Reset CI Checksums
2022-08-02`SyncCurrent`: Pass References To Current MultiFabs (#3277)Gravatar Edoardo Zoni 1-4/+3
* `SyncCurrent`: Pass References To Current MultiFabs * Add Doxygen for `SyncCurrent`
2022-07-05Merge `FillBoundary` and `NodalSync` (`OneStep_multiJ`) (#3169)Gravatar Edoardo Zoni 1-40/+0
* Merge `FillBoundary` and `NodalSync` (`OneStep_multiJ`) * `NodalSync` Not Needed Anymore
2022-06-08ABLASTR: Move Communication Utilities (#3167)Gravatar Axel Huebl 1-76/+104
* Move: WarpXCommUtils to ABLASTR * Update Usage Locations * Refactor: `WarpX::do_single_precision_comms` Do not use a global from WarpX in ABLASTR routines.
2022-06-07Merge `FillBoundary` and `NodalSync` (`OneStep_nosub`, `OneStep_sub1`) (#3013)Gravatar Remi Lehe 1-30/+30
* Add argument for synchronizing nodal points * Add the option to overridesync in FillBoundaryE / FillBoundaryB * Remove explicit synchronization * Cleanup calls to nodal synchronization * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Improve const Correctness * Cleaning * Merge NodalSync and FillBoundary First Restarting the implementation from scratch. To-do: remove redundant FillBoundary calls. * Merge Only for OneStep_nosub and OneStep_sub1 * Fix Checksums of Python_wrappers * Define sync_nodal_points as WarpX Private Member Variable * Keep Calls to NodalSync for B * Keep Calls to NodalSync for F * Reset Benchmark of reduced_diags_single_precision * OneStep_sub1: Remove All Calls to NodalSync * OneStep_nosub: Remove All Calls to NodalSync * Reset Benchmark of divb_cleaning_3d Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2022-04-14Remove Nodal Synchronization of J and Rho (#3038)Gravatar Edoardo Zoni 1-5/+0
* Remove Nodal Sync of J and Rho * Reset Benchmark of reduced_diags_single_precision
2022-04-07Vay Deposition: Fix SyncCurrent, FFTs (#3012)Gravatar Edoardo Zoni 1-3/+1
2022-04-04Refactoring: More General Interfaces (#2991)Gravatar Edoardo Zoni 1-70/+87
* Refactoring: More General Interfaces (J, rho) * Refactoring: More General Interfaces (E, B) * Refactoring: More General Interfaces (rho) * Fix const Correctness * Fix const Correctness (continued) * Fix Bugs * Refactoring: More General Interfaces (averaged E, averaged B)
2022-03-22Vay Deposition: Separate Arrays, Correct Index Types w/ FFTs (#2965)Gravatar Edoardo Zoni 1-45/+59
* Refactoring * Separate Arrays (Fine Patch) * Add Aborts w/ Current Centering, MR * Cleaning * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-03-21Hybrid Algorithms: Add FDTD Support for Centering (#2327)Gravatar Edoardo Zoni 1-65/+35
* Hybrid Algorithms: Add FDTD Support for Centering * Current Centering Incompatible with Esirkepov Deposition * Remove FDTD v. PSATD Runtime Conditions * Add CI Test * Rename coefs as coeffs in getFornbergStencilCoefficients * amrex::Vector: Use at() Instead of Operator [] * Reset Benchmark * Reset Benchmark * Cleaning * Reduce Size of New CI Test * Reset Benchmark * Fix Bug
2022-03-08Make error and info messages visually uniform (#2939)Gravatar Luca Fedeli 1-7/+8
* initial work to add msg formatter * wip * replace AMREX_ALWAYS_ASSERT_WITH_MESSAGE with WarpX equivalent
2022-03-03Bugfix for LB + MR + Filter (#2917)Gravatar Andrew Myers 1-6/+6
Make sure we update the right costs multifab when apply the filter in the presence of mesh refinement.
2022-01-24PML Exchanges: Less Duplicate Code (#2394)Gravatar Edoardo Zoni 1-99/+71
Similarly to #2375, I'm trying to see if we can reduce the amount of duplicate code, in this case for the functions `Exchange<E,B>` of the PML class. Open for discussion.
2022-01-20Implement PML for the outer RZ boundary with PSATD (#2211)Gravatar David Grote 1-20/+59
* Initial version of RZ PSATD PML BCs * Cleaned up some bugs * Add support of do_pml_in_domain option * Cleaned up stuff for building * Fix PMLPsatdAlgorithm macro * Removed unneeded variable from SpectralSolverRZ * Change length 3 arrays to length 2 (for 2D) * Cleanup around DampPML * Added more checks of pml[lev] * Added CI test for RZ PML * Added code to update the corner guard cells * Further updates * Added CI test * Fixed EOL space * Updated CI benchmarks, removing round off fields * Changes to CI missed on previous commit * Various fixes for clean up * More fixes for clean up * Further cleanup * Updated benchmark * Fixed benchmarks file * Minor cleanup * Added round off benchmark values * Fixed testname in analysis_pml_psatd_rz.py * Update comment in analysis file * Put pml_rz code in RZ and PSATD macro blocks * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add geometry.dims input to CI test input file, inputs_rz * Cleanup to match recent changes Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-03Replace AMREX_SPACEDIM: Boundary & Parallelization (#2620)Gravatar Prabhat Kumar 1-5/+5
* AMREX_SPACEDIM : Boundary Conditions * AMREX_SPACEDIM : Parallelization * Fix compilation * Update Source/Parallelization/WarpXComm_K.H
2021-11-191D3V Cartesian Support (#2307)Gravatar Prabhat Kumar 1-1/+3
* Build System: Add 1D Geometry * test PR * test PR * 1D cartesian yee algorithm * fixed typo * Fixes for PML * 1D support related multiple changes * Fix compilation * change 1D to 1D_Z * 1D Field Gather and typo fix * 1D Charge Deposition * Particle Pusher * multiple changes related to 1D * 1D diagnostics and initialization * PlasmaInjector and PEC fixes for 1D * clean-up delete diags file * mobility 1D laser particle and bilinear filter * deleted diags files * update laser particle weight formula * delete diags files * Azure: Add 1D Cartesian Runner * 1D fixes for FieldProbe * Update Docs/source/developers/dimensionality.rst Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * 1d laser injection and langmuir test input files * 1d tests * clean up : delete print statements * analyse simulation result for laser injection and Langmuir tests * EOL * delete input files for which there are no automated tests * delete input files for which there are no automated tests * add ignore_unused to remove warnings * remove space * Fix compilation issues * fix error : macro name must be an identifier * Small bug fix * cleanup Python script for analysis * bug fix * bug fix * Update ParticleProbe: Check 1D in-domain * Update Source/Make.WarpX * Update .azure-pipelines.yml * Add USE_OPENPMD=FALSE to .azure-pipeline.yml * resolve conflict * resolve conflict * fix typo * Correct out-of-bound access * Fix Particle BC in WarpXParticleContainer and correct path to checksumAPI in python analysis scripts * EOL * Fix bug : accessing out of bound index of cell in 1D * remove 1d test for cartesian3d * Fix CI check * Slight style change * Address review comments * Fix GPU compilation Filter.cpp * Fix CI * Fix Indentation * Address review comments * More consistent ifdef for dimension bigger than 1 * Update Examples/Tests/Langmuir/analysis_langmuir_multi_1d.py Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update GNUmakefile Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Regression/prepare_file_ci.py Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianCKCAlgorithm.H Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianNodalAlgorithm.H Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Filter/Filter.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Filter/Filter.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Filter/Filter.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Filter/Filter.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Initialization/PlasmaInjector.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Initialization/PlasmaInjector.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * add comment inline to explain twice push_back * Add amrex::Abort for NCIGodfreyFilter Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Prabhat Kumar <prabhatkumar@kraken.dhcp.lbl.gov> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: Remi Lehe <rlehe@lbl.gov>
2021-11-18WarpXComm.cpp: Use Explicit Types, not `auto` (#2578)Gravatar Edoardo Zoni 1-26/+29
* WarpXComm.cpp: Use Explicit Types, not `auto` * Use MultiFab* const instead of MultiFab* const&
2021-10-18Option to do single precision mesh communication. (#2294)Gravatar Andrew Myers 1-89/+101
* option to use single precision guard cell exhanges * add missing files * fix namespace issue * change precision of comms to float * ParmParse the single_precision_comms flag * set back to real * test * make sure dst is filled * nGrow -> nGrowVect * restore float * don't override valid cells * single precision mesh * whitespace * wrap SumBoundary * Wrap additional uses of FillBoundary. * catch missing copies of ParallelCopy * missing OverrideSyncs * add wrapper for iMultifab * fix typo * moar typos * typo * strip single_precision_mesh option * fix original copy * update fusible syntax Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> * Fix: Single Precision Builds Should not copy around data for `do_single_precision_comms` * Docs: warpx.do_single_precision_comms * initialize this tmp multifab to 0.0 * fix tiny profile label * remove orig copies, they are only correct for FillBoundary * loosen tolerance for space charge tests for single precision * missing some setVal * another missing setVal * missing setVal * add wrapper for new version of sumboundary * add explicit cast to silence compiler warning * add a test for single precision comms * revert change to test precision * add benchmark for single precision comms test * restore tolerance I removed by mistake * tolerance * copyright headers * drop tolerance for single precision tests in default analysis script * missing python module * bump tol again * fix bad merge * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov>
2021-10-18Multi-J Algo: Synchronize Nodal Points of F,G (#2434)Gravatar Edoardo Zoni 1-0/+18
2021-10-12Fix PML Behavior in FillBoundary for F,G (#2383)Gravatar Edoardo Zoni 1-49/+27
* Fix PML Behavior in FillBoundary for F,G * Update Benchmark of Test pml_psatd_dive_divb_cleaning
2021-10-06FillBoundaryG: Add PML Exchange (#2381)Gravatar Edoardo Zoni 1-2/+10
2021-10-06NodalSync: Less Duplicate Code (#2375)Gravatar Edoardo Zoni 1-58/+14
2021-09-27SumBoundary: Use Fewer Guard Cells for J/rho (#2323)Gravatar Edoardo Zoni 1-18/+60
* SumBoundary: Use Fewer Guard Cells for J/rho * Account for Stencil of Bilinear Filter * Revert Last Commit, Replace SumBoundary/Copy With ParallelAdd * Account for Stencil of Bilinear Filter * Reset Benchmarks of Averaged Galilean Hybrid Tests * Revert Last Commit This reverts commit 7963176b46708eb08e7c41e67a3b0a6fe6cb2147. * Account for Stencil of Current Centering
2021-09-27Allow more work for OpenMP threads in `WarpX::UpdateAuxilaryData` (#2342)Gravatar Remi Lehe 1-7/+7
* Allow more work for OpenMP threads in AuxilaryData * Better parallelization in stagger-to-nodal current interpolation
2021-08-24WarpXComm.cpp: Fix Bug (Uninitialized MultiFabs) (#2230)Gravatar Edoardo Zoni 1-0/+6
2021-08-16Use less guard cells in ParallelCopy of refined level's UpdateAuxilaryData ↵Gravatar Neïl Zaim 1-8/+24
(#2144) * Use less guard cells in ParallelCopy of refined level's UpdateAuxilaryData * Update Source/Parallelization/WarpXComm.cpp * Add inline comments and use explicit type for ng_src Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2021-07-12Add Cost Calculations for Cartesian/RZ Filtering (#2074)Gravatar Edoardo Zoni 1-8/+8
* Add Cost Calculations to ApplyFilter * Add Cost Calculations to ApplyStencil * Update Doxygen
2021-06-24Use "Include What You Use" on WarpX (#1947)Gravatar Luca Fedeli 1-6/+30
* initial tests with IWYU * added a couple of forward declarations * used iwyu on more files * progress * used iwyu on more files * progress with iwyu * progress with iwyu * fixed bug * progress with iwyu * progress with IWYU * progress with IWYU * fixed bug * fixed bug * progress with IWYU * progress with IWYU + use forward declarations in WarpX.H * first try with .def files * fix bugs * progress with IWYU * progress with IWYU * progress with iwyu * correct copyright * fixed bug * fixed bugs * fix missing include * fixed bug * fix bug * fix bug introduced during last bugfix * use iwyu on newly added files * add space * fix bug * fix missing include * fix missing include * fix missing include * fixed bugs * fixed bug * attempt at fixing issue with math functions * added missing include * fixed missing include * using _fwd.H * fixed bug * progress with iwyu * update AMReX branch * enforce alphabetic order * progress with iwyu * use right version of amrex * use right version of amrex for tests * fixed bug * fix another bug * fix missing include * fix missing include * fix missing include * updated amrex * initial work to document new include strategy * updated documentation * Fix rst & private includes * Remove accidentially added files * Fix rst code blocks * one more rst block Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-05-03Implement div(B) Cleaning With FDTD (#1829)Gravatar Edoardo Zoni 1-1/+59
* Implement div(B) Cleaning With FDTD * Add CI Test * Clean Up
2021-04-19Divergence cleaning for PSATD in PML (#1600)Gravatar Edoardo Zoni 1-0/+4
* Add div(E)/div(B) cleaning options for PSATD in PMLs * Pass missing flags to spectral solver in PML * Duplicate MPI exchange and communication functions for G * Use separate parameters for div cleaning in PMLs * Add asserts for features that are not implemented * Do not need to duplicate MPI exchange functions for G * Add short documentation for new input parameters * Set new parameters true by default with PSATD solver * Add CI test for PML div cleaning with PSATD * Use new syntax <diag_name>.intervals in new input file * Reset benchmark of new CI test * Always synchronize nodal points of G MultiFab * Fix few warnings in 2D build * Update Benchmark of pml_psatd_dive_divb_cleaning * Improve Documentation of warpx.do_pml_dive_cleaning Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Improve Documentation of warpx.do_pml_divb_cleaning Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Improve Abort Message * Clean Up Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com>
2021-04-12Add nodal synchronization of E and B fields in the main grid (#1817)Gravatar Neïl Zaim 1-0/+66
* Add nodal synchronization of E and B fields in the main grid * Update benchmarks * Update value in pml analysis file and put synchronization between PSATD push and FillBoundary * Update PML benchmarks and put the synchronization back in its original position * Bogus change in benchmark to trigger CI again * Update benchmarks
2021-03-29Add option for finite-order centering of currents (nodal to staggered) (#1763)Gravatar Edoardo Zoni 1-19/+99
* Start adding centering of current * Implement arbitrary order centering and split inputs * No need to define a brand new interpolation function * Update input file of hybrid CI tests * Clean up * Clean up more * Fix bug and clean up * Use current centering in two existing CI tests * Update documentation * Move Calls To UpdateCurrentNodalToStag Into SyncCurrent * Add Doxygen For New Function UpdateCurrentNodalToStag * Add Doxygen For New Functions Used For Stencil Coefficients * Finite-Order Centering of Currents Not Implemented With MR
2021-03-17Replaced almost all nGrow with nGrowVect (#1801)Gravatar David Grote 1-2/+2
2021-03-04Implement averaged algo on staggered grids & merge spectral classes (#1544)Gravatar Edoardo Zoni 1-12/+17
* Refactor and clean up some spectral classes * Abort when current correction or Vay deposition are not implemented * Implement general equations for averaged Galilean * Allocate averaged MultiFabs also when aux_is_nodal=1 and do_nodal=0 * Allocate +ngextra guard cells also for averaged MultiFabs * Make alias MultiFabs for averaged aux data * With averaging, interpolate from avg_fp (not fp) to aux * Fix some limits of the coefficients * Fix bug causing NaNs in spectral coefficients * Add 2D CI test with same analysis as nodal test * Add 3D CI test with same analysis as nodal test * Add limit that was not covered (knorm=0 && knorm_c!=0 && nu=0) * Allocate T2_coef only if Galilean algorithm is used * Allocate X4_coef only if Galilean algorithm is used * Remove extra ghost cell from 'avg_fp' MultiFabs
2021-03-04Remove extra ghost cell used with momentum-conserving gathering (#1758)Gravatar Edoardo Zoni 1-16/+16
2021-03-02CI: Always with FFTW/PSATD (#1587)Gravatar Axel Huebl 1-6/+6
* CI: Always with FFTW/PSATD Reduce build time by always building with FFTW and unifying PSATD tests. This also adds coverage for the case that we forget to make `#ifdef WARPX_USE_PSATD` runtime blocks, which can potentially be seen in FDTD runs now. * Remove worker with environment USE_WARPX_PSATD * Fix warpx_interp: Unconditional PSATD Fix the `warpx_interp` function to properly enable/disable PSATD logic based on runtime logic. Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2021-02-12Fix bug in loop over boxes in WarpX::UpdateAuxilaryDataStagToNodal (#1691)Gravatar Edoardo Zoni 1-5/+4
* Clarify loop over boxes in WarpX::UpdateAuxilaryDataStagToNodal * Loop over fabbox instead and pad with zeros beyond ghost cells * Clean up names of source and destination arrays
2021-02-02Refactor finite-order interpolation functions for momentum-conserving field ↵Gravatar Edoardo Zoni 1-50/+35
gathering (#1653) * Unify high-order Fornberg interpolation functions * Add Doxygen documentation for new function * Unify also FDTD linear interpolation functions * Improve new implementation * Compute stencil coefficients only at initialization * Small clean-up and optimization
2021-02-02Always synchronize nodal points of PML MultiFabs (#1669)Gravatar Edoardo Zoni 1-0/+35
* Always synchronize nodal points of PML MultiFabs * Reset benchmark for CI test pml_x_psatd * Use new separate functions NodalSyncPML
2021-01-21Define: _OPENMP -> AMREX_USE_OMP (#1520)Gravatar Axel Huebl 1-5/+5
* Define: _OPENMP -> AMREX_USE_OMP Replace the define check of `_OPENMP` with the explicit backend control of `AMREX_USE_OMP` for parallel constructs. Doing so avoids that we accidentially turn on OpenMP, e.g. if a dependency pulls it in for linear algebra, I/O, etc. This can led to confusion if the user explicitly requested a serial build. Also, we might want to use OpenMP functionality here and there for auxiliary functions w/o having to use the AMReX OpenMP backend, i.e. because we compile for GPUs. * Add missing amrex::Gpu::notInLaunchRegion
2021-01-12Remove unused functions "ExchangeWithPml..." (#1616)Gravatar Edoardo Zoni 1-38/+0