aboutsummaryrefslogtreecommitdiff
path: root/Source/Parallelization/GuardCellManager.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-09-24Exchange fewer guard cells with standard PSATD solver (#2266)Gravatar Neïl Zaim 1-0/+5
* Try to exchange fewer guard cells with standard PSATD solver * Add ng_afterPushPSATD variable in GuardCellManager
2021-08-30ECT conformal solver (#1923)Gravatar Lorenzo Giacomel 1-1/+2
* adding base implementation of the conformal solver * adding some preprocessor directives * qualifying the isnan's correctly * getting rid of some unused fields * computing S_stab on the fly * using empty in length check * Source/FieldSolver/FiniteDifferenceSolver/EvolveB.cpp * replaced a looponcpu with a parallelfor * trying to not pass lending/borrowing info by reference in evolveB * passing data using dataPtr * converting inds into a device vector * simplifying some += * extracting the inds BaseFabs as DataPtr * Revert "extracting the inds BaseFabs as DataPtr" This reverts commit bc709d2fcaa347c119514de79a3f57169a05af65. * implementing new way ogf handling cell extensions (gpu compatible) * fixing some white spaces * removed a typo * made a function static * tidying up * tidying up * getting rid of the rho vector * moving the rho update to evolveE * refectoring the cell extension * small chenge in input parameters * updating WarpX.H * bug fix * fixing another bug * rotating the cube * updated gitignore * using the conformal soler in the cube test * fixing the signature of a function * trying to fix the setVal problem * Revert "trying to fix the setVal problem" This reverts commit c7d0e5e3709b730ff570183b2a6df5f587ca4640. * trying to fix the setVal problem * cleaning some comments * removing an abort in device code * Including geometric information in the external field initializer * cleaned up the test * moving the geometric data initialization before the external fields initialization * changing way of saving info about intruded cells * fixed some white spaces * Using S_mod instead of S_red and S_enl * substituting a std::vector with amrex::Array1D * bug fix in the uint8_t -> coords maps * Condensed ect cell info into one single MultiFab * fixing some includes * fixing some more includes * fixed a typo * making some functions available in gpu code * using tilebox instead of validbox for the geometry initialization * communicating the geometric info in the guard cells * fixing the guard cells initialization for ect * fixing an unused parameter * fixing an unused parameter * ignored some unused variables when EB is not supported * cleaning up * cleaning up * ignored some unused variables when EB is not supported * evolving rho just for ect * handling some more unused variables * removing some white spaces * adding the rotated cube test * removed some white spaces * change cells into faces * small fix in unused parameters * fixed a comment * for safety for now just initialize the geometric data when lev==maxLevel * adding some preprocessor directives to isolate EB code * updating Makefile stuff * Improving the rotated cube test * bug fix in mesh refinement * fixing boundary conditions in rotated cube test * deactivating MPI in rotated cube test * activating mpi in test * improving outputs of cells extension * improved the documentation * Update Source/EmbeddedBoundary/WarpXInitEB.cpp Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> * Update Source/EmbeddedBoundary/WarpXInitEB.cpp Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> * Removed some obsolete isnan's * undone change to gitignore * adding some missing AMREX_GPU_DEVICEs * Changing some amrex::Real(0) into 0. Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Making some variables const Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Adding amrex:: to some ignore_unused Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Enhancing readability of some parallelfor's Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Removed some unecessary includes * Fixing some tags Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Fixing the function CountExtFaces * added a comment for Rhofield * Fixed a typo in CountExtCells * trying to remove accesses to private members in ComputeEdgeLengths * making some functions public * undoing some useless changes * undoing some useless changes * adding some AMREX_GPU_DEVICEs * adding some unused variables * adding some AMREX_GPU_DEVICEs to fix warnings * fixing relative error * Making several variables const Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Fixed a comment Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * changing some double to amrex::Real * removing commented lines * changing some double to amrex::Real * removing commented lines * inizialing nelems_x,y,z to avoid a warning * Fixing number of cells * Adding missing analysis routine in rotated cube test Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Making some variables constexpr Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> * Improving some reduce operations Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> * reading time directly from the output * fixed a few data types * fixing another int * Replacing or->||, and->&&, not->! * Adding license info * Adding a white space Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * removed some unused imports * Moving the doxygen documentation * Including AMReX_LayoutData.H * removing some useless parameters * adding ect solver to the doc * Removing some useless reductions * Small change for consistency * Handling the resizing of arrays * Handling correctly the resing of arrays * Fixing some whitespaces * Fixing an indentation * Improving a comment * Removed a useless initialization * Renamed Rhofield to ECTRhofield * Renamed Rhofield to ECTRhofield * Added some if conditions to isolate some EB related code * Improved some comments Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Made some functions not member of WarpX anymore * Isolated some EB-only code * Isolated some EB-only code * Using the square brackets to access vectors * Ignoring some unused variables * Bug fix in initialization * Removed a redundant if * Using enumeration for connectivity and improved names * Added a comment * added a few comments * Removed some useless template parameters * Printing some info only in verbose mode * Revert "Removed some useless template parameters" This reverts commit 2c527980e6872c0212767c27f00e2b53ecbcfd0a. * Fixed a bug with the neighbours enumeration * Initializing geom data alsoo in the ghost cells Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-06-28Multi-J scheme (#1828)Gravatar Remi Lehe 1-0/+2
* Introduce new option skip_deposition * Properly implement the option to skip deposition * Skip deposition for electrostatic solver * Correct typo * Add Index Enumerator and Equations for F/G Without Averaging * Define new functions for current deposition and charge deposition * Disable interpolation between levels * Correct compilation error in RZ mode * Add argument for relative time * Add Index Enumerator and Equations for F/G With Averaging * [skip ci] Add new OneStep function * Fix compilation errors * Correct more compilation errors * [skip ci] Fix compilation * Split the PSATD push into separate functions * Add guards for rho field * [skip ci] Use new functions in OneStep * [skip ci] Separate the inverse transform of E_avg, B_avg * Add deposition of rho * [skip ci] Prevent deposition of rho if unallocated * Fix error in deposition function * Add subcycling of current deposition * [skip ci] Add inverse transform of averaged fields * [skip ci] Move component of rho * Add function to copy J * Temporarily deactivate contribution from F * [skip ci] Implement call to linear in J * Add psatd time averaging for multiJ * [skip ci] Fix implementation of averaging * [skip ci] Implement divE cleaning * Fix Bug for RZ Builds * Fix Bug for RZ Builds * Fix Bug in Init of PML Spectral Solvers * Cleaning * Cleaning * Add div(B) Cleaning (G Equation) * Multi-J Not Implemented with Galilean PSATD or PMLs * Add 2D CI Test Using Multi-J Scheme * Add More Inline Comments * Add More Inline Comments & Doxygen * Add Doxygen for Constructor of SpectralSolver * More Doxygen in Class SpectralSolver * Add Doxygen for New Functions in WarpXPushFieldsEM.cpp * Add Doxygen for New Functions in WarpX/MultiParticleContainer * do_dive/b_cleaning Must Be True With linear_in_J Option * Cast multij_n_depose to Real in Divisions * New Input Syntax * Add const where Possible, Fix Warnings * Docs for New Input Syntax, Fix Abort Messages * Consistent Use of Idx, IdxAvg, IdxLin * Improve Documentation of psatd.J_linear_in_time * Use const Type Qualifier whenever Possible * Simplify Initialization of Pointer ion_lev * Improve Doxygen * Update documentation * Add Note on NCI to Docs * Make warpx.do_multi_J_n_depositions Not Optional * Simplify Logic in getRequiredNumberOfFields * Use More const Type Qualifiers Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2021-06-24Use "Include What You Use" on WarpX (#1947)Gravatar Luca Fedeli 1-7/+15
* 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-19Set guard cells for allocation using field solver stencil and particle shape ↵Gravatar Revathi Jambunathan 1-10/+36
factor (#1969)
2021-05-03Implement div(B) Cleaning With FDTD (#1829)Gravatar Edoardo Zoni 1-0/+9
* Implement div(B) Cleaning With FDTD * Add CI Test * Clean Up
2021-04-15Hybrid Galilean: Same Guard Cells in z as Nodal (#1887)Gravatar Edoardo Zoni 1-11/+25
* Galilean Staggered: Same Guard Cells in z as Nodal * Update Benchmarks of Hybrid Tests
2021-03-18Use Clear Naming Standard for ParmParse Variables (#1809)Gravatar Edoardo Zoni 1-4/+4
2021-03-04Remove extra ghost cell used with momentum-conserving gathering (#1758)Gravatar Edoardo Zoni 1-7/+0
2021-01-27Take time step into account to compute guard cells for J and rho (#1607)Gravatar Edoardo Zoni 1-7/+22
* Use IntVect for ng_J and ng_rho * Compute guard cells for J and rho based on dt * Reset some CI benchmarks * Fix rebase commit * Add back +1 cell for rho: fix remaining out-of-bound accesses * Simplify ASSERTS using new interface of amrex::numParticlesOutOfRange
2020-12-11PSATD Runtime Control (#1300)Gravatar Axel Huebl 1-41/+39
* Docs: PSATD Runtime Option * Tests: PSATD Runtime Option Add new runtime option to PSATD regression test matrix. * PICMI: PSATD runtime option * Source: PSATD Runtime Option
2020-12-02Improve spectral solver on staggered grids (#1468)Gravatar Edoardo Zoni 1-4/+4
* Implement Galilean PSATD equations on staggered grids * Implement high-order interpolation in 2D/3D * Include missing header file and small clean-up * Fix bug for FDTD build * Small clean-up * Modify current correction for staggered grids * Implement comoving PSATD scheme (formulation with rho) * Fix single-precision builds * Do not implement rho-free formulation for comoving PSATD yet * Invert sign of comoving velocity to match Galilean convention * Fix two bugs in comoving PSATD algorithm * Update benchmark of CI test momentum-conserving-gather * Update benchmark of CI test PlasmaAccelerationMR * Update documentation * Clean up comoving PSATD class * Clean up comoving PSATD class (more) * Clean up comoving PSATD class (more) * Implement changes requested in PR review * Add 2D regression test for staggered Galilean PSATD * Add 2D regression test for staggered comoving PSATD * Unify input files for new CI tests to avoid duplication * Fully rebase benchmarks changes on development * Update benchmark of Galilean hybrid test after #1536
2020-09-30Use fewer guard cells for deposition (#1368)Gravatar Edoardo Zoni 1-1/+10
* Use fewer guard cells for deposition * Update some CI benchmarks * Revert "Update some CI benchmarks" This reverts commit 2f40062557d75e3f6b2d3ba284332b8a92a0d404. * Check if shapes and guard cells are compatible only for rho * Do not allocate one extra guard cell for J * Add more relaxed check on shapes and guard cells for J
2020-09-06CKC: Use Enum instead consequently (#1299)Gravatar Axel Huebl 1-1/+3
Use the enums `MaxwellSolverAlgo` consequently for value of `WarpX::maxwell_solver_id`.
2020-08-24Fix some warnings (#1239)Gravatar Luca Fedeli 1-3/+6
This PR fixes the source of several compilation warnings. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-08-06Use psatd.n<xz>_guard, not psatd.n<xy>_guard, in 2D and RZ (#1237)Gravatar Edoardo Zoni 1-1/+5
2020-07-27Rename Input to `algo.maxwell_solver` (#1188)Gravatar Axel Huebl 1-2/+2
* Rename Input to `algo.maxwell_solver` Rename the input option `algo.maxwell_fdtd_solver` to `algo.maxwell_solver` and throw a useful error message for users using the old option. This is in preparation to unify FDTD and PSATD input control to reduce mutually exclusive binary variants of WarpX. * MW Solver Name: Update Examples Update all example to use the new algo.maxwell_solver option. * Fix typo in comutation of dt Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2020-07-17Fixing compiler warnings (#1178)Gravatar Olga Shapoval 1-3/+3
* Removed unused variables and made 'vy=v_galilean[1]' declaration conditional on 3D case (this fixes compiler warnings) * Avoid unnecessary conversion from 'double' to 'int' (this fixes compiler warnings)
2020-04-17Remove code for hybrid PSATD, as well as remaining Fortran interface file (#927)Gravatar Remi Lehe 1-35/+32
* Clean-up hybrid code * Remove Fortran interface
2020-03-11Added optional user defined number of guard cells to use with PSATD solver ↵Gravatar Olga Shapoval 1-14/+13
(#787) * Added optional user defined number of quard cells to use with PSATD solver. * Removed temporary comments. * Changed names nx_guard_psatd to psatd.nx_guard for consistency.
2020-02-27Comment/Remove Unused Parameters (#749)Gravatar Axel Huebl 1-0/+6
Use the `clang-tidy` pass `misc-unused-parameters` to remove unused parameter warnings. https://clang.llvm.org/extra/clang-tidy/checks/misc-unused-parameters.html) Committed as generic user so git does not credit the many lines to me: ```bash GIT_AUTHOR_NAME="Tools" GIT_AUTHOR_EMAIL="warpx@lbl.gov" \ git commit ```
2020-02-25Includes: Clean Up (#743)Gravatar Axel Huebl 1-1/+3
- Use `""` for WarpX-local includes - Order: WarpX `""`, AMReX `<>`, other third party includes `<>` - Add dir prefixes for WarpX Add order to includes by including from `Source/` onward and keeping directory prefixes of non-local includes for clarity.
2020-02-21Make the option to exchange all guard cells safer (#709)Gravatar MaxThevenet 1-2/+2
* make the option to exchange all guard cells safer * EOL **** * more consistent naming in guard cells test script
2020-02-18Galilean PSATD with shift (#704)Gravatar Olga Shapoval 1-3/+13
* Read Galilean velocity * Prepare structures for Galilean solver * Started implementing Galilean equations * Analytical limits for X1, X2, X3, X4 coefficients added * Slight changes added * Added Galilean position pusher * Scale galilean velocity * Remove unneeded Abort * Fix Galilean pusher * Allocate Theta2 array * Fix definition of coefficients * Increase guard cells for Galilean * Add guard cell in particle exchange * Type corrected * v_gal added to warpx_current_deposition * v_gal added to WarpXParticleContainer.H * Bug fixed - update particle x-position over one time step * Fix issues with merge from dev * Preparation for merging dev into galilean. * Adding galilean shift * Implemented galilean shift * Changed method's name from GalileanShift to ShiftGalileanBoundary * Added doxygen string for ShiftGalileanBoundary * Removed never used method LowerCornerWithCentering * Removed temporary comments * Removed dt as a variable from DepositCharge method and its dependencies * Converted tab to spaces * Removed EOL white space * Add documentation and automated tests * Fix compilation error * Add automated test * Update automated test * Removed temporary used galilean shift * Removed temporary used particle's push for Galilean PSATD * Removed unused statement * Remove EOL white space. * Added zero shift for LowerCorner in RZ geometry * Minor changes to Galilean implementation * Modifications for GPU * Fix typo Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2020-01-27Automatically add copyright header with update_copyright.shGravatar Tools 1-0/+6
2020-01-14fix error MW 1 MR 1 subcycling 0Gravatar MaxThevenet 1-1/+3
2020-01-08delete EOL whitespaceGravatar MaxThevenet 1-1/+1
2020-01-08option to always exchange all guard cellsGravatar MaxThevenet 1-30/+43
2020-01-03include Remi's suggestionsGravatar MaxThevenet 1-6/+2
2019-11-12no guard cell exchanges for F with Yee solver. Remove print statementsGravatar MaxThevenet 1-0/+3
2019-11-12cleaning, and additional checksGravatar MaxThevenet 1-1/+3
2019-11-12fix psatd: problem was in buffer cellsGravatar MaxThevenet 1-12/+4
2019-11-12Revert "move FillBoundaryF call to where needed, and allow for extra guard ↵Gravatar MaxThevenet 1-14/+1
cells" This reverts commit 89069ca7ba61dc34f9b392c75d0d4e2f3c2e0938.
2019-11-11move FillBoundaryF call to where needed, and allow for extra guard cellsGravatar MaxThevenet 1-1/+14
2019-11-10pfew fix bug (that could lead to SEGFAULT), and indentationGravatar MaxThevenet 1-2/+3
2019-11-06exchange 1 extra guard cell when moving window and PMLsGravatar MaxThevenet 1-0/+4
2019-10-31do not update aux grids if PSATDGravatar MaxThevenet 1-0/+11
2019-10-31cleaning and use better namingGravatar MaxThevenet 1-1/+9
2019-10-31more systematic names for guard cell variablesGravatar MaxThevenet 1-36/+25
2019-10-31remove a bunch of unused variables, and prepare for some renamingGravatar MaxThevenet 1-31/+25
2019-10-31Each call to FillBoundary in regular PIC loop (FDTD) uses fewer guard cellsGravatar MaxThevenet 1-8/+19
2019-10-30no need to pass ng in ShiftMFGravatar MaxThevenet 1-2/+7
2019-10-29Reduce number of guard cells exchanged in Moving window and EvolveEMGravatar MaxThevenet 1-1/+6
2019-10-28Pass fewer guard cells in a number of FillBoundary callsGravatar MaxThevenet 1-0/+1
2019-10-27FillBoundaryE/B/F take mandatory argument nguardGravatar MaxThevenet 1-4/+6
2019-10-27avoid redeclaring variablesGravatar MaxThevenet 1-0/+14
2019-10-27forgot to add two filesGravatar MaxThevenet 1-0/+118