aboutsummaryrefslogtreecommitdiff
path: root/Examples/Modules/ParticleBoundaryProcess (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-12-02Clean up examples folders (#3545)Gravatar Edoardo Zoni 4-213/+0
* Clean up examples folders * Use `snake_case` names * Rename `nci_corrector` as `nci_fdtd_stability`
2022-03-03file_min_digits: 5->6 (#2385)Gravatar Axel Huebl 2-3/+3
* file_min_digits: 5->6 100k+ step runs are quite common in WarpX. To simplify post-processing scripts, increase the default to pad to 6 digits. This might break some hand-written scripts that use `?????` wild-cards over `*` wildcards in regex and thus need to be updated. But it at the same time simplifies regexes for analysis of data series and listing of such file series. * Update Scripts to Handle New File Names * Fix CI Test pml_x_psatd * Fix CI Test divb_cleaning_3d * Fix CI Tests with EB Support * Fix CI Tests with RZ Support * Fix CI Tests with PICMI Support * Use glob in Analysis of Collision Tests * Use rstrip in Analysis of Collision Tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix CI Tests for Langmuir_multi_1d/psatd * Fix CI Tests for LaserInjection_1d * Checkpoint-Restart Tests: 5 Digits `regtest.py` in `regression_testing` hard-codes 5 digits: ```diff --- a/regtest.py +++ b/regtest.py @@ -734,7 +734,7 @@ def test_suite(argv): shutil.move(test.diffDir, orig_diff_dir) # get the file number to restart from - restart_file = "%s_chk%5.5d" % (test.name, test.restartFileNum) + restart_file = "%s_chk%6.6d" % (test.name, test.restartFileNum) ``` * PICMI Restart Tests: `warpx_file_min_digits = 5` Same as other CI restart tests: hard-coded value in regression suite makes this necessary. X-ref: https://github.com/AMReX-Codes/regression_testing/issues/119 Co-authored-by: Edoardo Zoni <ezoni@lbl.gov> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-22Change _libwarpx.py functions to LibWarpX class methods (#2696)Gravatar Peter Scherpelz 1-5/+4
* Initial attempt at moving function into LibWarpX * Bugfix - undefined structs in get_particle_theta This is untested, identified by IDE/visual inspection only * Unify newlines * Delete libwarpx.clight (duplicated picmi.py) See picmi.constants.c * Change function descriptive comment to docstring Also remove extra newline in __init__ beginning. * Replace pywarpx/_libwarpx calls appropriately * Fix atexit register of finalize function * Reorder WarpX.py imports for pre-commit * Use picmi.Simulation.extension = libwarpx alias This will hopefully preempt user script changes if we restructure things to allow multiple WarpX runs to be done within a single Python script. * Fix libwarpx ref in WarpX.getProbLo/getProbHi * Update get_particle_boundary_buffer doc reference
2021-12-21Inputs: `geometry.dims` option (#2685)Gravatar Axel Huebl 1-1/+1
* Docs: `geometry.dims` option Add a new, required option to specify the geometry of an inputs file at runtime. * Check & Report Runtime Dims Mismatch * Examples: add `geometry.dims` * Deprecation Warning: `geometry.coord_sys` * PICMI: `geometry.dims` * Improve error message sounds a bit better * Improve Doc Description Co-authored-by: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> Co-authored-by: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com>
2021-12-16Wrap shared object in a class to control its loading (#2637)Gravatar David Grote 1-6/+5
* Wrap shared object in a class to control its loading * Fix libwarpx attribute references * Updated callbacks.py for updated libwarpx * Removed the wx module plus other clean up * Further revision of how to use the pywarpx module. Now, _libwarpx should not be imported by external scripts except in special circumstances. * Updated documentation * Clean up end of line whitespace * Added more wrapping routines plus some clean up * Fixed use of pywarpx in two examples * Fix for getistep * Fixed for the EB Python interface * Silence a warning for our wrapper Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-12-15Examples: Python ShellBang & Executable (#2673)Gravatar Axel Huebl 3-2/+4
* Examples: Python ShellBang & Executable Make sure that all PICMI scripts and all analysis Python scripts in `Examples/` are: - executable (`chmod a+x`) - start with a shell-bang to `python3` Now, all scripts can be run directly without a `python3 ...` prefix and also default to the only right executable of Python on older systems. (New systems always have a `python3` alias, too.) * Revert a moved numpy
2021-09-24Stochastic particle reflection from absorbing domain boundaries (#2281)Gravatar Roelof Groenewald 2-0/+148
* 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
2021-07-21Use new boundary input (#2110)Gravatar Revathi Jambunathan 1-2/+4
* support only new boundary interface. set pml flags to 0 as default * use new boundary interface in Examples/Modules/ * use new boundary interface in the input for tests in Examples/Physical_applications * use new boundary interface in the input for tests in Examples/Tests * use new bc * fix typo * fix typo * Update Examples/Tests/SingleParticle/inputs_2d * fix bc in input * specific bc for electrostatic inputs * resetting benchmark for PEC particle CI test after fixing the default pml flags from 1 to 0 * Update Examples/Physics_applications/laser_acceleration/inputs_2d_rz * remove documentation on previous boundary input * Comment to clarify where in the code is_periodic is appended and how it is defined * add default parameters for BC in doc
2021-07-16Infrastructure for interacting particles with embedded boundary walls (#2069)Gravatar Andrew Myers 2-0/+63
* Infrastructure for interacting particles with embedded boundary walls * remove debug prints * protect with AMREX_USE_EB * fix for 2D XZ * also update level set when regridding * rename level set to 'DistanceToEB' * add docstring for scrape particles. * add assertion on maxLevel() since EB does not work with mesh refinement right now. * m_eb_if_parser no longer exists * add test for particle aborption at embedded boundaries * fix bug I introduced refactoring * add new test to suite * fix test names * fix 2D * rookie python error * fix filename in test * fix script * fix unused * make sure we turn EB on in test