aboutsummaryrefslogtreecommitdiff
path: root/Source/Python/WarpX_py.cpp (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2020-03-30Current effects in QED corrections (#767)Gravatar Glenn Richardson 2-17/+52
* corrected two typos missed during review of PR-719 * changed file permission from executable to read/write * added current into QED corrections * corrected tabs * fixed indent in multifab construction section * adjusted more indentations that were accidently changed from the origional * Corrected the curent mesh * Update Source/FieldSolver/WarpX_QED_Field_Pushers.cpp Co-Authored-By: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> * Correctly implimented Revathi's recommended changes to the E,B and J boxes * Adjusted comments, tabs, and copyrights * and EOL Co-authored-by: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com>
2020-03-30[mini-PR] Clarifying ionizable particle charge (#863)Gravatar L. Diana Amorim 2-0/+2
* Added documentation note on ionization particle charge * Added correct charge of ion to be ionized * Corrected multiplication symbol Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Testing doxygen issue * Charge correction only to ionizable species * Trying to fix doxygen url fetch issue Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-30Bug fix in ApplyInverseVolumeScalingToCurrentDensity (#866)Gravatar David Grote 1-1/+1
2020-03-30doc: fix formatting for ascent yaml examples (#865)Gravatar Cyrus Harrison 1-113/+117
2020-03-30Added blocking factor to 2d and RZ geometries (#864)Gravatar L. Diana Amorim 1-1/+2
2020-03-30Port rigid injection to the gpu (#862)Gravatar Andrew Myers 2-47/+93
* port rigid injection to the gpu * eol * Apply suggestions from code review Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * define csqi Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-30[mini-PR] Fix energy calculation for photons in reduced diagnostics (#861)Gravatar Luca Fedeli 3-13/+49
* fix energy calculation for photons * fixed typo and mada calculation clearer * added photon particles in reduced diags test * Update Source/Diagnostics/ReducedDiags/ParticleEnergy.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Diagnostics/ReducedDiags/ParticleEnergy.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-30Remove compiler warnings (#843)Gravatar Edoardo Zoni 29-78/+72
* Fix compiler warnings with DIM=2 * Fix compiler warnings with USE_RZ=TRUE * Fix compiler warnings with USE_PSATD=TRUE and DIM=2 * Fix compiler warnings with USE_PSATD=TRUE and DIM=3 * Fix bug: discard only return value when calling DefineAndReturnParticleTile * Remove unused variables not triggering warnings
2020-03-30Documentation update - towards full SI (#301)Gravatar L. Diana Amorim 5-20/+117
* Added blank line after list. Changed characters in link to Q. H. Liu paper so hyoerlink works with sphinx-build 2.1.2. * Added line cut unintentionally. * Removed line added unintentionally. * Same as before. * Same as before, but hopefully successfully * Same as before, but hopefully successfully * Minor changes to description of PWFA example run * Revert "Minor changes to description of PWFA example run" This reverts commit a4d7fa969c906959b018efe683a3e585cbd741f9. * Revert "Profiler wrapper to allow for cudaDeviceSynchronize (#738)" This reverts commit bbefc3dad687f4370afd5bc85386d983201cb321. * Revert "Revert "Minor changes to description of PWFA example run"" This reverts commit 965982d35361ff54d0ad10101ffc31605117e5ac. * Revert "Minor changes to description of PWFA example run" This reverts commit a4d7fa969c906959b018efe683a3e585cbd741f9. * I am making a huge mess with merging * Minor changes to description of PWFA example run * Added explanation PWFA simulation section * Re-structuring. Adding sections for each choice. * Minor fix to note * Minor changes to text * Time step description + fixed line length * Added FDTD and CKC selection * Added max time step calculations * Trying to fix EOL issue * Added mesh refinement and moving window * Fixed minor issues * Fix EOL issues again * Fixed typo - auxiliary Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> Co-authored-by: Diana Amorim <diana@henrivincenti.dhcp.lbl.gov> Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-30[mini-PR] Fix bug in Breit-Wheeler engine (#852)Gravatar Luca Fedeli 3-62/+83
* fixed bug in BW engine * fixed bug * fixed bug * fixed bug * fixed bug * fixed bug * eliminate useless variable * updated test * updated inputfile * Updated tests * increase tolerance from .04 to .07 in QED 3D BW test * do plot pos_bw and ele_bw Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-27Travis CI: set max numprocs=2 and do not overwrite (#860)Gravatar Edoardo Zoni 2-15/+14
2020-03-27Ignore python build/dist and egg folders (#850)Gravatar L. Diana Amorim 1-0/+3
2020-03-27[mini-PR] Read species distribution from OPMD file (#847)Gravatar L. Diana Amorim 5-3/+61
* Added <species>.profile=external_file and .profile_file * Added description of input parameters to Docs * Changed from profile to injection option for external file * Fix typo in amrex abort message (due to copy paste) * Added the OpenPMD use amrex abort message * Minor fix - not sure how to remove EOL issue * Tried to add AddExternalFileBeam functon to PhysicalParticleContainer * Trued to fix EOL white space issue * Added read/print species name from OPMD file * Update Source/Initialization/PlasmaInjector.cpp Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.cpp Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.cpp Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.cpp Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * No need to include openPMD header yet * Fix EOL according to @ax3l's recommendation in #845 * Remove commented out AbortMessage Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Removed commented out part initialization (used only in branch for next PR) Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Added warning that this is WIP Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Changed function name to AddPlasmaFromFile * Removed AMReX warning from loop Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-27Costs vector of (pointer to) vector (#829)Gravatar Michael E Rowan 14-226/+166
* [WIP] costs mf --> costs vector * [WIP] costs vector * [WIP] vector costs * formatting * makefile * [WIP] costs vector * [WIP] *= costs * wts do not need to divide by num cells * Tiling safety on CPU * Add tests * EOL * Remove unneeded input * Update Source/WarpX.H costs documentation Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update timers with times only if user Timers update * warpx.-->WarpX:: * warpx.-->WarpX:: * warpx.-->WarpX:: * warpx.-->WarpX:: * warpx.-->WarpX:: * add dev synch * Update Regression/WarpX-tests.ini Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Delete inputs_loadbalance_costs_heuristic * Update and rename inputs_loadbalancecosts_timers to inputs_loadbalancecosts * Update WarpX-tests.ini Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-26Tests: Fix Bool Switch Typo OMP (#854)Gravatar Axel Huebl 1-1/+1
useOMP is 0 (False) or 1 (True)
2020-03-26Add Initial Distribution Test (#735)Gravatar Yinjian Zhao 5-8/+329
* Add Histogram * Add normalization * Add doc * Minor * Minor * Fix a bug * Add gaussian distribution test * Fix alert and change amr.plot_int * Add maxwell-boltzmann distribution test * Add maxwell-boltzmann distribution test * Add maxwell-boltzmann distribution test * Add maxwell-juttner * Minor * Typo * Minor * Minor * Add const * Apply suggestions from code review Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Modify based on suggestions. * Add histogram name * Add bin values * Don't add histogram name * Modify read_raw_data.py * Add doc * Change ux,uy,uz units * Change ux,uy,uz units * Change if format * Save some variables * Change more * Minor * Fix a bug on GPU * Fix a bug on GPU * Add wrong species name abort * Minor doc * Change #include format * Apply suggestions from code review Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Add const * Change to member variables * revert * Change units based on changes of PR#727 * merge * Add Gaussian position distribution test * Minor * Change based on suggestions * Use read_raw_data.py * Minor * Change to no normalization * Add more in doc * doc * doc * Use relative error * Don't divide by bin_size * Change based on suggestions Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-26Add a few additional diags (divE etc.) (#844)Gravatar MaxThevenet 27-34/+324
* Start implementation of new averaging with staggering: - face-to-cell-center and edge-to-cell-center replaced so far; - TODO: node-to-cell-center and 1D behavior (AMREX_SPACEDIM=1). * first implementation of Diags base classes * add example, temporarily * Continue implementation of new averaging with staggering: - new function takes reference to single MultiFab (no vector); - TODO: node-to-cell-center still in progress. * Fix small bug and clean up * Fix bug in loop over n=0,...,ncomp-1 and clean up * add more functions * Add Doxygen documentation and clean up * Small clean-up in Doxygen documentation * Compile in single precision: add _rt suffix to avoid unnecessary conversions * Avoid accessing staggering index directly from IntVect in innermost loops * Replace do-while loop with for loop (default ncomp=1) * Remove temporary pointer and pass reference to MultiFab (instead of MultiFab*) * Replace AMREX_LAUNCH_HOST_DEVICE_LAMBDA with ParallelFor * cleaning and initialize output mf * use general average routine * move flush in new class, and implemented the Plotfile derived class * add comments * eol * free memory in destructor * typo * typo * no need to clear MF pointers there * though shalt not break existing tests * FlushRaw doesnt have to be virtual for now * The importance of being constant * Capability to select fields in output files * EOL * revert to old inputs * const in right place * avoid brace initializer there * oops, fix logic error in is_in * user can choose flush interval, same behavior as plot_int * Add option to plot raw fields * eol * replace ter flush with dump to avoid confusion * add options * Diagnostics stores a vector of functors to compute diags on the fly * eol * Field gather from diags to sync particle quantities * New diagnostics handle RZ with same behavior as old ones * cleaning and doc * const ref for string * smarter for loop from Axel and typo fix from Reva * Functors to compute some fields * simplify code following Dave's comments * Create subfolders and add more output options (divE etc.) * eol * rename mode_avg to convertRZmodes2cartesian * Update CellCenterFunctor.H * fill varnames and vector of functors at the same time * output rho_new, not rho_old * WarpX instance not needed here * add const * little bit more of reorganization * Apply suggestions from code review Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * add a bunch of const * make derived classes final Co-authored-by: Edoardo Zoni <ezoni@lbl.gov> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-03-26Updated Profiling information in running_cpp (#776)Gravatar L. Diana Amorim 1-34/+23
* Fixed link that was pointing to 404 error page * Added motivation for profiling and TINYPROFILERS explanation * Moved section on NERSC profiling to developers Docs * Update Docs/source/running_cpp/profiling.rst Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update tiny profilers suggestion Docs/source/running_cpp/profiling.rst Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Fix typo Docs/source/running_cpp/profiling.rst Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-26Replace tilebox by growntilebox (#849)Gravatar NeilZaim 1-3/+3
2020-03-26Add load balance options documentation (#842)Gravatar Michael E Rowan 1-0/+29
* Add load balance options documentation * Add load balance options documentations * EOL
2020-03-25New diagnostics support RZ (#836)Gravatar MaxThevenet 10-56/+274
* Start implementation of new averaging with staggering: - face-to-cell-center and edge-to-cell-center replaced so far; - TODO: node-to-cell-center and 1D behavior (AMREX_SPACEDIM=1). * first implementation of Diags base classes * add example, temporarily * Continue implementation of new averaging with staggering: - new function takes reference to single MultiFab (no vector); - TODO: node-to-cell-center still in progress. * Fix small bug and clean up * Fix bug in loop over n=0,...,ncomp-1 and clean up * add more functions * Add Doxygen documentation and clean up * Small clean-up in Doxygen documentation * Compile in single precision: add _rt suffix to avoid unnecessary conversions * Avoid accessing staggering index directly from IntVect in innermost loops * Replace do-while loop with for loop (default ncomp=1) * Remove temporary pointer and pass reference to MultiFab (instead of MultiFab*) * Replace AMREX_LAUNCH_HOST_DEVICE_LAMBDA with ParallelFor * cleaning and initialize output mf * use general average routine * move flush in new class, and implemented the Plotfile derived class * add comments * eol * free memory in destructor * typo * typo * no need to clear MF pointers there * though shalt not break existing tests * FlushRaw doesnt have to be virtual for now * The importance of being constant * Capability to select fields in output files * EOL * revert to old inputs * const in right place * avoid brace initializer there * oops, fix logic error in is_in * user can choose flush interval, same behavior as plot_int * Add option to plot raw fields * eol * replace ter flush with dump to avoid confusion * add options * Diagnostics stores a vector of functors to compute diags on the fly * eol * Field gather from diags to sync particle quantities * New diagnostics handle RZ with same behavior as old ones * cleaning and doc * const ref for string * smarter for loop from Axel and typo fix from Reva * simplify code following Dave's comments * rename mode_avg to convertRZmodes2cartesian * Update CellCenterFunctor.H * fill varnames and vector of functors at the same time * WarpX instance not needed here * add const Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2020-03-24Fix bug introduced in PR #831 (#846)Gravatar Andrew Myers 1-2/+2
2020-03-23Ascent in situ integration: add support for particles (#789)Gravatar Cyrus Harrison 2-50/+194
* bp + ascent: add support for particles * fix trailing whitespace * typo introduced during whitespace purge * ascent docs updates
2020-03-23Diagnostics: Implicit Int Conversion Warning (#841)Gravatar Michael E Rowan 1-2/+3
* Fix overflow alert * Update Source/Diagnostics/ReducedDiags/LoadBalanceCosts.cpp Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-03-23Can plot raw fields with new diags (#827)Gravatar MaxThevenet 10-7/+437
* Start implementation of new averaging with staggering: - face-to-cell-center and edge-to-cell-center replaced so far; - TODO: node-to-cell-center and 1D behavior (AMREX_SPACEDIM=1). * first implementation of Diags base classes * add example, temporarily * Continue implementation of new averaging with staggering: - new function takes reference to single MultiFab (no vector); - TODO: node-to-cell-center still in progress. * Fix small bug and clean up * Fix bug in loop over n=0,...,ncomp-1 and clean up * add more functions * Add Doxygen documentation and clean up * Small clean-up in Doxygen documentation * Compile in single precision: add _rt suffix to avoid unnecessary conversions * Avoid accessing staggering index directly from IntVect in innermost loops * Replace do-while loop with for loop (default ncomp=1) * Remove temporary pointer and pass reference to MultiFab (instead of MultiFab*) * Replace AMREX_LAUNCH_HOST_DEVICE_LAMBDA with ParallelFor * cleaning and initialize output mf * use general average routine * move flush in new class, and implemented the Plotfile derived class * add comments * eol * free memory in destructor * typo * typo * no need to clear MF pointers there * though shalt not break existing tests * FlushRaw doesnt have to be virtual for now * The importance of being constant * Capability to select fields in output files * EOL * revert to old inputs * const in right place * avoid brace initializer there * oops, fix logic error in is_in * user can choose flush interval, same behavior as plot_int * Add option to plot raw fields * eol * replace ter flush with dump to avoid confusion * add options * const ref for string Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2020-03-23Add tolerance to all test, default 1.e-14 (#839)Gravatar MaxThevenet 2-38/+105
* add tolerance to all test, default 1.e-14 * add some tolerance to GPU tests and put tolerance line at the end of each block
2020-03-23Updated Python interface for Python_Langmuir_rz_multimode test (#810)Gravatar David Grote 4-75/+326
* Added nodal and cell size data to the Python interface and updates the Python_Langmuir_rz_multimode regression test * Cleanup of PICMI_inputs_langmuir_rz_multimode_analyze.py
2020-03-23Bulk momentum (#831)Gravatar Andrew Myers 4-15/+142
* Adding a method to query the bulk rather than total momentum * update copyright * use bulk momentum for ballistic correction in add plasma * also include the ballistic correction for lab frame simulations * EOL * bug fixes pointed out in code review * append bulk to variable names * in the Langmuir case, the momentum profile does depend on z * some const * clarify units of u_over_r in docstring
2020-03-23fix AverageAndPackFields, suggested by David Grote (#837)Gravatar Axel Huebl 1-1/+1
Co-authored-by: David Grote <grote1@llnl.gov> Co-authored-by: Cyrus Harrison <cyrush@llnl.gov> Co-authored-by: David Grote <grote1@llnl.gov>
2020-03-20Move kernel ToCellCenter to Average.H to ensure inlining (#832)Gravatar Edoardo Zoni 2-30/+23
2020-03-20ES Solver: Runtime Option Clean Up (#833)Gravatar Axel Huebl 4-28/+24
Removing small leftovers from the transition "compile-time -> runtime" of the electrostatic solver option.
2020-03-20plot_int for new diagnostics (#824)Gravatar MaxThevenet 9-28/+59
* Start implementation of new averaging with staggering: - face-to-cell-center and edge-to-cell-center replaced so far; - TODO: node-to-cell-center and 1D behavior (AMREX_SPACEDIM=1). * first implementation of Diags base classes * add example, temporarily * Continue implementation of new averaging with staggering: - new function takes reference to single MultiFab (no vector); - TODO: node-to-cell-center still in progress. * Fix small bug and clean up * Fix bug in loop over n=0,...,ncomp-1 and clean up * add more functions * Add Doxygen documentation and clean up * Small clean-up in Doxygen documentation * Compile in single precision: add _rt suffix to avoid unnecessary conversions * Avoid accessing staggering index directly from IntVect in innermost loops * Replace do-while loop with for loop (default ncomp=1) * Remove temporary pointer and pass reference to MultiFab (instead of MultiFab*) * Replace AMREX_LAUNCH_HOST_DEVICE_LAMBDA with ParallelFor * cleaning and initialize output mf * use general average routine * move flush in new class, and implemented the Plotfile derived class * add comments * eol * free memory in destructor * typo * typo * no need to clear MF pointers there * though shalt not break existing tests * FlushRaw doesnt have to be virtual for now * The importance of being constant * Capability to select fields in output files * EOL * revert to old inputs * const in right place * avoid brace initializer there * oops, fix logic error in is_in * user can choose flush interval, same behavior as plot_int * replace ter flush with dump to avoid confusion Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2020-03-19Add capability to select fields to dump (#819)Gravatar MaxThevenet 6-39/+112
* Start implementation of new averaging with staggering: - face-to-cell-center and edge-to-cell-center replaced so far; - TODO: node-to-cell-center and 1D behavior (AMREX_SPACEDIM=1). * first implementation of Diags base classes * add example, temporarily * Continue implementation of new averaging with staggering: - new function takes reference to single MultiFab (no vector); - TODO: node-to-cell-center still in progress. * Fix small bug and clean up * Fix bug in loop over n=0,...,ncomp-1 and clean up * add more functions * Add Doxygen documentation and clean up * Small clean-up in Doxygen documentation * Compile in single precision: add _rt suffix to avoid unnecessary conversions * Avoid accessing staggering index directly from IntVect in innermost loops * Replace do-while loop with for loop (default ncomp=1) * Remove temporary pointer and pass reference to MultiFab (instead of MultiFab*) * Replace AMREX_LAUNCH_HOST_DEVICE_LAMBDA with ParallelFor * cleaning and initialize output mf * use general average routine * move flush in new class, and implemented the Plotfile derived class * add comments * eol * free memory in destructor * typo * typo * no need to clear MF pointers there * though shalt not break existing tests * FlushRaw doesnt have to be virtual for now * The importance of being constant * Capability to select fields in output files * EOL * revert to old inputs * const in right place * avoid brace initializer there * oops, fix logic error in is_in * pass by const ref, as suggested by Andrew's review Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2020-03-19Add SmartCreate functor alongside SmartCopy (#825)Gravatar Luca Fedeli 6-49/+173
* created source files * initial work to create SmartCreate * Reorganized ParticleCreation and added SmartCreate.H * add missing files * added possibility to modify weight in SmartCreate * bugfixing * bugfixing * bugfixing * added comments and SmartCreateMode * fixed comments * removed template option * removed unused includes
2020-03-19Add costs reduced diagnostic (#790)Gravatar Michael E Rowan 11-19/+434
* WIP add reduced diagnostic for cost * WIP add costs reduced diagnostic * WIP costs reduced diagnostic * WIP costs reduced diags * Reduced costs * Reduced cost diagnostic * Reduced cost diagnostic * Reduced cost diagnostic * Reduced diagnostics costs * AMREX_ASSERT Works only with heuristic costs (for now) * GNUmakefile * Doc * Doc * Remove unneeded * Documentation * Space * Whitespace * AMREX_ASSERT * whitespace * Update authors * Member variable naming convention * Remove verbose if else * Remove verbose if else * PR review suggestions * whitespace * makefile * Change from Costs-->LoadBalanceCosts * Update docs * Put separator to beginning of header loop * Put separator to beginning of header loop * whitespace * Update documentation * WIP reduced diags * WIP costs RD to not modify WarpX object * WIP Documentation for ComputeCostsHeuristic * WIP whitespace * Add test for reduced_diagnostics_cost * whitespace * Test tolerance * Add a crucial closing bracket * plt_interval * minor * Analysis script * RD costs test * Comments * execute permissions * prtl-->particle * Remove indentation level; remove comments * Remove comments * remove whitespace
2020-03-19Remove costs full diagnostic (#791)Gravatar Michael E Rowan 6-36/+2
* Remove costs full diagnostic * whitespace * Remove warpx.plot_costs from PlasmaMirror test * minor * Minor * Remove plot_costs
2020-03-18Diagnostics reorganization skeleton (#809)Gravatar MaxThevenet 15-2/+535
* Start implementation of new averaging with staggering: - face-to-cell-center and edge-to-cell-center replaced so far; - TODO: node-to-cell-center and 1D behavior (AMREX_SPACEDIM=1). * first implementation of Diags base classes * add example, temporarily * Continue implementation of new averaging with staggering: - new function takes reference to single MultiFab (no vector); - TODO: node-to-cell-center still in progress. * Fix small bug and clean up * Fix bug in loop over n=0,...,ncomp-1 and clean up * add more functions * Add Doxygen documentation and clean up * Small clean-up in Doxygen documentation * Compile in single precision: add _rt suffix to avoid unnecessary conversions * Avoid accessing staggering index directly from IntVect in innermost loops * Replace do-while loop with for loop (default ncomp=1) * Remove temporary pointer and pass reference to MultiFab (instead of MultiFab*) * Replace AMREX_LAUNCH_HOST_DEVICE_LAMBDA with ParallelFor * cleaning and initialize output mf * use general average routine * move flush in new class, and implemented the Plotfile derived class * add comments * eol * free memory in destructor * typo * typo * no need to clear MF pointers there * though shalt not break existing tests * FlushRaw doesnt have to be virtual for now * The importance of being constant * const in right place Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2020-03-18Averages to cell centers (#795)Gravatar Edoardo Zoni 5-75/+137
* Start implementation of new averaging with staggering: - face-to-cell-center and edge-to-cell-center replaced so far; - TODO: node-to-cell-center and 1D behavior (AMREX_SPACEDIM=1). * Continue implementation of new averaging with staggering: - new function takes reference to single MultiFab (no vector); - TODO: node-to-cell-center still in progress. * Fix small bug and clean up * Fix bug in loop over n=0,...,ncomp-1 and clean up * Add Doxygen documentation and clean up * Small clean-up in Doxygen documentation * Compile in single precision: add _rt suffix to avoid unnecessary conversions * Avoid accessing staggering index directly from IntVect in innermost loops * Replace do-while loop with for loop (default ncomp=1) * Remove temporary pointer and pass reference to MultiFab (instead of MultiFab*) * Replace AMREX_LAUNCH_HOST_DEVICE_LAMBDA with ParallelFor * Merge code refactoring suggested in PR #809 * Fix bug after fixing merge conflicts * Restore Doxygen documentation after code refactoring * Unify implementation for 2D and 3D when possible * Fix bug in 2D (IntVect type is not dimension-agnostic) * Use ParallelFor in 4D and remove intermediate overload * Remove temporary Vector srcmf and avoid unnecessary copies * Simplify function AverageAndPackVectorField * Delete function PackPlotDataPtrs (not used anymore) * Minor revisions
2020-03-18Density threshold set to epsilon by default instead of 0. (#815)Gravatar MaxThevenet 2-2/+2
* density threshold set to epsilon by default instead of 0. * add doc for density_min
2020-03-18Acknowledge funding agency and contributors in doc (#775)Gravatar MaxThevenet 3-1/+8
* Acknowledge funding agency and contributors in doc * Funding and acknowledgement
2020-03-17Add some WarpXUtilMsg::AlwaysAssert in particle containers (#811)Gravatar Luca Fedeli 2-9/+29
* replaced AMREX_ALWAYS_ASSERT_WITH_MESSAGE with WarpXUtilMsg::AlwaysAssert where needed * reverted horrible mistake
2020-03-17Small fixes to Python to better handle particle weights (#807)Gravatar David Grote 2-6/+9
2020-03-17openPMD-api: 0.11.0+ (#812)Gravatar Axel Huebl 4-8/+3
* openPMD-api: 0.11.0+ Upgrade the dependency of openPMD-api to 0.11.0 or newer. This version has all defaults for independent I/O with HDF5, ADIOS1 (and as before in ADIOS2) in place. * openPMD-api: use new setSoftwareVersion Use new, less error-prune API call to document the WarpX software version.
2020-03-17Add Edoardo to Garuda tests mailing list (#814)Gravatar MaxThevenet 1-1/+1
2020-03-17Add QED particle creaction routines (#698)Gravatar Luca Fedeli 38-114/+915
* Initial work to add back QED particle generation * Work in progress: port old QED routines * Add two distinct CopyFuncs * modified getMFItInfo and CopyFunc (not working) * bugfixing & work to add back QED particle creation routines * bugfixing * added back quantum photon emission * bugfixing * bugfixing * added back pair generation (still some bugs in photon emission) * removed unwanted check * bugfixing * bugfixing * bugfixing * Moved QED folder * added comments + some refactoring * added comments * remove some virtual functions to make lgtm happy * updated tests * added PhysicalParticleType * bugfixing * added copyright * improved comments * improved comments * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * moved inclusion of QEDInternals folder * moved some inclusion directives between Make files * moved some inclusion directives between Make files (forgot to add a file) * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/PhysicalParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * corrected alignment * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * removed some unnecessary amrex:: * add missing comment * Replaced BL_PROFILE with WARPX_PROFILE * bugfixing and making some variables const * removed some moves * removed some moves * started to change tau into optical_depth_BW or optical_depth_QSR * Using initialization policy to initialize optical depth * bugfixing * forgot to add a file * fixed bug * Revert "fixed bug" This reverts commit a3fb98d10cc30327635aeaa71451a05ca2229ff4. * Update Source/Particles/ElementaryProcess/QEDPairGeneration.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Added doQEDEvents to OneStep_sub1 * add a bunch of const * add _rt suffix * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * added path to included files * Introduced a templated AmIA<something> function using physical_species * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * added paths to included headers * updated documentation * updated examples * bugfixing * bugfixing * fixing examples * fixed example * fixed example * correct a misprint in error message * fixed issue related to 1./mass for photons * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/MultiParticleContainer.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Particles/ElementaryProcess/QEDPhotonEmission.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * make the use of energy_threshold more transparent * remove unnecessary checks * bigfixing * added comment * separate checks for QED processes * added a CheckIonizationProductSpecies for consistency * bugfixing * now using a new variable for photon energy creation threshold * removed unwanted comment * added option to set a user-defined threshold for photon creation * bugfixing * updated documentation * updated example to include new option * updated doc * fixed merge conflict * correct bug in example * reorganized function Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-16Add AlwaysAssert with std::string message (#792)Gravatar Luca Fedeli 3-2/+28
* added new function WarpXUtilMsg::AlwaysAssert * Update Source/Utils/WarpXUtil.H Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Update Source/Utils/WarpXUtil.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * rename argument of AlwaysAssert * updated documentation of Always Assert Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-16Added Python wrapper of charge density arrays (#783)Gravatar David Grote 4-7/+150
2020-03-16For RZ, generalized the centering of the inverse volume scaling of J and rho ↵Gravatar David Grote 1-23/+60
(#772) * For RZ, generalized the centering of the inverse volume scaling of J and rho * Add assert ensuring that Jr is never node-centered Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-16Use C++ templates for the `EvolveF` and `ComputeDivE` function (#753)Gravatar Remi Lehe 9-141/+433
* Prepare EvolveE * Cartesian equations without current * Implement Cartesian EvolveE * Progress towards cylindrical solver * Correct typo * Implement cylindrical solver (without on-axis condition) * Fix compilation errors * Add regularization for RZ solver * Added correction term for F * Remove file for nodal stencil * Apply stylistic changes to EvolveE * Fix compilation errors * Correction to avoid out of bound * Remove references to old file * Correct bug in EvolveB * Implement correction on axis for Et * Remove previous field update functions * Implement EvolveF in Cartesian * Add missing file * Update on-axis condition * Correct typo * Add theta derivative for divE calculation * Fix rho component * Fix compilation error * Use C++ templates in computation of divE * Update Source/FieldSolver/FiniteDifferenceSolver/ComputeDivE.cpp Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Apply suggestions from code review Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Use comparisons to 0 again Co-authored-by: MaxThevenet <mthevenet@lbl.gov>
2020-03-16Add ParticleHistogram Reduced Diagnostic (#727)Gravatar Yinjian Zhao 7-11/+369
* Add Histogram * Add normalization * Add doc * Minor * Minor * Fix a bug * Add const * Apply suggestions from code review Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Modify based on suggestions. * Add histogram name * Add bin values * Don't add histogram name * Modify read_raw_data.py * Add doc * Change ux,uy,uz units * Change ux,uy,uz units * Change if format * Save some variables * Change more * Minor * Fix a bug on GPU * Fix a bug on GPU * Add wrong species name abort * Minor doc * Change #include format * Apply suggestions from code review Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Add const * Change to member variables * revert * Modify doc * Change ReduceRealSum * Improve by using enum * Remove no_normalization * Add struct * Minor format * Apply suggestions from code review Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Change based on suggestions Co-authored-by: MaxThevenet <mthevenet@lbl.gov>