aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/FiniteDifferenceSolver (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-08-03initialize guard cells for macroscopic properties (#2159)Gravatar Revathi Jambunathan 1-2/+2
2021-07-13amrex::Parser (#2063)Gravatar Weiqun Zhang 2-12/+13
* amrex::Parser Replace WarpXParser with amrex::Parser. Roundoff errors are expected because of additional optimization in amrex::Parser. * Reset the Langmuir_multi_psatd_single_precision benchmark due to change in single precision parser * enable Intel oneAPI CI again * Update Source/EmbeddedBoundary/WarpXInitEB.cpp * Replace hard-coded number in ParticleDiag with a constexpr
2021-07-06fix unused variables (#2054)Gravatar Luca Fedeli 2-4/+2
2021-06-24Use "Include What You Use" on WarpX (#1947)Gravatar Luca Fedeli 21-94/+321
* 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-06-16Silver-Mueller: Avoid Managed Memory (#2019)Gravatar Axel Huebl 3-24/+26
Avoid relying on managed memory usage in Silver-Mueller boundary conditions. Previously, we initialized the coefficients on the host, copied them to device and then accidentially used the device memory on the host again, as we calculated some constants. This now keeps the initial host-memory around so we can use it for host-only operations.
2021-05-19Set guard cells for allocation using field solver stencil and particle shape ↵Gravatar Revathi Jambunathan 4-0/+32
factor (#1969)
2021-05-13CUDA: Quiet numerous warnings about unused-variable-warning suppressions ↵Gravatar Phil Miller 2-5/+4
being unreachable statements (#1957)
2021-05-03Implement div(B) Cleaning With FDTD (#1829)Gravatar Edoardo Zoni 5-7/+140
* Implement div(B) Cleaning With FDTD * Add CI Test * Clean Up
2021-04-28Fix Two Warnings for Builds Without EB (#1920)Gravatar Edoardo Zoni 2-0/+8
2021-04-27Staircased embedded boundaries in the YEE solver (#1881)Gravatar Lorenzo Giacomel 3-6/+50
* Added staircased embedded boundaris to the YEE solver * adding spherical resonating cavity test * adding functions for fields initialization * style adjustments * fixing tabs * fixed name of analysis script * fixed name of analysis script * fixed a few wrong preprocessor directives * workaround for missing boost * Revert "workaround for missing boost" This reverts commit 601f9eb2ec6f8c2100304379b2bea1c6cf9d1851. * another workaround for missing boost * getting rid of boost by depending on c++17 * Removed a few unused variables * adding USE_EB to addToCompileString for EB testing * removed tabs * fixing the inputs name for EB sphere test * shortened the test * zero padding the names of the images * adjusted two for loops * removed some unused variables * improving the fields initialization * removed the sphere test and implemented the cube test * fixed edges lengths computation and added comments * Fixed the case of all_regular geometries * fixing a bug that was breaking some tests * adding test folder * fixed the default values for the EB cube test * simplified the analysis script * fixed cubic resonator default results * inputting the plot file name from command line * fixing the diag name * Fixed a bug in edges initialization Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Adding comments to the staircased yee solver (thanks Remi) Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * fixed the cube resonator test * removed an unused import Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-04-21Fix Silver-Mueller boundary: cell ratio (#1907)Gravatar Remi Lehe 1-2/+2
* Fix typo in the Silver-Mueller boundary conditions * Reset checksum for silver-mueller
2021-04-21Add Silver-Mueller boundaries along z, for the RZ version of the code (#1906)Gravatar Remi Lehe 1-1/+33
* Implement Silver-Mueller boundary conditions in z for RZ * Add automated test and benchmark
2021-03-29Silver Mueller in RZ (#1804)Gravatar Lígia Diana Amorim 1-4/+81
* Added RZ Er, Et, Ez and Br, Bt and Bz * Answered my own question * Making Yee and cells domain check for RZ too * Added relevant coefficients * Derivative in z requires coefsz and n_coefsz * Bt computed with UpwardDz * UpwardDz might require CylindricalYeeAlgorithm.H * Added mode 0 Bz * Added higher-order modes for Bt * Added higher-order modes for Bz * Fix to EOLs * Fix typo * Added cylindrical specific parameters * Fix error of #endif * rmin also needed in RZ parameters * T_Algo needed for RZ -> different initialization in .H * Fix private / public function * Replacing T_Algo by CylindricalYeeAlgorithm * Fix typo * ParallelFor for Br, Bt and Bz separated * Compiled after removing unecessary Br * Changes suggested by reviewer * No need to compute r before if() * Corrected real and imaginary parts of Bz * Remove vscode file Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-03-19Warnings: PSATD+RZ & More (#1814)Gravatar Axel Huebl 2-2/+2
* PSATD+RZ: Fix Warnings Fix a couple of warnings in PSATD + RZ. * BesselRoots: Missing Include & using * Kernel & Util: Unused Code & Var
2021-03-18Use Clear Naming Standard for ParmParse Variables (#1809)Gravatar Edoardo Zoni 1-10/+10
2021-03-16Implement Silver Mueller boundary conditions (#1766)Gravatar Remi Lehe 4-0/+163
* Add function definitions for Silver-Mueller boundary condition * Add test file * Implement Silver-Mueller equations * Add equations for Bz * Add equation in the z direction * Add equation for Bx * Add 3D implementation * Add documentation, automated tests, and warnings * Include second automated test and evaluate benchmark * Fix unused variable warning * Fix minor bugs * Update benchmark * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Incorporate review comments * Incorporate more suggestions Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-03-16Add timers in routines that depend on cell-related work (#1692)Gravatar Michael E Rowan 3-20/+73
* Add timers * eol * AtomicAdd * lev argument for getCosts * style * style * wip * eol * .ipynb * passing down lev * eol * passing lev * eol * Update Source/Particles/Collision/PairWiseCoulombCollision.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Add for QED and ionization routines * eol * remove unneeded * mfi-->pti * move cost * eol Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-02-01remove semicolons (#1662)Gravatar Luca Fedeli 1-5/+5
2021-01-21Define: _OPENMP -> AMREX_USE_OMP (#1520)Gravatar Axel Huebl 8-12/+12
* 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-11Fix some warnings (#1612)Gravatar Luca Fedeli 1-1/+1
* fixed some warnings * add missing files * fixed bug * fix several other warnings * add missing include * fixed bug * fixed bug * fixed bug * fixed bug
2020-12-23Use PML diagonal components only with div cleaning (#1592)Gravatar Edoardo Zoni 2-16/+50
* Use PML diagonal components only with div cleaning * Apply @RemiLehe's suggestions and simplify allocations
2020-12-14Made sure that n_rz_azimuthal_modes is declared int everywhere (#1571)Gravatar David Grote 1-1/+1
2020-12-11PSATD Runtime Control (#1300)Gravatar Axel Huebl 9-10/+14
* 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-09Use new parser for more real input parameters (#1564)Gravatar NeilZaim 1-4/+6
2020-12-07material properties are cell-centered. not nodal (#1551)Gravatar Revathi Jambunathan 1-3/+3
2020-12-07fix 2D out of bounds for macroproperty init (#1552)Gravatar Revathi Jambunathan 1-3/+6
2020-10-19Replace wherever possible '.reset(new' with '= make_unique' (#1429)Gravatar Luca Fedeli 1-7/+8
* replace wherever possible .reset(new with = make_unique * fixed bug * fixed bug * revert WarpXOpenPMD.cpp to the original version * removed another .reset(new
2020-09-23[mini-PR] Fix a couple of warnings (#1372)Gravatar Luca Fedeli 1-4/+4
* removed extra ; * fixed unused variable * changed variable name to avoid shadowing * fixed bug
2020-09-18fix warnings in RZ (#1349)Gravatar Luca Fedeli 9-12/+34
2020-09-17Fix few compilation warnings (shift) (#1310)Gravatar Luca Fedeli 1-1/+0
* fix << declaration of galilean_shift shadows a member of WarpX >> * fix << unused mu_stag >> * fix << unused uxp, uyp, uzp >> * renamed galilean_shift (member variable of WarpX class) into m_galilean_shift * renamed v_galilean to m_v_galilean when appropriate * fixed bug introduced in latest commit * fix <<comparison of integer expressions of different signedness>> * Update Source/FieldSolver/FiniteDifferenceSolver/MacroscopicEvolveE.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-09-14Remove The_Managed_Arena (#1313)Gravatar WeiqunZhang 2-6/+6
* Remove the base class of InjectorPoisition, InjectorDensity and InjectorMomentum so that they no longer live in managed memory. * Have both host and device copies of Injector*. * Modify Parser classes so that they can work without unified memory. Add HostDeviceParser that is non-owning and therefore suitable for being value captured by device lambda.
2020-09-09Variation of macroscopic properties for E-update (#1016)Gravatar Revathi Jambunathan 7-83/+447
* Adding macro-E Push and new file * Add macroEvolveE, call it, and include algo selection in utils * fix eol * Fixing bug in macroE for sigma method 1 * changing MacroEvolveE to MacroscopicEvolveE * add class for macroscopicproperties and an object in WarpX class * fix eol * adding templated ckc call with comment that EvolveE is same for yee and ckc * add header file pointing to ckc algorithm * adding obejct m_macroscopic_properties to access sigma,eps,mu * some cleaning * Adding comments * adding documentation * spelling wandroff to wendroff * fixing eol * eol * const in the right place. Thanks bot! * profiler for macroscopic evolveE * MultiFab macroproperties with constant init, templated macroEvolveE, * call macroparameter init * eol fix * add parser for macroscopic properties * fix eol * adding input file * __device__ lambda cannot be private in class * fix grown tilebox declaration for init data * [skip ci] some more merge conflicts * some comments * removing redundant calls to Macroscopic EvolveE * [skip ci] fix growntilebox for initializing macro mf * clean and fix BackwardEuler call for ckc * commenting out old alpha and beta implementations * temporarily commiting local changes with calls in Interp. * fixing a typo * clean and add documentation * remove the test input file * fix typo * eol fix * Update Docs/source/running_cpp/parameters.rst Co-authored-by: Andy Nonaka <AJNonaka@lbl.gov> * PR suggestions * Update Source/FieldSolver/WarpXPushFieldsEM.cpp Co-authored-by: Andy Nonaka <AJNonaka@lbl.gov> * removing unnecessary includes * adding 2D initialization for stag arrays * removing init_style input parameter for material properties * eol fix * Adding dE/dt eq curl of (B/mu) * PhysConst ep0 and mu0 * Add functor for field access for macro and vacuum (B/mu) * fix eol * Update Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/FieldAccessorFunctors.H Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Apply suggestions from code review Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianCKCAlgorithm.H Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Apply suggestions from code review Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * fixing compilation errors and removing Gpu ManagedVector Co-authored-by: Andy Nonaka <AJNonaka@lbl.gov> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2020-09-03Remove ManagedVector from finite-difference solver (#1269)Gravatar WeiqunZhang 6-21/+51
2020-09-01 Fix 🩹(almost) all warnings ⚠️ with default configuration in 2D ↵Gravatar Luca Fedeli 1-0/+3
(DIM=2, openMP+MPI, double precision, no advanced solvers, no QED, native output) (#1264) Depends on #1263
2020-08-31Fix 🩹 (almost) all warnings ⚠️ with default configuration (DIM=3, ↵Gravatar Luca Fedeli 2-1/+6
openMP+MPI, double precision, no advanced solvers, no QED, native output) (#1263) This PR should fix almost all the compilation warnings in the default configuration (DIM=3, openMP+MPI, double precision, no advanced solvers, no QED, native output...). Or at least it does that on my system (my compiler is `g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0` ). I have just two residual warnings: ### 1 ``` [ 89%] Building CXX object CMakeFiles/WarpX.dir/Source/Parser/wp_parser.lex.cpp.o wp_parser.lex.c:1356:17: warning: ‘void yyunput(int, char*)’ defined but not used [-Wunused-function] ``` I don't know if `yyunput(int, char*)` is there for a reason, even if it is not used. So I didn't do anything. ### 2 ``` [ 96%] Building CXX object CMakeFiles/WarpX.dir/Source/Utils/CoarsenIO.cpp.o /home/luca/Projects/warpx_dir/WarpX/Source/Particles/WarpXParticleContainer.cpp: In member function ‘void WarpXParticleContainer::AddNParticles(int, int, const ParticleReal*, const ParticleReal*, const ParticleReal*, const ParticleReal*, const ParticleReal*, const ParticleReal*, int, const ParticleReal*, int, int)’: /home/luca/Projects/warpx_dir/WarpX/Source/Particles/WarpXParticleContainer.cpp:102:44: warning: unused parameter ‘nattr’ [-Wunused-parameter] 102 | int nattr, const ParticleReal* attr, int uniqueparticles, int id) ``` The first line of `AddNParticles` is `BL_ASSERT(nattr == 1); //! @fixme nattr is unused below: false sense of safety` . So I thought that there might be something to fix here and I didn't do anything.
2020-08-24Fix some warnings (#1239)Gravatar Luca Fedeli 3-12/+36
This PR fixes the source of several compilation warnings. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-08-03Fix bug in imaginary part of divE (#1233)Gravatar Edoardo Zoni 1-1/+1
2020-07-24Fix -Wextra-semi (#1207)Gravatar Axel Huebl 4-19/+19
Remove unnecessary semicolons (fix compiler warnings).
2020-07-22Cleaner calculation of the simulation timestep (#1031)Gravatar Remi Lehe 4-0/+82
* Cleaner calculation of the simulation timestep * Fix compilation errors * Remove specification of CKC solver in PSATD test * Correct calculation of dt * Fix compilation error * Cleaner calculation of the simulation timestep * Fix compilation errors * Remove specification of CKC solver in PSATD test * Correct calculation of dt * Fix compilation error * Cleanup for cylindrical * Change input of automated tests to preserve previous results * Fix import statement for cylindrical * Preserve dt for PML test * Move function documentation to WarpX.H * Update CMakeList * Update CFL in some tests * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Fix compilation errors * Revert "Fix compilation errors" This reverts commit 56ef67f228269b266876629f49789d3afdbbc00b. * Fix compilation error * Add cmath headers Add directly used header files. * Fix Include Order Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-06-12Add CMake Scripts (#759)Gravatar Axel Huebl 2-0/+18
* [skip travis] CMake: Add CMake Scripts This add CMake scripts for the CMake build system generator. * CUDA Support Achieved Fastest compile via: cmake .. -DENABLE_CUDA=ON -DCUDA_ARCH=6.0 * CMake: openPMD & QED * CMake: Dimension Support WarpX_DIMS=2,3,RZ * CCache & Out-of-Source Enable CCache when found and prevent in-root builds (in-source okay-ish). * CMake: CUDA C++ Language Minimum * Add new Files * CI: Migrate macOS to CMake * Fortran: Enable Because Transitive ... for now :) * CI: Migrate Linux ICC to CMake * CI: Verbose Make * CMake: Add Missing PSATD Sources * CMake: PSATD, Compute, Precision, Clean
2020-05-29Macroscopic EvolveE with constant properties (#991)Gravatar Revathi Jambunathan 6-0/+241
* Adding macro-E Push and new file * Add macroEvolveE, call it, and include algo selection in utils * fix eol * Fixing bug in macroE for sigma method 1 * changing MacroEvolveE to MacroscopicEvolveE * add class for macroscopicproperties and an object in WarpX class * fix eol * adding templated ckc call with comment that EvolveE is same for yee and ckc * add header file pointing to ckc algorithm * adding obejct m_macroscopic_properties to access sigma,eps,mu * some cleaning * Adding comments * adding documentation * spelling wandroff to wendroff * fixing eol * eol * const in the right place. Thanks bot! * profiler for macroscopic evolveE * re-introduced deleted line when fixing conflict to declare templated EvolveBPMLCartesian function * fixing if-else statement for RZ in MAcroscopicEvolveE.cpp * adding suggestions and corrections made in PR review. * fixing grammar in docs * fix eol whitespace * fix typo
2020-05-22Use C++ templates for the PML field pusher (#808)Gravatar Remi Lehe 5-0/+488
* Allow to pass component in stencil templates * Define and use enum to address PML components * Start implementing PML equations * Implement EvolveEPML * Implemented EvolveBPML * Added interface for pml_has_particles * Added interface for pml_has_particles * [skip ci] Add update expressions for E * [skip ci] Fix compilation * Call new PML pusher for B field * Fix compilation errors * Fix more typos * Abort code if `do_pml` is used in cylindrical geometry * Add contribution from F in EvolveEPML * Remove unused function for CKC coefficients * Remove unneeded ExchangeF * Add damping for J * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Revert "Apply suggestions from code review" This reverts commit 08f262a676ba5e5b44b9118b8daba1b03c08b64b. * Remove sanity checks for nodal * Implement dive cleaning in PML * Implement push F in the PML * Clean-up unused code Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-05-13Allow to pass component in stencil templates (#1012)Gravatar Remi Lehe 3-70/+70
2020-04-06replace ixType().ixType() with ixType().toIntVect() for clarity (#895)Gravatar MaxThevenet 4-16/+16
2020-04-02Includes: Only From `Source/` (#873)Gravatar Axel Huebl 3-5/+4
* Includes: Only From `Source/` Avoid adding all directories to include paths: - automatically structure includes more clearly, e.g. a util include with a short name is clearly seen as such - should have some small positive impact on compile time, since the compiler has to search less directories for an include file * Includes: Fix Non-Local Paths Add missing prefix relative to `Source/` for WarpX-local includes.
2020-03-31Make Build System: No Public Includes (#870)Gravatar Axel Huebl 1-1/+0
Remove the listing of all header-files from the Make-buildsystem. Listing public header files here tells the AMReX Makefile build system to install those in an install step after build. WarpX is currently not building a public library which can be consumed by users for their projects and only an executable.
2020-03-30Remove compiler warnings (#843)Gravatar Edoardo Zoni 2-2/+6
* Fix compiler warnings with DIM=2 * Fix compiler warnings with USE_RZ=TRUE * Fix compiler warnings with USE_PSATD=TRUE and DIM=2 * Fix compiler warnings with USE_PSATD=TRUE and DIM=3 * Fix bug: discard only return value when calling DefineAndReturnParticleTile * Remove unused variables not triggering warnings
2020-03-16Use C++ templates for the `EvolveF` and `ComputeDivE` function (#753)Gravatar Remi Lehe 4-0/+423
* Prepare EvolveE * Cartesian equations without current * Implement Cartesian EvolveE * Progress towards cylindrical solver * Correct typo * Implement cylindrical solver (without on-axis condition) * Fix compilation errors * Add regularization for RZ solver * Added correction term for F * Remove file for nodal stencil * Apply stylistic changes to EvolveE * Fix compilation errors * Correction to avoid out of bound * Remove references to old file * Correct bug in EvolveB * Implement correction on axis for Et * Remove previous field update functions * Implement EvolveF in Cartesian * Add missing file * Update on-axis condition * Correct typo * Add theta derivative for divE calculation * Fix rho component * Fix compilation error * Use C++ templates in computation of divE * Update Source/FieldSolver/FiniteDifferenceSolver/ComputeDivE.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Apply suggestions from code review Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Use comparisons to 0 again Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-13Fixed FDTD coefficients of E push from F (#804)Gravatar David Grote 1-13/+13
2020-03-02EvolveE: Update Includes (#761)Gravatar Axel Huebl 1-2/+3
Generalize includes to base path.