aboutsummaryrefslogtreecommitdiff
path: root/Source/Python/WarpXWrappers.cpp (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2021-08-30Make buffer of scraped particles available to Python code (#2164)Gravatar Phil Miller 1-0/+67
* 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>
2021-08-30AMReX/PICSAR: Weekly Update (#2249)Gravatar Axel Huebl 4-4/+4
Weekly update to latest AMReX. No changes in PICSAR.
2021-08-30CI: Rename Travis -> CI (#2250)Gravatar Axel Huebl 11-64/+65
Rename scripts and docs since our CI uses several providers now (currently: GitHub actions, Azure pipelines and other providers).
2021-08-30ECT conformal solver (#1923)Gravatar Lorenzo Giacomel 26-61/+2051
* adding base implementation of the conformal solver * adding some preprocessor directives * qualifying the isnan's correctly * getting rid of some unused fields * computing S_stab on the fly * using empty in length check * Source/FieldSolver/FiniteDifferenceSolver/EvolveB.cpp * replaced a looponcpu with a parallelfor * trying to not pass lending/borrowing info by reference in evolveB * passing data using dataPtr * converting inds into a device vector * simplifying some += * extracting the inds BaseFabs as DataPtr * Revert "extracting the inds BaseFabs as DataPtr" This reverts commit bc709d2fcaa347c119514de79a3f57169a05af65. * implementing new way ogf handling cell extensions (gpu compatible) * fixing some white spaces * removed a typo * made a function static * tidying up * tidying up * getting rid of the rho vector * moving the rho update to evolveE * refectoring the cell extension * small chenge in input parameters * updating WarpX.H * bug fix * fixing another bug * rotating the cube * updated gitignore * using the conformal soler in the cube test * fixing the signature of a function * trying to fix the setVal problem * Revert "trying to fix the setVal problem" This reverts commit c7d0e5e3709b730ff570183b2a6df5f587ca4640. * trying to fix the setVal problem * cleaning some comments * removing an abort in device code * Including geometric information in the external field initializer * cleaned up the test * moving the geometric data initialization before the external fields initialization * changing way of saving info about intruded cells * fixed some white spaces * Using S_mod instead of S_red and S_enl * substituting a std::vector with amrex::Array1D * bug fix in the uint8_t -> coords maps * Condensed ect cell info into one single MultiFab * fixing some includes * fixing some more includes * fixed a typo * making some functions available in gpu code * using tilebox instead of validbox for the geometry initialization * communicating the geometric info in the guard cells * fixing the guard cells initialization for ect * fixing an unused parameter * fixing an unused parameter * ignored some unused variables when EB is not supported * cleaning up * cleaning up * ignored some unused variables when EB is not supported * evolving rho just for ect * handling some more unused variables * removing some white spaces * adding the rotated cube test * removed some white spaces * change cells into faces * small fix in unused parameters * fixed a comment * for safety for now just initialize the geometric data when lev==maxLevel * adding some preprocessor directives to isolate EB code * updating Makefile stuff * Improving the rotated cube test * bug fix in mesh refinement * fixing boundary conditions in rotated cube test * deactivating MPI in rotated cube test * activating mpi in test * improving outputs of cells extension * improved the documentation * Update Source/EmbeddedBoundary/WarpXInitEB.cpp Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> * Update Source/EmbeddedBoundary/WarpXInitEB.cpp Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> * Removed some obsolete isnan's * undone change to gitignore * adding some missing AMREX_GPU_DEVICEs * Changing some amrex::Real(0) into 0. Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Making some variables const Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Adding amrex:: to some ignore_unused Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Enhancing readability of some parallelfor's Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Removed some unecessary includes * Fixing some tags Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Fixing the function CountExtFaces * added a comment for Rhofield * Fixed a typo in CountExtCells * trying to remove accesses to private members in ComputeEdgeLengths * making some functions public * undoing some useless changes * undoing some useless changes * adding some AMREX_GPU_DEVICEs * adding some unused variables * adding some AMREX_GPU_DEVICEs to fix warnings * fixing relative error * Making several variables const Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Fixed a comment Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * changing some double to amrex::Real * removing commented lines * changing some double to amrex::Real * removing commented lines * inizialing nelems_x,y,z to avoid a warning * Fixing number of cells * Adding missing analysis routine in rotated cube test Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Making some variables constexpr Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> * Improving some reduce operations Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> * reading time directly from the output * fixed a few data types * fixing another int * Replacing or->||, and->&&, not->! * Adding license info * Adding a white space Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * removed some unused imports * Moving the doxygen documentation * Including AMReX_LayoutData.H * removing some useless parameters * adding ect solver to the doc * Removing some useless reductions * Small change for consistency * Handling the resizing of arrays * Handling correctly the resing of arrays * Fixing some whitespaces * Fixing an indentation * Improving a comment * Removed a useless initialization * Renamed Rhofield to ECTRhofield * Renamed Rhofield to ECTRhofield * Added some if conditions to isolate some EB related code * Improved some comments Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Made some functions not member of WarpX anymore * Isolated some EB-only code * Isolated some EB-only code * Using the square brackets to access vectors * Ignoring some unused variables * Bug fix in initialization * Removed a redundant if * Using enumeration for connectivity and improved names * Added a comment * added a few comments * Removed some useless template parameters * Printing some info only in verbose mode * Revert "Removed some useless template parameters" This reverts commit 2c527980e6872c0212767c27f00e2b53ecbcfd0a. * Fixed a bug with the neighbours enumeration * Initializing geom data alsoo in the ghost cells Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-08-27CI: Trap NaNs, Divisions by Zero, Overflows (#2205)Gravatar Edoardo Zoni 1-2/+3
2021-08-27Fix EB: CUDA Lambda Visibility (#2247)Gravatar Axel Huebl 1-2/+2
``` error #3196-D: The enclosing parent function ("ComputeEdgeLengths") for an extended __device__ lambda cannot have private or protected access within its class ``` For: - `ComputeEdgeLengths` - `ComputeFaceAreas` - `ScaleEdges` - `ScaleAreas`
2021-08-27Ascent: Include for Profiler (#2238)Gravatar Axel Huebl 1-0/+1
Forgot an include.
2021-08-27Functionality to save particle positions from the previous step (#2206)Gravatar Roelof Groenewald 7-1/+227
* 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>
2021-08-27Use ROCm 4.3 in CI (#2240)Gravatar Axel Huebl 2-4/+7
Since the VOP bug has been fixed in the latest ROCm release v4.3, CI can use the latest ROCm release now instead of 4.1. We also need to work around an Ubuntu 20.04 LTS / OpenMPI 4.0.3 bug with Clang compiles regarding the missing linker flag for libopen-pal Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov>
2021-08-26Improvement in electrostic field solve when using EB & a small refactoring ↵Gravatar Roelof Groenewald 7-17/+83
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
2021-08-26Laser-Ion Example: Fix Histogram Functs (#2232)Gravatar Axel Huebl 1-4/+4
Avoid `sqrt(0)` and `1/sqrt(0)` operations in the inputs for the 2D3V Laser-Ion Acceleration example. Those can raise floating point exceptions and NaN's for resting particles.
2021-08-26Particle Unit Conversion: Generalize (#2223)Gravatar Axel Huebl 5-74/+121
Generalize the member to convert the internal proper velocity to SI momentum and back. This is needed for BTD diagnostics, where we have a less specialized but pinned AMReX particle container, which does not have this method.
2021-08-26add include to fix compiler error (#2237)Gravatar Corey Wetterer-Nelson 1-0/+1
2021-08-26Update AMReX: Parser, SENSEI (#2236)Gravatar Axel Huebl 4-4/+4
Update AMReX to pull in new changes about: - local variables in the parser are not reported as undefined - SENSEI fixes on AMRLevel (now truly opt-in)
2021-08-26Fix SENSEI & Ascent component in AMReX.cmake (#2235)Gravatar Corey Wetterer-Nelson 1-2/+2
* fix sensei component name in AMReX.cmake * CMake: Fix Ascent/Conduit Component Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-08-25Multi-J: Optimize Allocations of rho MultiFabs (#2224)Gravatar Edoardo Zoni 6-19/+22
* OneStep_multiJ: Always Deposit rho in Component 0 * For Multi-J Algo Allocate only 1 Component Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-08-25GetPosition 2D3V: y=0 (#2233)Gravatar Axel Huebl 2-9/+16
In 2D3V, we currently assigned the y position a signaling NaN in `GetPosition`, so that it cannot be used accidentially in functions. When we call parser functions, this value is copied even if it is not used, raising the signaling NaN. Rethinking the strategy, we can write more general inputs files if we instead write a sensible default for `y` in 2D3V: `y=0`. So this PR changes the default, which also fixes the issue.
2021-08-25rearranging the loops (#2231)Gravatar Lorenzo Giacomel 1-22/+15
2021-08-25Avoid Unnecessary FFTs of rho (#2234)Gravatar Edoardo Zoni 1-2/+6
2021-08-25Fix: Missing Include Guards (FWD) (#2226)Gravatar Axel Huebl 19-20/+112
* Fix: Missing Include Guards (FWD) All header files need include guards to avoid double definitons. * Fix copy-paste guard
2021-08-24Alphabetized and added PR to glossary (#2228)Gravatar Tiberius Rheaume 1-2/+3
2021-08-24WarpXComm.cpp: Fix Bug (Uninitialized MultiFabs) (#2230)Gravatar Edoardo Zoni 1-0/+6
2021-08-24Docs: Fix Summit Python (#2227)Gravatar Axel Huebl 1-1/+1
We cannot use an anaconda base package, since anaconda ships its own libstdc++ for its compiler stack, which is not compatible with our compiler choice.
2021-08-24Avoid an NaN in collision module (#2225)Gravatar Yinjian Zhao 1-2/+7
* Update inputs_3d * Update inputs_2d * Update inputs_2d * Update inputs_3d * fix nan
2021-08-23Use the function `SyncRho` and the array `rho_fp` in the Electrostatic ↵Gravatar Remi Lehe 2-16/+8
solver (#1811) * Use `SyncRho` in Electrostatic solver * Reuse rho_fp arrays * Allocate arrays for rho * Fix unused variable * Fix bug in rho deposition * Only use rho_fp in lab-frame Poisson solver * Update test cases * Incorporate PR comments
2021-08-23Enable restart with PSATD (#1367)Gravatar Remi Lehe 6-9/+98
* Enable restart with PSATD * Add new restart test * Add new input file * New CI Test: Fix Inputs, Fix Analysis Script * Reuse input for Restart with FDTD * Read time_of_last_gal_shift from Checkpoint * Upload Benchmark for restart_psatd * Update Benchmark for restart_psatd Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2021-08-23Ascent/SENSEI: Add Profiler (#2204)Gravatar Axel Huebl 2-0/+15
* Ascent/SENSEI: Add Profiler Add overall write profilers to Ascent & SENSEI. Add detailed profile for sub-operaions (blueprint, publish, execute) to Ascent as well. * Simplify One-Time Profiler Vars
2021-08-23Check for unused WarpX environment variables when compiling (#2208)Gravatar Michael Kieburtz 1-21/+27
* Added check for unused 'WarpX' environment variables * Changed the approach of this - Go through environment variables as they are used to set cmake flags, and then check any remaining if they start with warpx. * Improved the warning message Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-08-23Scalar field interpolator from grid to particle position (#2221)Gravatar Roelof Groenewald 4-80/+133
* refactored distance to EB calculation to have a more general function to interpolate from a scalar field on the grid to a given position * changed RZ error message to general interpolation function * changed function names to specify that scalar field interpolation is for a nodal field only
2021-08-23AMReX/PICSAR: Weekly Update (#2222)Gravatar Axel Huebl 4-4/+4
Weekly update to latest AMReX. No changes in PICSAR.
2021-08-23No particle resorting when no species (#2136)Gravatar Revathi Jambunathan 1-16/+21
* default sort interval for particles if there are not species * declare parmparse Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * fix eol * define and set sort_interval default to -1 and then reset them to 4 for GPU, -1 for CPU if there are species/lasers in the input Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2021-08-23Docs: Cori PICMI Instructions (#2219)Gravatar Axel Huebl 1-24/+94
* Docs: Cori PICMI Instructions Too tricky to get right to just cross-link - add documentation how to build & run PICMI interfaces on Cori. * Link: Jupyter Instructions
2021-08-23Evolve: Reorder py_afterstep and cur_time break (#2213)Gravatar Peter Scherpelz 1-10/+13
2021-08-20Added transform of fields from lab to boosted frame (#2201)Gravatar David Grote 3-8/+58
2021-08-20Allow Silver-Mueller boundary conditions to only be applied in certain ↵Gravatar Remi Lehe 6-66/+57
directions (#2220) * Apply Silver-Mueller boundary only in requested direction * Include a test with independent Silver-Mueller boundary conditions * Correct typo in implementation
2021-08-20Docs: OLCF ADIOS2 Currently BrokenGravatar Axel Huebl 1-1/+1
Tickets open: - OLCFHELP-3319 - https://github.com/ornladios/ADIOS2/issues/2836
2021-08-20Updated the installation instructions (#2218)Gravatar Michael Kieburtz 1-1/+1
2021-08-20Particle boundary scrape (#2124)Gravatar Andrew Myers 18-28/+462
* Some prelimary refactoring. * missing header * implement scraping particles that leave the domain boundaries into buffers * fix tabs * missing return * merging * remove redefinition * functor to work around cuda bug. * handle 2D * Add support for EB buffer * protect for AMREX_USE_EB, static_assert that EB and RZ aren't both on. * fix unused * add inputs file * add test * fix bugs, remove print * fix test * fix test path. * remove no-op code * adding clear particles method * attempt at adding time stamp * Use integer step number instead of physical time to timestamp particles; also put shared code into named functor. * move call to before apply boundary conditions * use more descriptive inputs parameter * Update Source/Particles/ParticleBoundaryBuffer.cpp * fix comp bug * move CopyAndTimestamp to cpp file * also move IsOutsideProblemDomain functor * Rename to m_particle_boundary_buffer - Name: currently only used for boundary scraping - Singular: only one instance * Fix missing EOF newline * Typo: author * Param Read / Init: Cleanup For Simplify Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-08-20Improved error handling when the libwarpx shared object library can't be ↵Gravatar Michael Kieburtz 1-2/+7
loaded (#2215) * Improved error handling when the libwarpx shared library can't be loaded * Removed extra newline * Improved check and ended program on error
2021-08-20Docs: Summit with RHEL8 (#2216)Gravatar Axel Huebl 1-16/+13
Summit has undergone a major software update to RHEL8. The default compilers and CUDA version have been modernized, among others providing C++17 support by default. Also, our scientific I/O stack is now system-provided, thanks to our Spack and E4S efforts :tada: Please update your `warpx.profile` on Summit, re-build your Python virtual environment and re-compile your executables.
2021-08-20Add plot_raw_rho in parameters doc (#2212)Gravatar Neïl Zaim 1-0/+5
* add plot_raw_rho in parameters doc * Update Docs/source/usage/parameters.rst Co-authored-by: Luca Fedeli <luca.fedeli@for.unipi.it> Co-authored-by: Luca Fedeli <luca.fedeli@for.unipi.it>
2021-08-19Ionization.H: Fix Bug (Division by Zero) (#2214)Gravatar Edoardo Zoni 1-1/+1
2021-08-19Implemented the parsing of integer input parameters (#2138)Gravatar David Grote 5-49/+180
* Implemented the integer parser * Updated comment * Updated documentation * Fixed unused parameters * Added some additional documentation * Reworked the implementation so that expressions are evaluated as real and rounded to the nearest integer * Fixed loop type * Copied over initial value of variable to the real instance * Update Source/Utils/WarpXUtil.cpp make result const * Update Source/Utils/WarpXUtil.cpp make result const * Update Source/Utils/WarpXUtil.cpp Fix comment * Added safeCastToInt * Fixed adding of safeCastToInt * Cleaned up safe casting routine * Added parsing of more integer inputs * Cleaned up the integer parser, removing unneeded cast from int to real * Made x a const in safeCastToInt Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-08-18Bug fixed: looping over all species now within `OneStep_multiJ` (#2207)Gravatar Olga Shapoval 1-6/+4
* Bug fixed: looping over all species now within 'OneStep_multij' * Bug fixed: looping over all laser particles within DepositCharge in multi-J
2021-08-18Rho Diags: Do Not Allocate `rho_fp/cp`, Remove `plot_rho`, `setplot_rho` (#2203)Gravatar Remi Lehe 6-32/+7
2021-08-18update use-sensei flag (#2192)Gravatar Corey Wetterer-Nelson 15-36/+51
* update use-sensei flag also add FlushFormatSensei.cpp to CMakeLists * CMake: WarpX SENSEI Option Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-08-18openPMD-api: 0.14.2 (#2150)Gravatar Axel Huebl 14-27/+23
This updates our requirements to openPMD-api 0.14.2+ Among others, this release introduced resizable data sets, which we will soon use for particle backtransformed diagnostics.
2021-08-17CI: Cancel Prev. GH Action on Push (#2202)Gravatar Axel Huebl 7-0/+28
Save CI resources by canceling already running or waiting builds if a PR is updated. This was previously only done for Azure and now also for GH actions.
2021-08-16Minor fix to the documentation of the plasma lens (#2200)Gravatar Remi Lehe 1-1/+1
2021-08-16Update Scripts: .ini file (#2191)Gravatar Axel Huebl 2-0/+48
Update regression tester .ini files as well in weekly/release updates of AMReX and PICSAR.