aboutsummaryrefslogtreecommitdiff
path: root/Source/Python/WarpX_py.cpp (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2021-05-24Add ComputeMaxStep() function in WarpXInitData (#1712)Gravatar Neïl Zaim 4-52/+80
* Add ComputeMaxStep() function in WarpXInitData * Avoid overflow in the static_cast * Change overflow handling and update stop_time constistently with max_step
2021-05-21Boundary Condition : PEC (#1767)Gravatar Revathi Jambunathan 33-162/+1136
* Read boundary and set periodicity, enumerate BC types, added support for periodic * separate particle and field boudnary structs * PEC Etangential Bnormal and setting default pml=0 * eol * add PEC and FieldBoundary routines * eol * remove duplicate struct * update guard cells for PEC * host device functions * remove duplicate function * fix compilation error by adding ; * temporary logic to set PEC boundary * eol * add documentation for PEC and abort if PEC is used for RZ * documentation for PEC functions * remove print statements * Adding field CI test for PEC for 3D with and without MR * fix eol * Apply suggestions from code review * Update Docs/source/usage/parameters.rst * Update Source/BoundaryConditions/WarpX_PEC.cpp * particle PEC CI test * rename analysis scripts for PEC * use iside == 0 as condition * ParallelFor over guard cells. Set field values on boundary and guard in the kernel * ijk_guard not needed anymore * remove unnecessary nbody generated by yt * pi and clight are built-in * cleanup * eol * fix bug in computing ig and ijk_valid * bug fix in guard-cell update in PEC changes benchmark for particles * fix bug in the ig compute * reset particle PEC benchmark * fix logic to set PEC with current interface * adding a none type for RZ * reset benchmarks for 2dLaserInjection, 2dgalilean_hybrid and 2dcomoving CI tests due to differences in PEC reflection * ensure noz shape factor is used for RZ and k=0 for RZ * fix XZ/RZ logic for Ey,Etheta,By,Btheta. Add ncomponent for RZ, generically. * fix the field update for corner cases and mixed boundaries. rename ijk_valid to ijk_mirror since ijk_mirror need not be in valid region * set GuardCell and Boundary cell flags * fix compilation bug * suppress unused variable warning * eol whitespace * fix doc * Apply suggestions from code review Co-authored-by: Andy Nonaka <AJNonaka@lbl.gov> * RZ abort message * reset benchmark after fixing guard-cell updates * fix typo * RZ doc * Update Source/Utils/WarpXUtil.cpp * Update Examples/Tests/PEC/inputs_particle_PEC_3d * changes suggested from code-review * set Enormal and Btangential in guard cell across PEC boundary * add more info about guard cell update in the docs * fix typo * ijk mirror only if ig>0 * update benchmarks * ignore unused k * temporarily revert guardcell damping for Cartesian * fix typo * dont set Etangential and Bnormal to zero if field is not nodal on boundary * set bindary int as boolean * fix high to hi * set default nox to 1 * particle shape for PEC test * update benchmarks for 2D comoving and galilean * reset benchmark for RZ test-cases * Add in benchmarks generated by @EZoni * Changing transverse boundaries to periodic for psatd galilean cases * resetting benchmark for comoving_hybrid_2d and galilean_hybrid_2d * at-least one guard cell must be filled for PEC * abort if PEC is used for PSATD * use new boundary interface to set none for rmin and rmax, since pec does not work for psatd * Update Source/WarpX.cpp * add doc mentioning PEC does not work for PSATD * missing semicolon * Update Source/BoundaryConditions/WarpX_PEC.H Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/BoundaryConditions/WarpX_PEC.H * lengthy comment for normal and tangential components at domain boundaries * eol fix * grammar * field_hi * reset benchmarks Co-authored-by: Andy Nonaka <AJNonaka@lbl.gov> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2021-05-21openPMD: Fix Weighting Attributes (#1975)Gravatar Axel Huebl 1-5/+8
The weighting attributes of the particle "weighting" record are fixed by the standard. This fixes their values.
2021-05-20New Parser capability: `if` (#1976)Gravatar Weiqun Zhang 11-219/+380
* New Parser capability: `if` Add a new Parser capability, `if`. It takes three arguments and returns the value of either the second or the third argumen depending on the first argument. For example if(abs(x) < 10, exp(-x), 0) returns exp(-x) if abs(x) < 10, otherwise 0. Note that in case the condition (i.e., the first arguemnt) is false, the second argument is not evaluated. * Fix a minor bug in computing the depth of ast
2021-05-20openPMD: Support for mesh refinement (#1842)Gravatar guj 3-99/+163
* Added support for mesh refinement * openPMD MR: Cleanup * Fix BTD Move un-related streaming API changes out of this PR. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-05-20CI: Add BTD Tests (#1973)Gravatar Axel Huebl 3-11/+47
Add tests for the new BTD diagnostics, so that parallely working developers can easier test this. Currently covered features: - field BTD (particles are still WIP) - openPMD & plotfiles
2021-05-19Set guard cells for allocation using field solver stencil and particle shape ↵Gravatar Revathi Jambunathan 5-10/+68
factor (#1969)
2021-05-19Docs: Debugging Workflow (#1967)Gravatar Axel Huebl 2-0/+51
* Docs: Debugging Workflow Start a debugging workflow section. Intentionally placed in the user-documentation to explain a systematic way to check output files. * Fix typos & improve details * Fix wording about CUDA_LAUNCH_BLOCKING Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Andrew Myers <atmyers2@gmail.com>
2021-05-19replace copy with FabArray::ParallelCopy() (#1970)Gravatar Revathi Jambunathan 2-3/+3
2021-05-17Docs: Glossary EB, FDTD, PSATD (#1966)Gravatar Axel Huebl 1-0/+3
Add a few new terms to our glossary that we tend to use often.
2021-05-17AMReX/PICSAR: Weekly Update (#1964)Gravatar Axel Huebl 2-2/+2
Update AMReX to https://github.com/AMReX-Codes/amrex/commit/6f1085a23de1f7ee1a5f92dd173e984c59839511 No changes im PICSAR since last update. ``` ./Tools/Release/updatePICSAR.py ./Tools/Release/updateAMReX.py ```
2021-05-17Docs: Dev git Notes (#1965)Gravatar Axel Huebl 1-1/+3
Add `git` installation instructions where missing. Minimal version: as required by GitHub these days. Not added in Spack: because Spack already requires `git` to run.
2021-05-17More Docs on How to Run CI Tests Locally (#1926)Gravatar Edoardo Zoni 3-16/+42
* More Docs on How to Run CI Tests Locally * Remove * After Name of Executables * CI: WARPX_CI_NUM_MAKE_JOBS: Control -j Add the `WARPX_CI_NUM_MAKE_JOBS` variable to overwrite the CI build parallelism. Previously, we unconditionally overwrote this with "2", which lead to the need to manually change the preparation scripts when running locally with more build processes. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-05-17Summit/PPC64le: Numpy 1.19.5 (#1961)Gravatar Axel Huebl 1-1/+1
* Summit/PPC64le: Numpy 1.19.0 The latest (default) numpy, release `1.20.3` fails to build with fancy compiler errors of the form ``` error: "AltiVec argument passed to unprototyped function" ``` Thus, recommend an older numpy release to user that actually builds: `1.19.0` * numpy@summit: 1.19.5 tested and works, too
2021-05-17MultiReduceDiags.cpp : use a map to replace a long list of "if else" to ↵Gravatar Luca Fedeli 1-69/+32
choose a reduced diag (#1946) * replace a long list of if else with a map * fixed bug * enforce const correctness * add missing includes * Update Source/Diagnostics/ReducedDiags/MultiReducedDiags.cpp Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com>
2021-05-17Use rocm 4.1.1 for hip ci (#1963)Gravatar Weiqun Zhang 2-2/+3
2021-05-17`algo.particle_shape` Required Only with Particles or Lasers (#1962)Gravatar Revathi Jambunathan 5-28/+32
2021-05-13CUDA: Quiet numerous warnings about unused-variable-warning suppressions ↵Gravatar Phil Miller 2-5/+4
being unreachable statements (#1957)
2021-05-13openPMD-api: 0.13.4 (internal) (#1959)Gravatar Axel Huebl 1-1/+1
Build the latest release, which fixes AppleClang and DPC++ compilation problems.
2021-05-13Implemented query and getArrWithParser (#1936)Gravatar David Grote 13-47/+132
* Implemented query and getArrWithParser * Updated parameters.rst regarding expressions for multiple floats
2021-05-12BC : Interface for damping EB fields in guard cells in z-direction (#1953)Gravatar Revathi Jambunathan 7-21/+46
2021-05-12Doc: Cori CMake -S Argument (#1951)Gravatar Axel Huebl 1-2/+2
2021-05-12CI: Fix Broken Test, Disable HIP Temporarily (#1955)Gravatar Edoardo Zoni 2-3/+2
* CI: Fix Broken Test (Old Input Syntax) * CI: Disable HIP SP Temporarily
2021-05-11New Input Parameter for Order of Shape Factors (#1934)Gravatar Edoardo Zoni 80-192/+247
* Define New Input Parameter interpolation.shape_factors_order * Use New Input Parameter, Remove Obsolete Ones * Add New Input Parameter to PICMI Interface * Update Docs, Use New Input Parameter in Remaining Input Files * Cleaning * New Name: algo.particle_shape
2021-05-11Feature - Time dependent Dirichlet boundary conditions for electrostatic ↵Gravatar roelof-groenewald 13-18/+315
simulations (#1761) * Update copyright notices * allow specification of boundary potentials at runtime when using Dirichlet boundary conditions in the electrostatic solver (labframe) * added parsing to boundary potentials specified at runtime to allow time dependence through a mathematical expression with t (time) * updated to picmistandard 0.0.14 in order to set the electrostatic solver convergence threshold * update docs * various changes requested during PR review * fixed issue causing old tests to break and added a new test for time varying boundary potentials * possibly a fix for the failed time varying boundary condition test * changed permission on the analysis file for the time varying BCs test * switched to using yt for data analysis since h5py is not available * made changes compatible with PR#1730; changed potential boundary setting routine to use the ParallelFor construct and set all boundaries in a single call * fixed typo in computePhiRZ * updated docs and fixed other minor typos * fixed bug in returning from loop over dimensions when setting boundary potentials rather than continuing * changed to setting potentials on domain boundaries rather than tilebox boundaries and changed picmi.py to accept boundary potentials * now using domain.surroundingNodes() to get the proper boundary cells for the physical domain * fixed typo in variable name specifying z-boundary potential * changed boundary value parameter for Dirichlet BC to boundary.field_lo/hi and changed setPhiBC() to only loop over the grid points when a boundary value has changed * switched specifying potential boundary values though individual inputs of the form boundary.potential_lo/hi_x/y/z and incorporated the new BC formalism through FieldBoundaryType::Periodic and FieldBoundaryType::PEC rather than Geom(0).isPeriodic(idim) * removed incorrect check of whether the potential boundary values are already correct, also had to change the input to test space_charge_initialization_2d to comply with the new boundary condition input parameters and finally changed permissions to analysis_fields.py file for the embedded boundary test since it was failing * remove line from WarpX-tests.ini that was incorrectly added during upstream merge * changed input file for relativistic space charge initialization to new boundary condition specification * fixed outdated comment and updated documentation to reflect that the Dirichlet BCs can also be specified when using the relativistic electrostatic field solver * moved call to get domain boundaries inside the loop over levels * cleaned up the code some by using domain.smallEnd and domain.bigEnd rather than lbound and ubound * added check that a box contains boundary cells before launching a loop over that box cells to set the boundary conditions Co-authored-by: Peter Scherpelz <peter.scherpelz@modernelectron.com>
2021-05-10NVCC: Fix PSATD+RZ Build Error (#1950)Gravatar Axel Huebl 1-1/+2
Work-around for: ``` Source/FieldSolver/SpectralSolver/SpectralAlgorithms/GalileanPsatdAlgorithmRZ.cpp(145): error #2985: identifier "PhysConst::ep0" is undefined in device code ```
2021-05-10Deactivate Python script for embedded boundary test (#1949)Gravatar Remi Lehe 1-2/+1
2021-05-10AMReX/PICSAR: Weekly Update (#1948)Gravatar Axel Huebl 2-2/+2
2021-05-10Guard Cells with PSATD: Fill With Inverse FFT, Damp Fields (#1867)Gravatar Edoardo Zoni 12-217/+338
* Loop Over Full Box in Inverse FFTs * Enable Fields Damping in Cartesian Geometry * Minimize Style Changes * Fields Damping: Fix Tileboxes For General Case * Clean Up * Assume Periodicity For Last Nodal Point in Inverse FFTs * Update Benchmark of averaged_galilean_2d_psatd * Update Benchmark of averaged_galilean_3d_psatd * Update Benchmark of averaged_galilean_2d_psatd * Update Benchmarks * Update Benchmark of pml_psatd_dive_divb_cleaning * Clean Up: Use More Descriptive Names
2021-05-07Minor updates to the documentation (#1940)Gravatar Remi Lehe 2-6/+19
* Update documentation * [skip ci] Fix a typo Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2021-05-05QED module: use PICSAR function to calculate gamma for photons (#1928)Gravatar Luca Fedeli 1-2/+9
2021-05-05fix uninitialized arrays (#1933)Gravatar Luca Fedeli 1-6/+6
2021-05-04New release 21.05 (#1931)Gravatar Remi Lehe 8-12/+12
* Deploy new Azure worker, for the embedded boundary test * Correct missing end of line * Update amrex version * Update PICSAR version * Update WarpX version
2021-05-03Implement div(B) Cleaning With FDTD (#1829)Gravatar Edoardo Zoni 19-14/+463
* Implement div(B) Cleaning With FDTD * Add CI Test * Clean Up
2021-05-03Deploy new Azure worker, for the embedded boundary test (#1929)Gravatar Remi Lehe 3-0/+10
* Deploy new Azure worker, for the embedded boundary test * Correct missing end of line
2021-04-29Pass skip_deposition to pc->Evolve (#1925)Gravatar David Grote 1-1/+1
2021-04-29Fix indentation when evolving QSR optical depth (#1922)Gravatar Neïl Zaim 1-5/+5
2021-04-29Docs: Particle Injection in MR (#1911)Gravatar Axel Huebl 1-5/+15
* Docs: Particle Injection in MR Documenting what particles per cell means for our injection methods. They all call `AddPlasma` which injects on the coarest level. https://github.com/ECP-WarpX/WarpX/blob/f95329cf2eae659b785be722afeea5ec028a4c87/Source/Particles/PhysicalParticleContainer.cpp#L1754 https://github.com/ECP-WarpX/WarpX/blob/f95329cf2eae659b785be722afeea5ec028a4c87/Source/Particles/PhysicalParticleContainer.cpp#L206 * Doc: warpx.refine_plasma
2021-04-28Fix Two Warnings for Builds Without EB (#1920)Gravatar Edoardo Zoni 2-0/+8
2021-04-27Ensure the geometry.coord_sys == 1 for RZ (#1918)Gravatar David Grote 2-1/+8
* Ensure the geometry.coord_sys == 1 for RZ * Fixed Examples/Tests/ElectrostaticSphere/inputs_rz
2021-04-27Improve Analysis Script To Test Reduced Diagnostics (#1913)Gravatar Edoardo Zoni 1-130/+141
* Improve Analysis Script To Test Reduced Diagnostics * Commit @lucafedeli88's suggestions
2021-04-27Staircased embedded boundaries in the YEE solver (#1881)Gravatar Lorenzo Giacomel 13-14/+397
* 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-23Docs: Update Release Git (#1910)Gravatar Axel Huebl 1-1/+1
I noticed a few releases back that the old git command did not work well with our current squash commits and/or forgot commits already before. This one fixes the recommended string in the docs. (The releases already mention the new command for a while.)
2021-04-21Fix Silver-Mueller boundary: cell ratio (#1907)Gravatar Remi Lehe 3-14/+14
* Fix typo in the Silver-Mueller boundary conditions * Reset checksum for silver-mueller
2021-04-21AMReX: CMake IntelLLVM (#1899)Gravatar Axel Huebl 2-2/+2
Just an update to support CMake 3.20+ that starts to define `IntelLLVM` for the ICX/DPC++ compiler from Intel's oneAPI.
2021-04-21Add Silver-Mueller boundaries along z, for the RZ version of the code (#1906)Gravatar Remi Lehe 4-1/+110
* Implement Silver-Mueller boundary conditions in z for RZ * Add automated test and benchmark
2021-04-21Fix LoadBalance + MR: Rebuild Particle Masks (#1904)Gravatar Axel Huebl 1-2/+6
In MR simulations, particle masks are used to determine if a fine-patch particle is in the field gather and/or current deposition buffer regions near the coarse/fine boundaries. This is needed because some particles deposit to / gather from the coarse level, since they are near the level boundaries. On regriding during load-balancing, we can avoid to communicate the `MultiFab`s for those masks (gather and deposit) if we locally re-build the mask in the new distribution mapping. We forgot to trigger the rebuild, which caused illegal memory accesses in the particle evolve (partition) down the road.
2021-04-20Fix logic error when load balancing with more than 1 level. (#1903)Gravatar Andrew Myers 1-2/+6
* Fix logic error when load balancing with more than 1 level. * 0 -> false
2021-04-19AMReX/PICSAR: Weekly Update (#1889)Gravatar Axel Huebl 3-4/+4
``` ./Tools/Release/updatePICSAR.py ./Tools/Release/updateAMReX.py ```
2021-04-19Remove outdated abort and add LB PSATD regression test (#1897)Gravatar Michael E Rowan 3-2/+41
* LB PSATD regression * reset benchmark for <test name> because ... Co-authored-by: Tools <warpx@lbl.gov>