aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/callbacks.py (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2021-12-07CI: Reduce Runtime of Test `multi_J_2d_psatd` (#2638)Gravatar Edoardo Zoni 2-42/+42
2021-12-07PSATD: Implement Scalar Damping for F,G (#2432)Gravatar Edoardo Zoni 3-22/+88
* PSATD: Implement F,G Damping * Reset Benchmark * Fix Call to DampFieldsInGuards
2021-12-07Transform the external fields into the boosted frame (#2610)Gravatar David Grote 22-346/+419
They should be specified in the lab frame
2021-12-07`apt` & `conda`: Update Instructions for Deps (#2629)Gravatar Axel Huebl 1-3/+17
* `apt`: Document CUDA Dev Package For Debian/Ubuntu, document the CUDA package that also ships the development headers. * `conda`: Add `GNUmake` hints Mainly used in the last days of our old regression tests.
2021-12-07Add CI Test for Python Wrappers w/ PML (#2576)Gravatar Edoardo Zoni 4-0/+322
* Add CI Test for Python Wrappers w/ PML * Remove Unused Import * Clean up, Add Link in Docs * Remove get_data(), Avoid global * Move Extent and Slicing to plot_data * Fix Bug * Set Input Before Importing pywarpx.fields * Call initialize_inputs() and initialize_warpx(), not step(1) * Cleaning * Remove Slicing, Add F,G, Add Annotations * Better Smoothing of Initial Fields * Add Values Check, Cleaning * Improve Comment * Fix lgtm-com Alerts * Improve Comment * Cleaning * Cleaning
2021-12-06AMREX_SPACEDIM : Initialization and Particles (#2628)Gravatar Prabhat Kumar 14-188/+188
* AMREX_SPACEDIM : Boundary Conditions * AMREX_SPACEDIM : Parallelization * Fix compilation * AMREX_SPACEDIM : Initialization * Fix Typo * space * AMREX_SPACEDIM : Particles
2021-12-06Redistribute particles in ContinuousFluxInjection (#2611)Gravatar Remi Lehe 2-18/+42
* Redistribute particles in ContinuousFluxInjection * Fix runtime issues * Avoid overwriting previous particles * Extract tiles by reference * Add loop over levels * Correct number of levels * Replace serialize_ics * Fix compilation for GPU Fix compilation bug Fix GPU compilation bug * make sure we define all tiles in the tmp_pc before touching them in a threaded region. Co-authored-by: Andrew Myers <atmyers2@gmail.com>
2021-12-07Docs: Archiving Workflows (#2621)Gravatar Axel Huebl 2-0/+81
* Docs: Archiving Workflows Add a usage workflows section on archiving, moving and sharing simulation results.
2021-12-06Define WARPX_ZINDEX to denote the index for the Z dimension regardless of ↵Gravatar Phil Miller 15-42/+41
the build's dimensionality (#2622) * Define WARPX_ZINDEX to denote the index for the Z dimension regardless of the build's dimensionality * Add WARPX_ZINDEX macro definition to Makefile as well
2021-12-06Correct collision algorithm in RZ. (#2510)Gravatar Yinjian Zhao 8-4/+183
* Add rotation. * Fix a small bug * Add automated test. * rename inputs_rz * Add json * minor * add comment. * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update analysis_collision_rz.py * Fix missing import * Change tolerance. * Add warnings * Apply suggestions from code review * Move assert. * fix end-of-Line whitespaces. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-12-06run_test.sh: Fix unbound WARPX_CI_TMPGravatar Axel Huebl 1-0/+3
Fix error if `WARPX_CI_TMP` is not set.
2021-12-06Azure CI: Cache (#2615)Gravatar Axel Huebl 2-15/+59
* run_test: WARPX_CI_TMP Allow to use a fixed instead of a unique temporary directory. This will help `ccache` to cache compliation, because absolute paths do not change anymore between builds. * Azure CI: Cache Try to use caching for as much as possible on Azure. This might help to reuse AMReX objects between our weekly updates. It might also be just way too large and get evicted quickly.
2021-12-063D Performance Tests: CI smaller (#2623)Gravatar Axel Huebl 1-4/+4
Reduce runtime, which currently was 40 sec.
2021-12-06AMReX: Weekly Update (#2627)Gravatar Axel Huebl 4-4/+4
2021-12-06Fix: Installed Symlink LIB (#2626)Gravatar Axel Huebl 1-1/+6
The latest patch to these routines broke our library alias in installs. By default, this variable is relative and needs the prefix appended. In some cases, e.g., if externally set, it can already be absolute. In that case, we skip adding the prefix.
2021-12-03extern 'C': Only in Headers (#2624)Gravatar Axel Huebl 3-27/+99
* extern 'C': Only in Headers This does not belong in source files. Seen as missing symbols on CI for macOS and Intel, both clang compiles. ``` File "/usr/local/lib/python3.9/site-packages/pywarpx/_libwarpx.py", line 94, in <module> from ._libwarpx import * File "/usr/local/lib/python3.9/site-packages/pywarpx/_libwarpx.py", line 94, in <module> libwarpx.warpx_Real_size.restype = ctypes.c_int File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__ libwarpx.warpx_Real_size.restype = ctypes.c_int File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__ func = self.__getitem__(name) File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: dlsym(0x7f89a3edb820, warpx_Real_size): symbol not found func = self.__getitem__(name) File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: dlsym(0x7fe5d36c5190, warpx_Real_size): symbol not found AttributeError: /home/runner/.local/lib/python3.8/site-packages/pywarpx/libwarpx.3d.so: undefined symbol: warpx_Real_size ``` Refs.: - https://stackoverflow.com/questions/2168241/is-it-required-to-add-extern-c-in-source-file-also - https://isocpp.org/wiki/faq/mixing-c-and-cpp#call-cpp * Fix: Declare amrex_init_with_inited_mpi AMReX mocks out MPI anyway in serial builds. * Wrapper: Add Missing Declarations - fields - PML fields * Wrapper: More Missing Declarations - `warpx_getCellSize`
2021-12-02Fix out-of-bound in the initialization of EB (#2607)Gravatar Remi Lehe 1-4/+4
* Call FillBoundary when initializing EB * Avoid out-of-bound * Bug fix * Apply suggestions from code review
2021-12-03Replace AMREX_SPACEDIM: Boundary & Parallelization (#2620)Gravatar Prabhat Kumar 7-82/+82
* AMREX_SPACEDIM : Boundary Conditions * AMREX_SPACEDIM : Parallelization * Fix compilation * Update Source/Parallelization/WarpXComm_K.H
2021-12-02Mention that the potentail should be constant inside EB (#2618)Gravatar Remi Lehe 1-1/+3
* Mention that the potentail should be constant inside EB * Update text
2021-12-02Fix out-of-bound in Inverse FFT of F,G (#2619)Gravatar Edoardo Zoni 1-2/+2
2021-12-02Add 2D Langmuir Test w/ MR & PSATD (#2605)Gravatar Edoardo Zoni 2-0/+63
* Add 2D Langmuir Test w/ MR & PSATD * Add Missing Compile String
2021-12-02div(E,B) Cleaning Options for PSATD (#2403)Gravatar Edoardo Zoni 10-59/+148
* Implement div(E)/div(B) Cleaning with Standard PSATD * Cleaning * Update Benchmark * Add Nodal Synchronization of F,G * OneStep_multiJ: Nodal Syncs, Damp PML * OneStep_multiJ: Push PSATD Fields in PML * div Cleaning Defaults (Domain v. PML) * Include Fix of #2429 until Merged * Reset Benchmark of Langmuir_multi_psatd_div_cleaning * Multi-J: Remove PML Support * Include Fix of #2474 Until Merged * Exchange All Guard Cells for F,G * Fix Defaults * Update Test, Reset Benchmark * Fix Defaults * Cleaning * Default update_with_rho=1 if do_dive_cleaning=1 * Update CI Test pml_psatd_dive_divb_cleaning * Replace Warning with Abort
2021-12-02Release 21.12 (#2614)Gravatar Axel Huebl 10-16/+16
* AMReX: 21.12 * PICSAR: 21.12 * WarpX: 21.12
2021-12-01Fix installation location for libraries (#2583)Gravatar s9105947 1-1/+1
During configuration the installation location for libraries is given by dumping the cmake variable `CMAKE_INSTALL_LIBDIR`. This commit adjusts the installation of WarpX libraries (WarpX_LIB=ON) to respect this setting. Co-authored-by: Rolf Pfeffertal <tropf@users.noreply.github.com>
2021-11-30MergeBuffersForPlotfile: Barrier (#2608)Gravatar Axel Huebl 1-0/+6
Make sure that all MPI ranks are in sync, i.e., have closed the files that they wrote, before trying to merge them.
2021-12-01AMReX: Weekly Update (#2613)Gravatar Axel Huebl 4-4/+4
2021-11-30Dimensionality Docs: Default (#2609)Gravatar Axel Huebl 1-4/+4
Just adds the note that 3D is the default geometry.
2021-11-30Note that CCache 4.2 introduced large CUDA improvements (#2606)Gravatar Phil Miller 1-1/+1
2021-11-30Added parallel pragma to ApplyBoundaryConditions (#2612)Gravatar David Grote 1-0/+3
2021-11-30Fix segfault when importing _libwarpx without initializing WarpX (#2580)Gravatar Kevin Z. Zhu 2-2/+9
* Added check for if warpx was initialized when calling finalize * Renamed to be warpx_initialized * Fixed reference to global variable Co-authored-by: Peter Scherpelz <31747262+peterscherpelz@users.noreply.github.com> * Changed global variable to member of libwarpx * Fixed syntax errors * Remove custom arg from argv to avoid parmparse error Co-authored-by: Peter Scherpelz <31747262+peterscherpelz@users.noreply.github.com>
2021-11-30Throwing a warning if particle_shape>1 with EB (#2592)Gravatar Lorenzo Giacomel 1-2/+17
* Aborting if particle_shape!=1 with EB * Throw warning instead of aborting * Checking at runtime if EB is initialized * Added missing preprocessor directive * Ignoring an unused variable * Fix typo * Improve style Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-11-30Replaced duplicated current deposition documentation (#2604)Gravatar Remi Lehe 1-68/+32
2021-11-30CONTRIBUTING: Update/Modernize (#2600)Gravatar Axel Huebl 1-42/+77
* CONTRIBUTING: Update/Modernize - Add GitHub account setup - Add local git setup - Modernize for CMake workflows * Apply suggestions by Edoardo Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2021-11-24requirements.txt - PICMI development version (#2588)Gravatar Axel Huebl 1-0/+6
Document in `requirements.txt` on how to install a pre-release version of PICMI.
2021-11-24C++17: Work-Around NVCC gatherParticles (#2596)Gravatar Axel Huebl 1-1/+2
The `noexcept` lambda does not compile in C++17 mode due to an NVCC compiler bug, at least in NVCC 11.3.109. Compiles in C++14 mode with the same compiler.
2021-11-23Fix Init of Vector Members (#2595)Gravatar Axel Huebl 3-4/+5
Fix default init of `Vector` member variables. The old construct is not valid C++. https://stackoverflow.com/a/11491003/2719194
2021-11-22Python: Start 1D Support (#2582)Gravatar Axel Huebl 16-31/+90
* Python: Start 1D Support Start supporting 1D builds in Python. * Fix 1D: PML FillZero unused ... since PMLs are not yet supported in 1D. * BeamRelevant: Fix unused p_pos0 * FromTXYEFileLaserProfile: Not Impl in 1D * QED Schwinger: 1D not Implemented Fix unused warnings, add aborts. * 1D RealVect/IntVect: Initialization Use explicit scalar constructors, no braces. Fix warning in clang 10. * 1D NCI Filter: Fix unused members & Init Unimplemented, but throws warnings. * PSATD: 1D not Implemented - remove compile warnings - start porting some parts * NCIGodfreyFilter: Clean up 2D & Else
2021-11-22Added abort error message to prevent using averaged Galilean PSATD with ↵Gravatar Olga Shapoval 1-0/+4
psatd.update_with_rho=0 (#2571)
2021-11-22Proton-boron fusion: compute initial momentum of produced alphas (#2330)Gravatar Neïl Zaim 7-32/+249
* Proton-boron fusion: initialize alphas momentum assuming isotropy * Remove constexpr underflow in single precision * Update Source/Particles/Collision/BinaryCollision/ProtonBoronFusionInitializeMomentum.H Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-11-22AMReX: Weekly Update (#2590)Gravatar Axel Huebl 4-4/+4
2021-11-22WarpX.cpp: Use Explicit Types, not `auto` (#2585)Gravatar Edoardo Zoni 1-16/+16
2021-11-21openPMD: 1D3V Support (#2586)Gravatar Axel Huebl 5-13/+28
Add 1D output support with openPMD.
2021-11-20Python: More Nullptr Checks (#2574)Gravatar Axel Huebl 1-0/+18
* 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.
2021-11-19added cost of MCC collisions to load balancing calculation (when using ↵Gravatar Roelof Groenewald 2-3/+33
Timers) (#2584)
2021-11-19add github ci compile check for ascent (#2483)Gravatar Cyrus Harrison 2-0/+115
* add github ci compile check for ascent * now with less whitespace * add ascent to insitu workflow * Update .github/workflows/insitu.yml Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * more style * try to run as existing user * new container * use env script * path fix * add ascent test * fix space * move test resources * get into style * style * Ascent CI: Cleanup (#1) - make sure inputs file stays up-to-date - locate alongside example * Update .github/workflows/insitu.yml Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update .github/workflows/insitu.yml Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * rename test file * fix for cp * improve color table for vol rendering * now with rotation Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-11-19setup.py: beta -> stable (#2570)Gravatar Axel Huebl 1-1/+1
Mark the Python meta-data as production/stable.
2021-11-19RZ PSATD, make blocking_factor a power of 2 (#2572)Gravatar David Grote 1-3/+9
* With RZ PSATD, make blocking_factor a power of 2 * Fix typo Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2021-11-19Bilinear Filter: Fix Warning (Vector) (#2575)Gravatar Axel Huebl 1-6/+6
GCC warns in some versions on the access here, since it cannot figure out the runtime size of the vectors. We can just replace `[]` with `.at()` to use a range-checked access that throws an exception instead of a segfault/UB when accessed out-of-bounds. In the preparation of the compute stencils, we don't have hot loops that benefit from non-range checked access, so that cost for improved safety is fine.
2021-11-191D3V Cartesian Support (#2307)Gravatar Prabhat Kumar 64-177/+1646
* Build System: Add 1D Geometry * test PR * test PR * 1D cartesian yee algorithm * fixed typo * Fixes for PML * 1D support related multiple changes * Fix compilation * change 1D to 1D_Z * 1D Field Gather and typo fix * 1D Charge Deposition * Particle Pusher * multiple changes related to 1D * 1D diagnostics and initialization * PlasmaInjector and PEC fixes for 1D * clean-up delete diags file * mobility 1D laser particle and bilinear filter * deleted diags files * update laser particle weight formula * delete diags files * Azure: Add 1D Cartesian Runner * 1D fixes for FieldProbe * Update Docs/source/developers/dimensionality.rst Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * 1d laser injection and langmuir test input files * 1d tests * clean up : delete print statements * analyse simulation result for laser injection and Langmuir tests * EOL * delete input files for which there are no automated tests * delete input files for which there are no automated tests * add ignore_unused to remove warnings * remove space * Fix compilation issues * fix error : macro name must be an identifier * Small bug fix * cleanup Python script for analysis * bug fix * bug fix * Update ParticleProbe: Check 1D in-domain * Update Source/Make.WarpX * Update .azure-pipelines.yml * Add USE_OPENPMD=FALSE to .azure-pipeline.yml * resolve conflict * resolve conflict * fix typo * Correct out-of-bound access * Fix Particle BC in WarpXParticleContainer and correct path to checksumAPI in python analysis scripts * EOL * Fix bug : accessing out of bound index of cell in 1D * remove 1d test for cartesian3d * Fix CI check * Slight style change * Address review comments * Fix GPU compilation Filter.cpp * Fix CI * Fix Indentation * Address review comments * More consistent ifdef for dimension bigger than 1 * Update Examples/Tests/Langmuir/analysis_langmuir_multi_1d.py Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update GNUmakefile Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Regression/prepare_file_ci.py Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianCKCAlgorithm.H Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceAlgorithms/CartesianNodalAlgorithm.H Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Filter/Filter.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Filter/Filter.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Filter/Filter.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Filter/Filter.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Initialization/PlasmaInjector.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Initialization/PlasmaInjector.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * add comment inline to explain twice push_back * Add amrex::Abort for NCIGodfreyFilter Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Prabhat Kumar <prabhatkumar@kraken.dhcp.lbl.gov> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: Remi Lehe <rlehe@lbl.gov>
2021-11-19Mini-PR: Improve Python particle attribute access CI test (#2581)Gravatar Roelof Groenewald 3-29/+41
* updated the Python particle attribute access CI test * additional fixes needed for tests to pass * changes requested by Axel during code review * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>