aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/picmi.py (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-09-13Add flag to set GPU-aware MPI from PICMI (#4298)Gravatar Remi Lehe 1-0/+7
2023-09-13Revert PR4266 - lower and uppers bounds (#4294)Gravatar Marco Garten 1-10/+0
The lower and upper bounds are already present within PICMI.
2023-09-12PICMI: Add `warpx_intervals` option to BTD (#4288)Gravatar David Grote 1-2/+22
* Add warpx_intervals option to BTD * Add warpx_intervals to LabFrameParticleDiagnostics
2023-09-08Add lower and upper bound params to regular diags in PICMI (#4266)Gravatar Marco Garten 1-0/+10
* Add lower and upper bound params to regular diags The parameters `warpx_lower_bound` and `warpx_upper_bound` can now be used in the definition of a `FieldDiagnostic` in PICMI. * Add docstring for lower and upper bound
2023-09-07Add particle resampling inputs to `picmi.py` (#4257)Gravatar Roelof Groenewald 1-1/+19
2023-09-07add symmetrize to PICMI (#4271)Gravatar Ryan Sandberg 1-0/+7
* add symmetrize to PICMI * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * don't set defaults in PICMI - they don't matter --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-09-01PICMI: warpx.numprocs (#4255)Gravatar Axel Huebl 1-0/+9
Adding a parameter for `warpx.numprocs` in PICMI. https://warpx.readthedocs.io/en/latest/usage/parameters.html#distribution-across-mpi-ranks-and-parallelization https://warpx.readthedocs.io/en/latest/usage/domain_decomposition.html#simple-method
2023-08-31PICMI: LabFrameParticleDiagnostic w/ Species (#4254)Gravatar Axel Huebl 1-0/+41
Support the `species=...` argument in `PICMI_LabFrameParticleDiagnostic`.
2023-08-29Fix: PICMI BTD Diags (#4248)Gravatar Axel Huebl 1-2/+2
Typos.
2023-08-28Add LabFrameParticleDiagnostic to picmi (#4148)Gravatar David Grote 1-2/+66
2023-08-11In picmi.py, add G to fields to plot check (#4180)Gravatar David Grote 1-1/+1
2023-08-11Update PICMI interface for Gaussian flux (#4084)Gravatar Remi Lehe 1-1/+1
* Update PICMI interface for Gaussian flux * Update version of picmistandard
2023-08-11Enable `divE` field diagnostic with Ohm's law solver (#4178)Gravatar Roelof Groenewald 1-1/+1
* use same finite difference algo as for Yee with hybrid-PIC to calculate divE * add `divE` and `divB` to field diagnostic in picmi.py
2023-06-27Define new `InjectorFlux` object, and use it in `AddPlasmaFlux` (#4040)Gravatar Remi Lehe 1-3/+3
* Create flux injector object * Call new flux injector in AddPlasmaFlux * Update syntax in tests * Also test the flux parser * Remove the use of `density_min` and `density_max` for flux injection * Update PICMI interface * Update documentation * Remove .cpp file
2023-06-27Adding current density to Field Reduction reduced diagnostic (#3980)Gravatar Lizzette Corrales 1-1/+1
* Adding j in FieldReduction * Modiyfying input file with FieldReduced diag * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Source/Diagnostics/ReducedDiags/FieldReduction.H * updating Field Reduction Docs to include current density * Update Source/Diagnostics/ReducedDiags/FieldReduction.H Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * adding cuurent density BackwardCompatibility to Field Reduction diagnostic * including E dot j density using the modifyed Field Reduction * fixing picmi interface * adding Edotj to automated python test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Lizzette Corrales <lzcorrales@kong.dhcp.lbl.gov> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com>
2023-06-15Added external field loading from file to picmi.py (#3945)Gravatar Camille Woicekowska 1-0/+9
* Added external field loading from file to picmi.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Python/pywarpx/picmi.py Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> * Added documentation * Removed init, documentation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Updated picmi version in requirements.txt * Updated picmi version in setup.py * Updated picmi version in requirements.txt * Updated name of call to picmi class * Adapted CI test for PICMI field loading from file * Added PICMI input script * Added .json file with new file name * fixed small errors * Fixed error in input script * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Removed old comments from code * fixed import, spacing in input script * fixed spacing * cleaned up input script * fixed typo * removed blocking factor * fixed name of test * correct ion species name * Added initial field to sim object --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com>
2023-06-12Ohm's law solver (hybrid kinetic-fluid extension) (#3665)Gravatar Roelof Groenewald 1-0/+58
* 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` * start of hybrid solver logic * changes requested during PR review * remove `do_no_deposit` from tests without field evolution * added `HybridSolveE.cpp` * bulk of the hybrid solver implementation * mostly reproduce 1d cold ion mirror results * ion Bernstein modes reproduced with this version * fix bug with reduced diagnostic FieldProbe in 1d * added hybrid solver installation to PICMI and added example script generating ion-Bernstein modes * enable the use of `FieldProbe` default parameter values * use default field-probe values * steady progress * add `do_not_push` flag to picmi * possibly use nodal fields * added extra multifab for current calculated from curl B * added `CalculateTotalCurrent` functions * rewrote implementation to calculate J x curl B on a nodal grid first * fill boundary for auxiliary MFs used during hybrid E solve * properly handle nonzero resistivity * updated hybrid model example * clean up example scripts * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed invalid memory access for GPU and other code cleanups * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * refinements on the example scripts * added ion beam instability example * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * added EM modes and ion beam examples to CI test suite * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * started docs section on the hybrid model * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * more progress on documentation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * added ion Landau damping verification test / example * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add checksum benchmark for Landau damping example * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * added fields.py wrapper to access total current density in hybrid case * refactored the charge deposition fix to be performed with the field data rather than individual particles * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * also correct current density at PEC boundary * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * made resistivity a parsed function of `rho` * work on PEC boundary condition * corrections pointed out during code review * fix build fails due to unused variables * fix issue with GPU builds * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * actually apply rho boundary correction in EM case * take one sided derivative at PEC boundary when calculating div Pe * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * actually apply rho boundary correction in EM case * removed specific treatment of E-field on PEC boundary for Ohm's law solver * first round of CI fixes * second round of CI fixes * added description of deposition logic with PEC boundaries to documentation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * third round of CI fixing * move J and rho boundary handling to after `SyncRho` and `SyncCurrent` calls * properly order the application of boundary conditions on rho, for electrostatic simulations * fourth round of CI fixing * moved calculation of total current (Ampere's law) to seperate function * add random seed specification to `picmi` * code clean-up -> renamed hybrid model to hybrid-PIC model * added magnetic reconnection example * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * code cleanup & benchmark updates * update PICMI class name for hybrid solver to `HybridPICSolver` * don't apply J field boundary in * don't apply J field boundary in `MultiParticleContainer::DepositCurrent` * apply changes requested during code review * Apply suggestions from code review Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Loosen tolerance on failing CI test * Removed unused variable * code cleanup: make use of `MultiParticleContainer::DepositCurrent` in `AddSpaceChargeFieldLabFrame` * switch to using a rho_fp_temp multifab for old and averaged charge density field, also no longer require particles to move only one cell per step * use `ablastr::coarsen::sample` namespace in `HybridPICSolveECartesian` * switched to using `MultiFab::LinComb` instead of self written GPU kernels to calculated averaged or extrapolated current density * add verbosity flag for the Ohm solver tests * deal with fine versus coarse patches * add theoretical instability growth / damping rates to hybrid-PIC examples * update ion-Bernstein mode plot in documentation * move the `ApplyRhofieldBoundary` call to after `SumBoundary` * use a uniform calculation for the number of cells a given index is from the boundary * remove unused variable * limit number of ghost cells updated during PEC BC application * the number of ghost cells to consider depends on whether the field is nodal or not * attempt 1 to fix failing CI tests * attempt 2 to fix failing CI tests and code cleanup * attempt 3 to fix failing CI tests * attempt 4 to fix failing CI tests and docs cleanup * switched to using bibtex citations * move hybrid solver input parameters documentation to its own section * clean up ion beam instability analysis script * Apply suggestions from code review Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Apply suggestions from code review Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * add inline comments describing the meaning of each argument for the `amrex::MultiFab::LinComb` calls used * make `HybridPICSolver` a child class of `picmistandard.base._ClassWithInit` * apply changes requested during code review * add warning about using hybrid-PIC solver with Esirkepov current deposition * add Stanier 2020 reference to recommend linear particles with hybrid-PIC * add call to FillBoundary for `current_fp` - needed for accurate interpolation to nodal grid * changes requested from code review * Apply suggestions from code review Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * include physics accuracy check for ion beam instability; switch CI tests to use direct current deposition * reset benchmark values after switching to direct current deposition * update ion beam instability benchmark * minor changes requested during code review * remove guard cells for `enE_nodal_mf` as well as corresponding `FillBoundary` call * refactor: moved hybrid-PIC specific multifabs and `CalculateElectronPressure()` to `HybridPICModel` * add assert that load balancing is not used with the hybrid-PIC solver since the new multifabs are not yet properly redistributed * move `CalculateCurrentAmpere` to `HybridPICModel` * refactor: moved `HybridPICSolveE` to `HybridPICModel` class --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2023-06-02Add max_background_density to MCCollision (#3960)Gravatar David Grote 1-1/+7
2023-06-01Update picmi interface for MCCCollisions (#3953)Gravatar David Grote 1-6/+12
* Allow string expressions for MCCCollisions background density and temperature * Add check of whether value is str since special behavior is needed
2023-05-08Enable field ionization from PICMI (#3298)Gravatar Neïl Zaim 1-8/+17
* Enable field ionization from PICMI * Implement Dave's suggestions and add automated test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update test benchmark * Add docstring for FieldIonization class --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-04-19Add more PICMI options (#3773)Gravatar Remi Lehe 1-1/+10
* Add PICMI option to cover multiple cuts * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Parse flux_min, flux_tmax from PICMI * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Implement review comments --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-04-17Fix particle reflecting boundaries in RZ (#3837)Gravatar David Grote 1-0/+6
* Fix the reflection of velocities in RZ * Add warpx_reflect_all_velocities to the PICMI interface
2023-04-04Adding Amrex Bucket into WarpX Python interface. (#3590)Gravatar S. Eric Clark 1-0/+14
* Adding Amrex Bucket into WarpX Python interface. * Adding PICMI-like options in the Simulation class to control Amrex Arena parameters.
2023-03-30Add random seed specification to `picmi` (#3793)Gravatar Roelof Groenewald 1-0/+6
2023-03-23PICMI Boundary: Silver-Mueller (#3709)Gravatar Axel Huebl 1-0/+1
* PICMI Boundary: Silver-Mueller Add support for silver-mueller boundary conditions in PICMI. * Dependencies: Update PICMI
2023-03-20PICMI: add `do_not_push` and `do_not_gather` (#3766)Gravatar Yinjian Zhao 1-0/+10
2023-03-10PICMI: add missing flags for latest algorithms (#3743)Gravatar Edoardo Zoni 1-2/+76
* PICMI: add missing flags for latest algorithms * Fix docstrings
2023-03-09Implement PICMI flag to set `compute_max_step_from_btd` (#3740)Gravatar Remi Lehe 1-0/+7
* Implement PICMI flag for setting max_step from btd * Update Python/pywarpx/picmi.py Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> --------- Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2023-02-27Change plotfile RZ allowed diags to r,t from x,y (#3663)Gravatar Ryan Sandberg 1-25/+44
* change plotfile RZ allowed diag to r,t from x,y * Change labeling in checksums * add rz silver mueller analysis script * make analysis_silver_mueller_rz.py executable * change x,y fields to r,t in more tests * x->r in MR RZ checksums * correct analysis for plotfiles saved as 'boxlib' * add self to creator list * change rz diags in PICMI * correct PICMI changes * another y->t in an rz test * update picmi plotfile rz btd names * review suggestion to condense analysis * Apply suggestions from code review Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Apply suggestions from code review 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>
2023-02-22Reduced diagnostics: charge on the embedded boundary (#3648)Gravatar Remi Lehe 1-2/+20
* Prepare structure to compute charge inside boundary * Add calculation without embedded boundaries * Use EB area fraction * Skip cells that are not cut-cells * Choose point outside of the EB * Skip covered or regular boxes * Only compile with EB and 3D support * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add test for charge on EB * Add automated test * Add automated Python test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Avoid compilation error * Enable PICMI test * Rename ChargeInsideBoundary to ChargeOnEB * Update comments * Add parser for weighting * Call weighting function * Call weighting function * Add documentation * Update Python test * Add Python test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix compilation errors * Fix access of attribute on GPU * Use difference in surface area * Pick smaller radius in test This is in order to avoid the influence of the boundaries * Update benchmark * Update benchmark * Properly add diagnostic * Update radius in analysis * Update analysis script * Relax tolerance * Fix tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Python tests * Apply suggestions from code review Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Test one-eighth from Python * Add one-eighth charge in tests * Handle ChargeOnEB * Remove bug when handling charge on eb * Fix Python errors * Fix Python issues * Use more natural setting of tilebox --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2023-02-21Renamed "particle_vel" to "particle_mom" (#3672)Gravatar Davide Terzani 1-3/+3
* Renamed particle_vel to particle_mom * Changed vel to u * Updated gitignore with vscode-specific folder * Updated docs for single particle * Revert "Updated gitignore with vscode-specific folder" This reverts commit cb44ef8d66c123daa93d6a13d5a1d88416e866bb. * Fixed typo * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fixed other typo * Add species indication in warning --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-21Add FieldReduction and ParticleHistogram to PICMI (#3697)Gravatar David Grote 1-18/+112
* Added FieldReduction and ParticleHistogram to ReducedDiagnostics * Add tests to reduced_diags/PICMI_inputs_loadbalancecosts.py * Clean up ReducedDiagnostics setting of argv
2023-02-20add flag to picmi `FieldDiagnostic` for whether particle data should be ↵Gravatar Roelof Groenewald 1-0/+5
saved along with the field data (#3699)
2022-12-22Feature magnetostatic solver (#3551)Gravatar S. Eric Clark 1-3/+17
* Initial working Magnetostatic solver integration into warpx. Includes hooks in Python library, and a test problem. Build files updates. New solver algorithm and inputs. * Fixed indexing to allow Magnetostatic solver to work in RZ and 3D. * Removing trailing whitespace. * Adding basic regression testing with benchmarks. * Updated Regression test ini * Augmented test scripts to compare to analytical results for uniform beam. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Updating CI tests for magnetostatic solver. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Updated magnetostatic CI tests to pass locally in regression testing framework. * Adjusting tolerance on magnetostatic_rz regression test to allow for noise in near zero fields. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Converted particle layout to Gridded instead of PsedupRandom to improve reproducibility of particle deposition for regression testing. * Dropped benchmark field comparisons with fields near zero. Dropped particle benchmark for magnetostatic_eb_rz regression test due to randomized particle theta adding noise to fields after a timestep. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Found and fixed a bug in syncronization of MultiFabs when interpolating between grids in the magnetostatic solver. Added Python output for nodal current and vector potential. Updated the CI tests to disable dynamic scheduling and enbale serialization of initial conditions. Updated benchmarks fro tests. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Adding random_theta flag to PICMI interface and updating RZ CI test and benchmark with change to disable randomized theta. * Added documentation to parameters.rst for relativistic-magnetostatic flag. Documentation corrections. Removal of commented source. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Removing need to use do_current_centering. Updated current density inverse scaling support for nodal Jr in radius. Added flag to check for m_rz_random_theta when laying down particles in RZ. * Remove dA/dt term to decouple electrostatic and magnetostatic solvers. * Remove update of auxiliary fields * Adding non-Python test case for magnetostatic solver. Updating benchmarks. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Python/pywarpx/_libwarpx.py Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Python/pywarpx/_libwarpx.py Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Python/pywarpx/_libwarpx.py Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Python/pywarpx/_libwarpx.py Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/Diagnostics/Diagnostics.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/Evolve/WarpXEvolve.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.H Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Refactor names of functions for magnetostatic solver implementation. Remove current_fp_nodal python interface. Drop extraneous ghost cell exchanges. * Adding radial weighting at r=0 for Jr if nodal. * Splitting off Amrex bucket and adjustments to RZ radial weighting into different branches to be merged. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Switch name to labfame-electromagnetostatic * Update example scripts Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2022-11-28enable the use of `FieldProbe` default parameter values (#3538)Gravatar Roelof Groenewald 1-10/+10
2022-11-24allow initial fields to be set through the picmi interface (#3536)Gravatar Roelof Groenewald 1-0/+29
2022-11-18Adding an if statement for the last step diagnostic (#3436)Gravatar Yinjian Zhao 1-7/+2
* modified * Include max_step and stop_time as input parameters * Add comments * update * update * Fix CI test: apply suggestion from @ax3l * Do not force consistency between `max_step` and `stop_time` Co-authored-by: Dave Grote <grote1@llnl.gov> Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2022-11-17Add Python interface for flux injection (#3486)Gravatar Remi Lehe 1-2/+24
* Update PICMI code * Upgrade picmistandard version * Update PICMI version and assert
2022-11-15Move shared functionality between `picmi.UniformDistribution` and ↵Gravatar Roelof Groenewald 1-63/+43
`picmi.AnalyticDistribution` into a parent class (#3476) * allow density function in picmi * created a new parent class to handle common functionality between `UniformDistribution` and `AnalyticDistribution` * fix bug caught by the `Python_Langmuir_rz_multimode` CI test * Place picmi inherited parent classes first to properly render documentation. * fix issue due to secondary parent class `init` not being called
2022-11-09BTD: remove old/legacy back-transformed diagnostics (#3485)Gravatar Remi Lehe 1-55/+8
* Start removing old BTD * Remove GetCellCenteredData * Remove do_backtransform_fields and do_backtransform_particles * Remove more functions * Remove more variables * Update documentation * Fix CI test `RigidInjection_BTD` * Remove slicing from `BTD_ReducedSliceDiag` * Rename `BTD_ReducedSliceDiag` as `LaserAcceleration_BTD` * Query deprecated input and abort Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2022-11-02Allow arbitrary laser antenna normal in picmi (#3477)Gravatar Roelof Groenewald 1-3/+22
* allow arbitrary laser antenna normal - picmi * always check that laser propagation direction is along the normal direction of the antenna if the antenna normal is given
2022-10-28Add neumann BC in WarpX PICMI interface (#3487)Gravatar Remi Lehe 1-1/+2
2022-10-24Add reduced diagnostics to `picmi.py` (#3475)Gravatar Roelof Groenewald 1-55/+173
* add reduced diagnostics to picmi * added test of picmi reduced diagnostics * changes requested during PR review
2022-10-02Major update of the Python/picmi documentation (#3329)Gravatar David Grote 1-28/+530
* Include WarpX specific documentation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Undo the precommit change of import in __init__.py * Docs: Install Pure Python WarpX PICMI Allows to use these classes in our Sphinx autodocs in the manual. * Sphinx: Add Napoleon Extension https://sphinxcontrib-napoleon.readthedocs.io * PICMI Doc Strings: Fix Some Warnings * Removed the DocumentedMetaClass since it was moved to picmistandard * Defined the languate in Docs/source/conf.py * Cleaned up minor issues in the rst files * Updated existing doc strings in picmi.py * Reformatted doc strings in Regression/Checksum/checksumAPI.py * Reformatted doc strings in Regression/Checksum * First set of WarpX specific documentation * Updated to picmistandard version 0.0.20 * Cleaned up the Python document page Fixed up the text to be more clear. Added section headers for each picmi class (for easy reference). * Further updates to picmi.py doc strings Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2022-08-11`isort`: AMReX, WarpX, etc. as First Party (#3307)Gravatar Axel Huebl 1-0/+1
* `isort`: AMReX, WarpX, etc. as First Party Mark the `amrex` and `pywarpx`, `picmistandard`, ... imports as first party, so that they do not change if run locally or remotely pre/post install.
2022-08-08PICMI: Fix Bug in Class `Species` Init (#3286)Gravatar Edoardo Zoni 1-17/+20
2022-07-07Parse the quantity `zmax_plasma_to_compute_max_step` in PICMI (#3217)Gravatar Remi Lehe 1-0/+3
* Parse the quantity `zmax_plasma_to_compute_max_step` * Apply review comments
2022-06-24Added `none` as an option for fields_to_plot (#2419)Gravatar David Grote 1-0/+2
* Added `none` as an option for fields_to_plot * Added CI test case * Further updates, for picmi and CI tests * Skip the call to amrex::WriteMultiLevelPlotfile when writing no fields * Now clears m_varnames_fields * Don't allocate m_mf_output if no varnames * Updated WarpX-tests.ini
2022-05-16Add STL files support in pywarpx (#3089)Gravatar Lorenzo Giacomel 1-8/+38
* Added STL files support in pywarpx * Add new EB bucket * Added name to file headers * Fixing year in file headers * Checking that stl file and imp function are not both specified * Renamed EB bucket to EB2 * Adding STL documentation * Implement suggestions from code review Co-authored-by: lgiacome <lorenzo.giacome@cern.ch>
2022-04-06Added PlasmaLens class to PICMI (#3025)Gravatar David Grote 1-3/+35
* Added PlasmaLens class to PICMI * Added CI test * Added PICMI input file * Fixed the output dir for the CI test * Add `_plt` to Output File Prefix Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>