aboutsummaryrefslogtreecommitdiff
path: root/Source/Utils/WarpXUtil.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-01-12Don't attempt to use costs when working on PML grids. (#2737)Gravatar Andrew Myers 1-0/+12
2022-01-04Allow Dirichlet BCs on r boundaries in RZ (electrostatic) (#2714)Gravatar Roelof Groenewald 1-5/+0
* allow Dirichlet BCs in r when r_min != 0 with ES RZ simulations * handle the rmax boundary condition setting properly when rmin == 0 * add ability to specify rmin and rmax potentials through picmi
2021-12-21Inputs: `geometry.dims` option (#2685)Gravatar Axel Huebl 1-15/+30
* 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-16AMREX_SPACEDIM : EB, Filter, Laser, Utils, and Diagnostics (#2677)Gravatar Prabhat Kumar 1-10/+10
* AMREX_SPACEDIM : EB and Filter * AMREX_SPACEDIM : Laser * AMREX_SPACEDIM : Utils * AMREX_SPACEDIM : Diagnostics * Fix Typo * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * AMREX_SPACEDIM : Warpx.cpp * Update Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
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-191D3V Cartesian Support (#2307)Gravatar Prabhat Kumar 1-3/+11
* 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-12Add Ar and Xe to pre-defined particle types. (#2549)Gravatar Kevin Z. Zhu 1-0/+1
* Added Ar and Xe to pre-defined particle types * Added Boltzmann's constant to warpx parser * Updated documentation
2021-10-15Made explicit several casts (#2431)Gravatar David Grote 1-2/+2
2021-10-11Use parser for more input parameters (#2386)Gravatar Neïl Zaim 1-28/+5
* Use parser for more input parameters * Fix PSATD compilation and apply suggestions from code review * Avoid out of bound array access for num_particles_per_cell_each_dim * Fix few input files with respect to num_particles_per_cell_each_dim * Fix get that incorrectly became query
2021-10-04Fix my_constants being cast to float in single precision (#2369)Gravatar AlexanderSinn 1-5/+37
* Parse my_constants always as double * remove debug print out * add comment * fix comment * add additional comment
2021-08-30Added parsing in intervals (#2246)Gravatar David Grote 1-18/+22
* Added parsing in intervals, minor clean up of querywithparser routines * Split up documentation * Added documentation * Added tests to inputs_2d_multi_rz_rt Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-08-20Allow Silver-Mueller boundary conditions to only be applied in certain ↵Gravatar Remi Lehe 1-32/+0
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-19Implemented the parsing of integer input parameters (#2138)Gravatar David Grote 1-0/+103
* 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-06Shift parsing of physical/mathematical constants from hard-coding to table ↵Gravatar Phil Miller 1-27/+35
lookup (#2128) * Shift parsing of physical/mathematical constants from hard-coding to table lookup * Make constants map local and static for now, until there's a reason for it to be accessible/modifiable * Accept rewording * Accept rewording Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-07-21Use new boundary input (#2110)Gravatar Revathi Jambunathan 1-47/+5
* 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-13amrex::Parser (#2063)Gravatar Weiqun Zhang 1-7/+14
* amrex::Parser Replace WarpXParser with amrex::Parser. Roundoff errors are expected because of additional optimization in amrex::Parser. * Reset the Langmuir_multi_psatd_single_precision benchmark due to change in single precision parser * enable Intel oneAPI CI again * Update Source/EmbeddedBoundary/WarpXInitEB.cpp * Replace hard-coded number in ParticleDiag with a constexpr
2021-07-13RZ: Add ASSERT for Lower Bound of Radial Coordinate (#2082)Gravatar Edoardo Zoni 1-0/+15
* RZ FDTD: Add ASSERT for Lower Bound of Radial Coordinate * RZ PSATD: Add ASSERT for Lower Bound of Radial Coordinate
2021-07-13Interface silver mueller (#2051)Gravatar Revathi Jambunathan 1-0/+32
* interface silvermueller with refactored boundary interface * add interface in silver mueller input files * define first and second half for EvolveB * add do_pml parse snce RZ needs do_pml to be st to false * Silver-Mueller boundary condition in docs * add firsthalf in ApplyBfieldBoundary within PushPSATD as only first first half is used to apply silvermueller * CallSilverMueller once for all boundaries * remove unused do silvermueller flag * fix typo in input file * Apply suggestions from code review Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * abort message if silver-mueller is not selected on all valid boundaries * fix typo * fix eol * remove ifdef from inside the Assert message * check silver-mueller selection after reading all boundaries Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-07-06Reflective particle boundary condition (#1728)Gravatar David Grote 1-4/+4
* Added ParticleBoundaries and reflecting boundary conditions * Added ParticleBoundaries::AllNone * Allowed different particle boundary conditions on each side of the domain * Updated the documentation for particle boundaries * Fix end of line space in Docs/source/running_cpp/parameters.rst * Updated the reflecting BC to use boundary input group * Fixes to reflective boundary conditions * Bug fix in AsStored * Added particle boundaries regression test particle_boundaries_3d * Fixed particle_boundaries_3d.json * Minor updates * Added algo.particle_shape to test case * Remove do_pml from test case Co-authored-by: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> * Need to explicitly turn off pml in CI test * Re-add include * Fixed includes Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-06-24Use "Include What You Use" on WarpX (#1947)Gravatar Luca Fedeli 1-1/+17
* initial tests with IWYU * added a couple of forward declarations * used iwyu on more files * progress * used iwyu on more files * progress with iwyu * progress with iwyu * fixed bug * progress with iwyu * progress with IWYU * progress with IWYU * fixed bug * fixed bug * progress with IWYU * progress with IWYU + use forward declarations in WarpX.H * first try with .def files * fix bugs * progress with IWYU * progress with IWYU * progress with iwyu * correct copyright * fixed bug * fixed bugs * fix missing include * fixed bug * fix bug * fix bug introduced during last bugfix * use iwyu on newly added files * add space * fix bug * fix missing include * fix missing include * fix missing include * fixed bugs * fixed bug * attempt at fixing issue with math functions * added missing include * fixed missing include * using _fwd.H * fixed bug * progress with iwyu * update AMReX branch * enforce alphabetic order * progress with iwyu * use right version of amrex * use right version of amrex for tests * fixed bug * fix another bug * fix missing include * fix missing include * fix missing include * updated amrex * initial work to document new include strategy * updated documentation * Fix rst & private includes * Remove accidentially added files * Fix rst code blocks * one more rst block Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-06-07add m_u (#2003)Gravatar Luca Fedeli 1-0/+3
2021-05-24Add generic field reduction reduced diag (#1944)Gravatar Neïl Zaim 1-0/+3
* Add generic field reduction reduced diag * Make ComputeFieldReduction public * Apply suggestions from code review * Apply suggestions from Luca and Edoardo * Fix syntax error * Fix typo in example input file Co-authored-by: Luca Fedeli <luca.fedeli@for.unipi.it>
2021-05-21Boundary Condition : PEC (#1767)Gravatar Revathi Jambunathan 1-6/+26
* Read boundary and set periodicity, enumerate BC types, added support for periodic * separate particle and field boudnary structs * PEC Etangential Bnormal and setting default pml=0 * eol * add PEC and FieldBoundary routines * eol * remove duplicate struct * update guard cells for PEC * host device functions * remove duplicate function * fix compilation error by adding ; * temporary logic to set PEC boundary * eol * add documentation for PEC and abort if PEC is used for RZ * documentation for PEC functions * remove print statements * Adding field CI test for PEC for 3D with and without MR * fix eol * Apply suggestions from code review * Update Docs/source/usage/parameters.rst * Update Source/BoundaryConditions/WarpX_PEC.cpp * particle PEC CI test * rename analysis scripts for PEC * use iside == 0 as condition * ParallelFor over guard cells. Set field values on boundary and guard in the kernel * ijk_guard not needed anymore * remove unnecessary nbody generated by yt * pi and clight are built-in * cleanup * eol * fix bug in computing ig and ijk_valid * bug fix in guard-cell update in PEC changes benchmark for particles * fix bug in the ig compute * reset particle PEC benchmark * fix logic to set PEC with current interface * adding a none type for RZ * reset benchmarks for 2dLaserInjection, 2dgalilean_hybrid and 2dcomoving CI tests due to differences in PEC reflection * ensure noz shape factor is used for RZ and k=0 for RZ * fix XZ/RZ logic for Ey,Etheta,By,Btheta. Add ncomponent for RZ, generically. * fix the field update for corner cases and mixed boundaries. rename ijk_valid to ijk_mirror since ijk_mirror need not be in valid region * set GuardCell and Boundary cell flags * fix compilation bug * suppress unused variable warning * eol whitespace * fix doc * Apply suggestions from code review Co-authored-by: Andy Nonaka <AJNonaka@lbl.gov> * RZ abort message * reset benchmark after fixing guard-cell updates * fix typo * RZ doc * Update Source/Utils/WarpXUtil.cpp * Update Examples/Tests/PEC/inputs_particle_PEC_3d * changes suggested from code-review * set Enormal and Btangential in guard cell across PEC boundary * add more info about guard cell update in the docs * fix typo * ijk mirror only if ig>0 * update benchmarks * ignore unused k * temporarily revert guardcell damping for Cartesian * fix typo * dont set Etangential and Bnormal to zero if field is not nodal on boundary * set bindary int as boolean * fix high to hi * set default nox to 1 * particle shape for PEC test * update benchmarks for 2D comoving and galilean * reset benchmark for RZ test-cases * Add in benchmarks generated by @EZoni * Changing transverse boundaries to periodic for psatd galilean cases * resetting benchmark for comoving_hybrid_2d and galilean_hybrid_2d * at-least one guard cell must be filled for PEC * abort if PEC is used for PSATD * use new boundary interface to set none for rmin and rmax, since pec does not work for psatd * Update Source/WarpX.cpp * add doc mentioning PEC does not work for PSATD * missing semicolon * Update Source/BoundaryConditions/WarpX_PEC.H Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Update Source/BoundaryConditions/WarpX_PEC.H * lengthy comment for normal and tangential components at domain boundaries * eol fix * grammar * field_hi * reset benchmarks Co-authored-by: Andy Nonaka <AJNonaka@lbl.gov> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2021-05-13Implemented query and getArrWithParser (#1936)Gravatar David Grote 1-8/+74
* Implemented query and getArrWithParser * Updated parameters.rst regarding expressions for multiple floats
2021-05-12BC : Interface for damping EB fields in guard cells in z-direction (#1953)Gravatar Revathi Jambunathan 1-0/+18
2021-04-27Ensure the geometry.coord_sys == 1 for RZ (#1918)Gravatar David Grote 1-0/+7
* Ensure the geometry.coord_sys == 1 for RZ * Fixed Examples/Tests/ElectrostaticSphere/inputs_rz
2021-04-15Boundary Condition : Interface with existing PML (#1768)Gravatar Revathi Jambunathan 1-0/+19
* Read boundary and set periodicity, enumerate BC types, added support for periodic * separate particle and field boudnary structs * Update comment for particle struct * default pml is 0, and reset lo, hi, and do_pml to 1 * turn on pml for MR * eol * remove duplication * resolving commit conflict * explicitly setting pml_HI_MR * default pml lo and hi to 0, and set MR pml lo and hi to the domain values if fine patch coincides with domain boundary * set lo and hi flag for pml when do pml = 1 and domain is non-periodic * remove commented line * add doc * Update Source/Utils/WarpXUtil.cpp remove empty line * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Docs/source/usage/parameters.rst lower case for input * add do_pml flags for IonAcc2d and PlasmaMirror * add pml = true in PICMI for gaussian beam and plasma acceleration * pml is the default field BC * adding temporary defaults for field and particle BC using periodicity * fix temp initialization * set default to pec if input sets pml to 0 * fix typo * logic for both old and new pml interface * fix eol * change examples to original pml input with default values * Update Docs/source/usage/parameters.rst Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * fix comments Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Docs: fix .rst list Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com>
2021-04-06Allow expressions for my_constants (#1874)Gravatar David Grote 1-1/+13
* Allow expressions for my_constants * Update documentation for my_constants * Updates Langmuir input files with nice expressions * Used better example for my_constants * WarpXUtil: Add Includes Add includes for new STL classes used in this file. * Reset Benchmarks: Input Change * Docs: small rewording (no order implied) Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-03-19Warnings: PSATD+RZ & More (#1814)Gravatar Axel Huebl 1-1/+1
* PSATD+RZ: Fix Warnings Fix a couple of warnings in PSATD + RZ. * BesselRoots: Missing Include & using * Kernel & Util: Unused Code & Var
2021-03-18Use Clear Naming Standard for ParmParse Variables (#1809)Gravatar Edoardo Zoni 1-25/+25
2021-03-16Boundary input - Periodic (#1730)Gravatar Revathi Jambunathan 1-0/+64
* Read boundary and set periodicity, enumerate BC types, added support for periodic * eol * separate particle and field boudnary structs * Update comment for particle struct * the valid values are for field/particle * adding docs * eol * remove warning * add doc only for periodic * typo
2021-01-27Replace an always false test with an abort (#1655)Gravatar Luca Fedeli 1-3/+3
* replace always false test with abort * fix bug
2021-01-21Define: _OPENMP -> AMREX_USE_OMP (#1520)Gravatar Axel Huebl 1-1/+1
* Define: _OPENMP -> AMREX_USE_OMP Replace the define check of `_OPENMP` with the explicit backend control of `AMREX_USE_OMP` for parallel constructs. Doing so avoids that we accidentially turn on OpenMP, e.g. if a dependency pulls it in for linear algebra, I/O, etc. This can led to confusion if the user explicitly requested a serial build. Also, we might want to use OpenMP functionality here and there for auxiliary functions w/o having to use the AMReX OpenMP backend, i.e. because we compile for GPUs. * Add missing amrex::Gpu::notInLaunchRegion
2020-12-11PSATD Runtime Control (#1300)Gravatar Axel Huebl 1-5/+14
* Docs: PSATD Runtime Option * Tests: PSATD Runtime Option Add new runtime option to PSATD regression test matrix. * PICMI: PSATD runtime option * Source: PSATD Runtime Option
2020-12-02More parser-enabled ParmParse.query and ParmParse.get (#1501)Gravatar MaxThevenet 1-7/+35
* Parser can be used for most input parameters, including charge and mass * update documentation for the math parser * eol * remove typo and update doc for parser * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-11-03Use the parser for more input parameters (#1481)Gravatar MaxThevenet 1-1/+19
* option to smart-query input arguments using the parser * modify one example to illustrate * cleaner naming * cleaner call to the parser, no need to go through a pointer * better naming and more doc for queryWithParser * update the documentation
2020-09-14Clean up profiling labels (#1320)Gravatar Edoardo Zoni 1-1/+1
2020-06-22Added check of gridding for RZ spectral solver (#1005)Gravatar David Grote 1-0/+80
* Added CheckGriddingForRZSpectral * Bug fix in check gridding for RZ Spectral, fixing handling of refinement ratio * Change numprocs=2 for python reg tests and reset benchmarks (#1075) * changing nprocs to 2 for Python_PlasmaAcceleration test * Resetting benchmark for Python_PlasmaAcceleration test case due to change in nprocs=2 in reg test * resetting benchmarks for Python test-cases except Python_Langmuir due to change in numprocs in WarpX-tests.ini * changing numprocs=2 for Python tests * resetting python reg test benchmarks after updating pywarpx Co-authored-by: Revathi Jambunathan <revanathan@pop-os.localdomain> Co-authored-by: Tools <warpx.lbl.gov> Co-authored-by: Tools <warpx@lbl.gov> * Updates to picmi, mostly related to fields, and add psatd (#1077) * Fixed bad arguments in PICMI_inputs_laser_acceleration.py (#1074) Note that polarization_angle was changed to 0 since that was the value being used because the polarization_argument was bad. * Fix typo for pml_ncell in parameters doc (#1071) * remove #line wp_parser.l because it causes issues with AMReX make system (#1078) * remove amrex namespace from diag functor cpp files and use amrex:: prefic (#1093) * For RZ spectral, updated documentation regarding blocking factor and max grid size Co-authored-by: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> Co-authored-by: Revathi Jambunathan <revanathan@pop-os.localdomain> Co-authored-by: Tools <warpx@lbl.gov> Co-authored-by: NeilZaim <49716072+NeilZaim@users.noreply.github.com> Co-authored-by: WeiqunZhang <WeiqunZhang@lbl.gov> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2020-06-19Fix: Extra Semicolons & In-Line Doxygen (#1109)Gravatar Axel Huebl 1-1/+1
Fix superfluous semicolons and two in-line doxygen strings.
2020-05-01Add parser for more general intervals (slices) (#925)Gravatar NeilZaim 1-0/+2
* Add parser for slices and split function * Apply suggestions from code review Co-Authored-By: MaxThevenet <mthevenet@lbl.gov> * Moved new classes to a separate file * Add intervals parser to input parameter documentation * Fix syntax in parameters.rst * Update Source/Utils/IntervalsParser.cpp * Apply suggestions from code review Co-Authored-By: Axel Huebl <axel.huebl@plasma.ninja> * Implement intervals parser for load balancing * remove EOL whitespace * Remove unnecessary sentence in parameters doc Co-authored-by: MaxThevenet <mthevenet@lbl.gov> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2020-04-28Style change to match the standard (#957)Gravatar Michael E Rowan 1-3/+3
2020-04-21Add hostname to LoadBalanceCosts reduced diagnostic (#902)Gravatar Michael E Rowan 1-1/+0
* Add hostname to reduced diags EOL Fix rd loadbalancecosts test AMREX_USE_MPI EOL move macro to source file Review changes eol add GPU ID if running on GPU eol Typo in comment use vectors to get rid of C-style memory management Fix for test eol * Compute number of unique box data fields in analysis script * analysis script * Use amrex Tokenize to split string * Update WarpXUtil.cpp * Update WarpXUtil.H
2020-03-19Add capability to select fields to dump (#819)Gravatar MaxThevenet 1-0/+23
* 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-16Add AlwaysAssert with std::string message (#792)Gravatar Luca Fedeli 1-0/+11
* 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-12Changed BL_ASSERT to AMREX_ALWAYS_ASSERT for user input (#798)Gravatar David Grote 1-4/+4
* Changed BL_ASSERT to AMREX_ALWAYS_ASSERT for user input * Fixed typo when replacing BL_ASSERTs
2020-02-26Fix Util: No Variable-Length Array (#750)Gravatar Axel Huebl 1-6/+1
Defining a variable-length array (VLA) is a C99 feature. It's conditional in C11 and actually not part of C++ either :)
2020-02-25Includes: Clean Up (#743)Gravatar Axel Huebl 1-3/+5
- Use `""` for WarpX-local includes - Order: WarpX `""`, AMReX `<>`, other third party includes `<>` - Add dir prefixes for WarpX Add order to includes by including from `Source/` onward and keeping directory prefixes of non-local includes for clarity.
2020-02-24Profiler wrapper to allow for cudaDeviceSynchronize (#738)Gravatar MaxThevenet 1-1/+1
* add warpx profiler wrapper * call WX profiler wrapper instead of BL * EOL and cleaning * add doc on profile syncs * do not use PROFILE macros in .H files * replace WX_PROFILE with WARPX_PROFILE and use bool instead of int * typo * this file shouldn't be there
2020-02-18Galilean PSATD with shift (#704)Gravatar Olga Shapoval 1-1/+6
* Read Galilean velocity * Prepare structures for Galilean solver * Started implementing Galilean equations * Analytical limits for X1, X2, X3, X4 coefficients added * Slight changes added * Added Galilean position pusher * Scale galilean velocity * Remove unneeded Abort * Fix Galilean pusher * Allocate Theta2 array * Fix definition of coefficients * Increase guard cells for Galilean * Add guard cell in particle exchange * Type corrected * v_gal added to warpx_current_deposition * v_gal added to WarpXParticleContainer.H * Bug fixed - update particle x-position over one time step * Fix issues with merge from dev * Preparation for merging dev into galilean. * Adding galilean shift * Implemented galilean shift * Changed method's name from GalileanShift to ShiftGalileanBoundary * Added doxygen string for ShiftGalileanBoundary * Removed never used method LowerCornerWithCentering * Removed temporary comments * Removed dt as a variable from DepositCharge method and its dependencies * Converted tab to spaces * Removed EOL white space * Add documentation and automated tests * Fix compilation error * Add automated test * Update automated test * Removed temporary used galilean shift * Removed temporary used particle's push for Galilean PSATD * Removed unused statement * Remove EOL white space. * Added zero shift for LowerCorner in RZ geometry * Minor changes to Galilean implementation * Modifications for GPU * Fix typo Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2020-02-10template Parser so that it works for any number of variablesGravatar Weiqun Zhang 1-6/+3