Age | Commit message (Collapse) | Author | Files | Lines |
|
* Python: More Nullptr Checks
I am debugging a couple of crashes while mitigating CI.
One of them pointed to the locations here
(`ValueError: NULL pointer access`), so I decided to add some checks.
* Skip invalid tiles
* Skip Empty Tiles But Check Pointer
* Python: nullptr check in _array1d_from_pointer
Make the methods `get_particle_structs` and
`get_particle_boundary_buffer_structs` more robust.
|
|
* Add pre-commit
Add basis for automated pre-commit checks.
Install locally via:
```bash
python3 -m pip install -U pre-commit
pre-commit install
```
See: https://pre-commit.com
* Cleanup: Whitespaces
* Cleanup: requirements.txt order
|
|
buffers (#2498)
|
|
* PICMI: Add amr.max_grid_size_<x,y,z>
* Set All Flags in Python
* PICMI: Add amr.blocking_factor_<x,y,z>
|
|
* Add Python Wrappers for F,G in PML
* Add Getters for F,G Nodal Flags
* Fix Bug in <F,G>FPPMLWrapper (Default Level)
* Fix Bug in F,G Nodal Flags
* Use GetPML Method for F,G Nodal Flags
|
|
|
|
* Update: AMReX/PICSAR to 21.11
AMReX is a post 21.11 release, due to a needed bugfix in compGrad
with EB that landed 4hrs after release.
* WarpX: 21.11
|
|
* added option to specify absolute tolerance for the MLMG solver used in the electrostatic field solve
* added absolute tolerance argument to the documentation
* fixed bug introduced during copy and paste
* expanded documentation for MLMG solver absolute tolerance (added unit) and added a link to the AMReX documentation describing the MLMG solver parameters
* possibly more robust handling of the MLMG convergence
* switched from std::max to amrex::max to hopefully fix compiler complaints
* updated checksum values for MCC test (background_mcc); the values changed only slightly, presumably due to a difference in the initial field solve which would now have the absolute tolerance value included, but since the Python version of this same test (which uses the direct solver) still passes the change is assumed to be inconsequential
* another try to fix the compile issues
* print a message to notify user if the max norm of rho is zero
* Apply suggestions from code review
Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
* switched print statements to the new warning logger
Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
|
|
Fixed indexing for PML fields.
Add all of the fixes to the setitems routines.
|
|
|
|
|
|
|
|
* PICMI: Add div(E),div(B) Cleaning Options
* Update PICMI Version: 0.0.15
|
|
* Fix fields indexing
* Added additional documentation
* Fixed comment
|
|
|
|
* Use os.path.join in picmi.py for portability
* Apply suggestions from code review
|
|
* Python: generalize library search (Win)
* CMake: Honor Multi-Config Lib Alias
For multi-config build generators (MSVC, Ninja opt-in), we
have a deeper build structure based on the build type. Honor
this structure for the (Python) library alias/symlink.
* CI: Windows with Python
Co-authored-by: Dave Grote <dpgrote@lbl.gov>
|
|
* add component names to checkpoint
* read in particle components and add the missing ones on restart
* do not add components if one by the name already exists
* sign error
* Better warning messages
* Update Source/Diagnostics/ParticleIO.cpp
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
* add CI test for restarting particles with runtime-added attributes
* remove unused module
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
|
|
|
|
* Update: AMReX/PICSAR to 21.10
* WarpX: 21.10
|
|
* added tunable particle reflection from absorbing domain boundaries
* extended picmi.py to allow setting boundary reflection coefficients and added a CI test for the reflection implementation
* allow R(E) to be specified, except for embedded boundaries
* changed approach for particle reflection, now the ParticleBoundaries object will hold the reflection coefficient; reflection from EBs not implemented
* added functionality to reflect from EB; still needs to be tested for accuracy
* added support for energy dependent reflection models for domain boundaries
* fixed at least one issue causing CI fails - building reflection model parsers for not physical particle containers
* switched reflection coefficients to be functions of the velocity component perpendicular to the boundary rather than energy
* reverted initial work on reflecting from EBs
* changed naming convention for new CI test for particle reflection
* switched useMPI back to 1 in test
* breaking changes while trying to sort out GPU issue
* fixed issue with CUDA compilation - hopefully :)
* various code improvements from PR review suggestions
* fix of major issues
* no need to parse the reflection models at every step
* skip particles that are already flagged for removal in ApplyBoundaryConditions
|
|
between C++ and Python (#2285)
* added missing parts to allow an external Poisson solver to be used instead of the MLMG solver
* added rho and phi wrappers to fields.py
* added an example of using an external Poisson solver
* need to run PICMI test on 2 processors same as non-PICMI version in order to compare plotfiles
* changes requested during PR review
* pass dictionary to eval statement when calculating boundary potential
|
|
|
|
|
|
* Various updated related to defining embedded boundaries in Python
* Fix typo in comment
Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com>
|
|
* Add a class to output checkpoint diagnostics in picmi
* Add argument to picmi Simulation for restarting from a checkpoint
* Changes to make the checkpoint work
* Change inheritance for Checkpoint and rename variables in Simulation
* Remove file exists check
|
|
* Update: AMReX/PICSAR to 21.09
* WarpX: 21.09
|
|
* Added wrapper to get number of particle species tracked by the scraper
Not sure if this is going to be useful, but it demonstrates a method to get information
from the ParticleBoundaryBuffer into Python.
* Stubbed out the main wrapper functions
* Added parameters to wrapper
* Added wrapper for getting the number of particles scraped of a species on a boundary
* added picmi arguments to scrape particles at the domain boundary
* Added wrapper to get the full particle buffer into python
* rearanged the getBuffer properties code a little
* Added docstrings +other suggested changes
* Added num_particles_impacted_boundary docstring
* fixed mistake in docstring
* Changed boundary parameter to be a string for clarity
* Fixed issue with the boundary parameter for scraping
* Fixed issue with the boundary input for scraping stats wrapper
* Added demonstration of particle scraping wrapper
* Added analysis.py file
* Fix typo in one of the dimension maps
Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com>
* Added before esolve to warpx evolve
* added test for the scraped particle buffer wrappers
* Moved python PICMI particle boundary scrape test
* Renamed test file to the correct name
* Removed old test
* added special functionality to get the timestep at which particles were scraped
* removed debug print
* added python wrapper for the clearParticles() function of the scraper buffer
* added special wrapper function to get the timesteps at which the particles in the boundary buffer were scraped
* updated test to match the non-PICMI test for the particle scraper buffer
* Fix uncaught rebase mistake
* re-activated picmi test of accessing the scraped particle buffers via python
* added documentation for the new parameters involved in the scraped particle buffer and fixed remaining issue with picmi test
* changes requested during code review
Co-authored-by: mkieburtz <michaelkieburtz@gmail.com>
Co-authored-by: Roelof <roelof.groenewald@modernelectron.com>
Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com>
|
|
* added functionality to save particle positions from the previous step
* copied WarpX variable to local variable to fix issue with GPU and DPC++ compilation
* switched to using a species attribute to toggle whether previous positions are saved so it can be turned on for only a subset of species if desired
* changed variable name to be more verbose
* added CI test of saving the previous particle positions
* start of a table in the documentation to describe commonly used runtime attributes
* generate test benchmark data from results obtained with a 2 processor run - the same as what is done during the test
* relaxed tolerance on test
* regenerate CI test reference data with USE_PSATD=TRUE
* Update Docs/source/developers/particles.rst
Co-authored-by: Phil Miller <unmobile+gh@gmail.com>
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
|
|
of the Electrostatic solver (#2143)
* refactored parts of the electrostatic solver to allow an outside Poisson solver to be installed
* added callback to install a Poisson solver that can be used instead of the MLMG solver
* added call to the poissonsolver callback if one is installed and updated ElectrostaticSolver.cpp to calculate the electric field directly in amrex if EBs are used
* fixed issue causing ElectrostaticSphereEB test to crash
* fixed the logic for when to call computeE
* added function to allow charge density to be deposited in rho_fp from outside WarpX
* fixed inconsistency between labframe and relativistic electrostatic simulation setup
* fixed typo
* fixed issue that caused ElectrostaticSphere test to fail and removed unnecessary call to multiply E_y by -1 when doing a 2d simulation
* revert edit to error handling string
* changes requested during PR review
* additional change requested during PR review
* fixed typo
* revert unnecessary changes
|
|
|
|
loaded (#2215)
* Improved error handling when the libwarpx shared library can't be loaded
* Removed extra newline
* Improved check and ended program on error
|
|
* do_pml not parsed. remove code that was added to support both types of boundary interface
* add paranthesis
* fix eol and move to BackwardCompatibility
* missing semicolon
* Update Source/WarpX.cpp
* clean input files in examples
* delete do_pml in performance test input
* fixing an example input file in docs
* Update Source/WarpX.cpp
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
* cleaning up docs
* Update Docs/source/usage/parameters.rst
* fix eol
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
|
|
* Implemented new style BTD in picmi
* Added rho_species. Added documentation
|
|
|
|
_libwarpx.py::add_particles() (#2161)
* added particle weight as an explicit argument for _libwarpx.py::add_particles()
* changes requested during code review
|
|
(#2167)
|
|
* AMReX/PICSAR: 21.08
* WarpX: 21.08
|
|
particle creation in AddNParticles() (#2115)
* exposes AddRealComp to Python to allow extra particle attributes to be added at runtime; also includes a new function to grab a particle data array from the name of the component rather than the index
* added functionality to AddNParticles() to allow extra particle attributes to also be set during particle creation
* added function to get index of a particle component given the PID name
* changed new get component index and get_particle_arrays_from_comp_name functions to take species name as argument rather than species id
* changed warpx_addRealComp to accept a species name as input and only add the new component for that species
* added a test of the pywarpx bridge to get particle data and add new particle attributes at runtime
* changed all particle interacting functions in libwarpx to use the species name rather than id, also changed the functions to get particle array data to use the component name rather than index
* updated test according to PR #2119 changes
* removed unneeded BL_ASSERT(nattr == 1) statement
* fixed bug in add_particles to correctly determine the number of extra attributes
* fixed bug in AddNParticles if fewer attribute values are passed than the number of extra arrays for the species
* use isinstance(attr, ndarray) rather than type(attr) is np.ndarray
* generalize_runtime_comps_io
* fix OpenPMD
* fix OpenPMD
* fix plot flags in WritePlotFile
* fix offset and comment
* changed extra pid test to not use an underscore in the pid name
* switched _libwarpx.py::add_particles to use kwargs to accept the weight and extra attribute arrays
* License update in test file
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
* fix typo
* added a test with unique_particles=False
* Apply suggestions from code review
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
* updated docstring and comments
Co-authored-by: atmyers <atmyers2@gmail.com>
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
|
|
* added functionality to picmi.py to initialize MCC collisions from python runscripts
* bug fix and copyright declaration change
* add Boltzmann's constant to picmi.py
* added test for picmi MCC setup
* set diagnostic output name for test and cleaned up analysis.py
* fixed style issue with EOL white space after merge
|
|
* added functionality to picmi.py to allow an embedded boundary to be set from a python run script
* added test: embedded sphere run from python (the test is the same as ElectrostaticSphereEB)
* added a line to prepare_file_travis.py so that tests with USE_EB=True are not included in Python CI test list
* fixed import path in analysis.py file for new test
* added WarpX_EB flag to setup.py so that embedded boundary functionality can be included in pip installs of pywarpx
|
|
|
|
* changed all particle interacting functions in libwarpx to use the species name rather than id, also changed the functions to get particle array data to use the component name rather than index
* removed unneeded function declaration
|
|
* exposes AddRealComp to Python to allow extra particle attributes to be added at runtime; also includes a new function to grab a particle data array from the name of the component rather than the index
* added function to get index of a particle component given the PID name
* changed new get component index and get_particle_arrays_from_comp_name functions to take species name as argument rather than species id
* changed warpx_addRealComp to accept a species name as input and only add the new component for that species
|
|
|
|
* Replace injection_style = python with injection_style = none
* Update Docs
* Add Default injection_style = none
|
|
|
|
* For RZ, changed the sign of the density corrections near the axis
* Further fixes for deposition correction near axis
* Yet one more sign fix for charge density
* For RZ spectral solver, filled in the guard cells below the radial axis
* Fix white space at end of line
* In RZ spectral backtransform, ensure box is valid
* For RZ inverse volume scaling, fixed use of nGrow to use nGrowVect
* Temporary fix adding damped cells in the domain interior
* Bug fix for RZ PSATD scalar backward transform
* Fixes for damping of the fields in the z-guards
* Bug fix in DampFieldsInGuards
* Bug fix in DampFieldsInGuards (for tiling)
* Added warpx_amr_check_input input parameter
* Removed unneeded damp and zero_in_domain input
* Removed damping related code from picmi
* Improved some comments in code copying field to the radial guard cells
* Update Source/FieldSolver/SpectralSolver/SpectralFieldDataRZ.cpp
Simplify the expression for the sign
Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
* Updated benchmarks
* Updated tolerance for Langmuir analysis script
* Updated CI test galilean_rz_psatd_current_correction
Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
|
|
* Added explanatory comments in timestepper.py
* Add comments to WarpInterface.py
* Added comments to WarpXPIC.py
|
|
* Added functionality to pass mpi comm from python script to amrex during initialization
* Fixed missing _ in MPI._sizeof()
* Added functions to get the current processor's rank and total number of processors
* Renamed MPI_Comm to _MPI_Comm_type and defined _MPI_Comm_type in except statement
* Updated comment to explain why mpi4py needs to be imported before loading libwarpx
* Removed ifdef flags that prevent amrex_init_with_inited_mpi from being declared when MPI is off
* Changed amrex_init_with_inited_mpi to be declared even when not using mpi, but will be defined to be functionally the same as amrex_init
* Defined MPI = None to signify whether MPI is used, to add another check when initializing amrex
* Changed ifdef blocks in WarpXWrappers.cpp/h to fix compile errors.
Added ifdef block to conditionally declare amrex_init_with_inited_mpi in WarpXWrappers.h to prevent compile error when not using MPI. Removed ifdef block to declare/define same function in WarpXWrappers.cpp since function needs to be declared even when MPI is not used, but will never be called in that case.
* Changed BL_USE_MPI to AMREX_USE_MPI and removed incorrect MPI=None statement
* Changed BL_USE_MPI to AMREX_USE_MPI
* Added test to verify correct passing of MPI communicator to amrex
* Added ability to pass mpi_comm to sim.step
* Change test to check for differeing outputs when passed different inputs
* Removed obsolete comments refactored program to use more shared code
* Refactored comments
* Updated description to match test
* Removed unecessary imports and updated comments
|