Implement grid based merging algorithm (#4820)
* initial implementation of the grid based merging routine * add compiler directives for different dimensions * avoid implicit capture of `this` in lambda * code clean-up * use `PIdx::x` for r-coordinate while 4667 is still being reviewed * fix clang-tidy errors * another clang-tidy fix * improve doc-strings * use iterative heap sort since "SYCL kernel cannot call a recursive function" * fix clang-tidy error * fix sorting bug; add documentation and CI test * add dummy CI benchmark file to get proper values * update benchmark values based on Azure results * rename `GridBasedMerging` -> `VelocityCoincidenceThinning` * use `Algorithms::KineticEnergy` * reorganize merging loop * update CI benchmark values * Relativistic correction in product particles' velocity calculation * update benchmark values after changing energy calculation * handle edge case with zero cluster momentum * call redistribute after particle resampling to remove invalid particles * use unsigned ints for indexing * Revert "use unsigned ints for indexing" This reverts commit abe027f3402cf0e7c51c4599a0a50b9e8a6b817a. * call `Redistribute` before merging * code clean-up * also check for `std::isnan` in edge case handling * add reference for grid based merging * check that cluster has total weight > 0 before merging * add defense against numerical error leading to nan * make resampling message more verbose * use `deleteInvalidParticles` instead of `Redistribute` * remove default values for merging parameters * remove doc-string default specifications in picmi.py * apply suggestions from code review * update benchmark values; avoid possible nans * add assert to prevent merging of photons * add `BackwardCompatibility` check to `LevelingThinning`
显示
- Docs/source/refs.bib 11 个添加, 0 个删除Docs/source/refs.bib
- Docs/source/usage/parameters.rst 21 个添加, 7 个删除Docs/source/usage/parameters.rst
- Examples/Tests/resampling/inputs_1d_velocity_coincidence_thinning 46 个添加, 0 个删除.../Tests/resampling/inputs_1d_velocity_coincidence_thinning
- Examples/Tests/resampling/inputs_leveling_thinning 1 个添加, 1 个删除Examples/Tests/resampling/inputs_leveling_thinning
- Python/pywarpx/picmi.py 30 个添加, 1 个删除Python/pywarpx/picmi.py
- Regression/Checksum/benchmarks_json/resample_velocity_coincidence_thinning.json 20 个添加, 0 个删除...nchmarks_json/resample_velocity_coincidence_thinning.json
- Regression/WarpX-tests.ini 17 个添加, 0 个删除Regression/WarpX-tests.ini
- Source/Particles/PhysicalParticleContainer.cpp 9 个添加, 5 个删除Source/Particles/PhysicalParticleContainer.cpp
- Source/Particles/Resampling/CMakeLists.txt 1 个添加, 0 个删除Source/Particles/Resampling/CMakeLists.txt
- Source/Particles/Resampling/LevelingThinning.H 6 个添加, 0 个删除Source/Particles/Resampling/LevelingThinning.H
- Source/Particles/Resampling/LevelingThinning.cpp 13 个添加, 1 个删除Source/Particles/Resampling/LevelingThinning.cpp
- Source/Particles/Resampling/Make.package 1 个添加, 0 个删除Source/Particles/Resampling/Make.package
- Source/Particles/Resampling/Resampling.cpp 5 个添加, 0 个删除Source/Particles/Resampling/Resampling.cpp
- Source/Particles/Resampling/VelocityCoincidenceThinning.H 115 个添加, 0 个删除Source/Particles/Resampling/VelocityCoincidenceThinning.H
- Source/Particles/Resampling/VelocityCoincidenceThinning.cpp 278 个添加, 0 个删除Source/Particles/Resampling/VelocityCoincidenceThinning.cpp
想要评论请 注册 或 登录