aboutsummaryrefslogtreecommitdiff
path: root/Source/Python (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-04-22Add python callback call when a break signal is recieved (#3849)Gravatar aveksler1 1-1/+1
* added onbreaksignal python callback * added documentation * fixed bug executing onbreaksignal callbacks at stoptime * applied suggestion from code review. * updated doc-strings
2023-04-13Add callback function before/after the initial Esolve (#3452)Gravatar Remi Lehe 1-1/+2
* Add callback function after the initial Esolve * Apply suggestions from code review * Change name of callback function * Update PR
2023-01-13EB potential python interface (#3624)Gravatar David Grote 2-0/+7
* Add Python routine set_potential_EB to modify eb_potential * Add CI test
2023-01-06add local flag to ParticleBoundaryBuffer::getNumParticlesInContainer (#3586)Gravatar Roelof Groenewald 2-3/+3
2022-12-22Feature magnetostatic solver (#3551)Gravatar S. Eric Clark 2-0/+13
* Initial working Magnetostatic solver integration into warpx. Includes hooks in Python library, and a test problem. Build files updates. New solver algorithm and inputs. * Fixed indexing to allow Magnetostatic solver to work in RZ and 3D. * Removing trailing whitespace. * Adding basic regression testing with benchmarks. * Updated Regression test ini * Augmented test scripts to compare to analytical results for uniform beam. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Updating CI tests for magnetostatic solver. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Updated magnetostatic CI tests to pass locally in regression testing framework. * Adjusting tolerance on magnetostatic_rz regression test to allow for noise in near zero fields. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Converted particle layout to Gridded instead of PsedupRandom to improve reproducibility of particle deposition for regression testing. * Dropped benchmark field comparisons with fields near zero. Dropped particle benchmark for magnetostatic_eb_rz regression test due to randomized particle theta adding noise to fields after a timestep. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Found and fixed a bug in syncronization of MultiFabs when interpolating between grids in the magnetostatic solver. Added Python output for nodal current and vector potential. Updated the CI tests to disable dynamic scheduling and enbale serialization of initial conditions. Updated benchmarks fro tests. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Adding random_theta flag to PICMI interface and updating RZ CI test and benchmark with change to disable randomized theta. * Added documentation to parameters.rst for relativistic-magnetostatic flag. Documentation corrections. Removal of commented source. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Removing need to use do_current_centering. Updated current density inverse scaling support for nodal Jr in radius. Added flag to check for m_rz_random_theta when laying down particles in RZ. * Remove dA/dt term to decouple electrostatic and magnetostatic solvers. * Remove update of auxiliary fields * Adding non-Python test case for magnetostatic solver. Updating benchmarks. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Python/pywarpx/_libwarpx.py Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Python/pywarpx/_libwarpx.py Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Python/pywarpx/_libwarpx.py Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Python/pywarpx/_libwarpx.py Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/Diagnostics/Diagnostics.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/Evolve/WarpXEvolve.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.H Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Refactor names of functions for magnetostatic solver implementation. Remove current_fp_nodal python interface. Drop extraneous ghost cell exchanges. * Adding radial weighting at r=0 for Jr if nodal. * Splitting off Amrex bucket and adjustments to RZ radial weighting into different branches to be merged. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Switch name to labfame-electromagnetostatic * Update example scripts Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2022-10-10Add functions for reading particle id and cpu numbers correctly (#3457)Gravatar Andrew Myers 2-0/+40
2022-10-10Partial refactoring of the utils directory (#3404)Gravatar Luca Fedeli 1-1/+1
* initial work to clean WarpX Utils * remove AMRCore from Ionization tables * progress * refactoring of a part of the utils directory * fix bug * fixed bug * fixed bug * remove debug line accidentally slipped into the code * remove debug line accidentally slipped into the code * remove debug line accidentally slipped into the code * cleaning * fixed bug
2022-08-15Move handling of do_not_deposit to physics callers (#3225)Gravatar Phil Miller 1-0/+1
* Rearrange in preparation for lifting do_not_deposit higher in the call stack * Make do_not_deposit public, so callers can test on it * Make all DepositCharge call sites respect WarpXParticleContainer::do_not_deposit * Drop check for do_not_deposit in DepositCharge * Fix comment to accurately describe np_to_depose * Fix logic to account for other logic in AddSpaceChargeField * Match zero charge density array to filled array in RZ PSATD case * Structure control flow per @dpgrote's preference * Reword comment for clarity
2022-08-10Initialize particle runtime attributes inside AddNParticles (#3272)Gravatar Neïl Zaim 2-5/+9
* Initialize particle runtime attributes before calling AddNParticles * Avoid Multiplication result converted to larger type warning * Directly initialize runtime attributes inside AddNParticles * Update doxygen comment
2022-08-02`SyncCurrent`: Pass References To Current MultiFabs (#3277)Gravatar Edoardo Zoni 2-3/+7
* `SyncCurrent`: Pass References To Current MultiFabs * Add Doxygen for `SyncCurrent`
2022-07-22Add Python Callback Call when Checkpointing Signal is Received (#3251)Gravatar Roelof Groenewald 1-1/+1
2022-06-02Move warning logger in ablastr (#3154)Gravatar Luca Fedeli 1-2/+5
* initial work to move the Warning Logger into ablastr * progress with warn manager class * moved Warning Logger in ablastr * fixed bugs * Fix: `SpectralFieldDataRZ.cpp` Missing include for `WarpX::getCosts(lev);` Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2022-06-01Clean-up in python wrappers to access particle data (#2531)Gravatar Roelof Groenewald 1-30/+15
* use numLocalTilesAtLevel instead of an empty particle iterator loop to determine the number of non-empty tiles * explicitly zero out the `*particles_per_tile` array
2022-04-19add after diagnostic python callback (#3043)Gravatar Roelof Groenewald 1-2/+2
2022-02-24Remove (almost) all residual "dangerous" c-style casts in WarpX (#2889)Gravatar Luca Fedeli 1-15/+15
* remove almost all c-style casts in WarpX * add comment * Fix `getMultiFabPointers`: `const` cast Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2022-02-11Rename ngE as ngEB (used for E,B) (#2841)Gravatar Edoardo Zoni 1-2/+2
2022-02-04added `local` flag to `warpx_getNumParticles` (#2828)Gravatar Roelof Groenewald 2-3/+4
2022-01-26Add Python callbacks before and after collisions (#2791)Gravatar Roelof Groenewald 1-3/+4
* add python callbacks before and after collisions * re-order callback declarations
2022-01-26style fixes in WarpXWrappers.cpp (#2792)Gravatar Roelof Groenewald 1-17/+17
2022-01-26expose WarpXParticleContainer::sumParticleCharge to Python (#2790)Gravatar Roelof Groenewald 2-0/+10
2022-01-25Add SyncRho call to warpx_depositChargeDensity (#2777)Gravatar Roelof Groenewald 2-3/+5
* add SyncRho call to warpx_depositChargeDensity * expose SyncRho to Python; add warpx_clearChargeDensity to reset rho_fp before deposition * remove unneeded warpx_clearChargeDensity function * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * add (default) option to depositChargeDensity to call SyncRho after deposition * added option to depositChargeDensity to zero out rho_fp before deposition * code cleanup * import fields from inside depositChargeDensity Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2022-01-21Access species specific charge density from python (#2710)Gravatar Roelof Groenewald 2-0/+41
* added python wrapper function to deposit a specific species density in rho_fp * added 1D ES input file with MCC that uses the charge deposition functionality * reset rho_fp[lev] before depositing * updated documentation * switch to using simulation.extension in Poisson solver * Apply suggestion from code review Co-authored-by: Phil Miller <phil.miller@intensecomputing.com> * suggested changes from code review * add comment explaining why a direct Poisson solver is used * removed direct solver in 1D example since it is actually slower than the MLMG solver * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * added docstring for warpx_depositChargeDensity * fixed order of imports in new PICMI input file Co-authored-by: Phil Miller <phil.miller@intensecomputing.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2022-01-19Refactor python callback handling (#2703)Gravatar Roelof Groenewald 4-97/+49
* added support to uninstall an external Poisson solver and return to using the default MLMG solver; also updated some callbacks.py calls to Python3 * refactor callback handling - use a map to handle all the different callbacks * warpx_callback_py_map does not need to link to C * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * further suggested changes from code review * added function ExecutePythonCallback to reduce code duplication * moved ExecutePythonCallback to WarpX_py * added function IsPythonCallbackInstalled Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-12-21Inputs: `geometry.dims` option (#2685)Gravatar Axel Huebl 1-1/+1
* 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-13Adding EB multifabs to the Python interface (#2647)Gravatar Lorenzo Giacomel 2-0/+24
* Adding edge_lengths and face_areas to the Python interface * Added wrappers for the two new arrays of data * Adding a CI test * Fixed test name * Added customRunCmd * Added mpi in test
2021-12-03extern 'C': Only in Headers (#2624)Gravatar Axel Huebl 3-27/+99
* extern 'C': Only in Headers This does not belong in source files. Seen as missing symbols on CI for macOS and Intel, both clang compiles. ``` File "/usr/local/lib/python3.9/site-packages/pywarpx/_libwarpx.py", line 94, in <module> from ._libwarpx import * File "/usr/local/lib/python3.9/site-packages/pywarpx/_libwarpx.py", line 94, in <module> libwarpx.warpx_Real_size.restype = ctypes.c_int File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__ libwarpx.warpx_Real_size.restype = ctypes.c_int File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 387, in __getattr__ func = self.__getitem__(name) File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: dlsym(0x7f89a3edb820, warpx_Real_size): symbol not found func = self.__getitem__(name) File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py", line 392, in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: dlsym(0x7fe5d36c5190, warpx_Real_size): symbol not found AttributeError: /home/runner/.local/lib/python3.8/site-packages/pywarpx/libwarpx.3d.so: undefined symbol: warpx_Real_size ``` Refs.: - https://stackoverflow.com/questions/2168241/is-it-required-to-add-extern-c-in-source-file-also - https://isocpp.org/wiki/faq/mixing-c-and-cpp#call-cpp * Fix: Declare amrex_init_with_inited_mpi AMReX mocks out MPI anyway in serial builds. * Wrapper: Add Missing Declarations - fields - PML fields * Wrapper: More Missing Declarations - `warpx_getCellSize`
2021-11-18Add WARPX_PROFILE calls to each python callback. (#2573)Gravatar Peter Scherpelz 1-2/+9
When python callbacks take some time, this is useful as otherwise many callbacks are lumped together in WarpX::Evolve::step.
2021-11-08Install pre-commit (#2532)Gravatar Axel Huebl 1-1/+0
* Add pre-commit Add basis for automated pre-commit checks. Install locally via: ```bash python3 -m pip install -U pre-commit pre-commit install ``` See: https://pre-commit.com * Cleanup: Whitespaces * Cleanup: requirements.txt order
2021-11-05added wrappers to get particle structs for the particles in the boundary ↵Gravatar Roelof Groenewald 2-0/+28
buffers (#2498)
2021-11-05Add Python Wrappers for F,G in PML (#2481)Gravatar Edoardo Zoni 1-0/+44
* Add Python Wrappers for F,G in PML * Add Getters for F,G Nodal Flags * Fix Bug in <F,G>FPPMLWrapper (Default Level) * Fix Bug in F,G Nodal Flags * Use GetPML Method for F,G Nodal Flags
2021-10-25Raise an exception if an MultiFab was not intialized (#2476)Gravatar David Grote 1-75/+88
2021-10-21Add Python Wrappers for F,G (#2460)Gravatar Edoardo Zoni 1-0/+12
2021-09-22External Poisson solver: wrappers to copy the full domain rho and phi ↵Gravatar Roelof Groenewald 1-0/+5
between C++ and Python (#2285) * added missing parts to allow an external Poisson solver to be used instead of the MLMG solver * added rho and phi wrappers to fields.py * added an example of using an external Poisson solver * need to run PICMI test on 2 processors same as non-PICMI version in order to compare plotfiles * changes requested during PR review * pass dictionary to eval statement when calculating boundary potential
2021-09-20Rename WarpXWrappers.(h->H) (#2261)Gravatar Axel Huebl 3-2/+2
* Rename WarpXWrappers.(h->H) All our other header files use `.H`, so renaming this one for consistency. * Remove unused includes of WarpXWrappers.H
2021-08-30Make buffer of scraped particles available to Python code (#2164)Gravatar Phil Miller 2-0/+79
* 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-26Improvement in electrostic field solve when using EB & a small refactoring ↵Gravatar Roelof Groenewald 4-0/+7
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-02Allow extra particle attributes (besides ux, uy, uz and w) to be set at ↵Gravatar Roelof Groenewald 2-0/+10
particle creation in AddNParticles() (#2115) * exposes AddRealComp to Python to allow extra particle attributes to be added at runtime; also includes a new function to grab a particle data array from the name of the component rather than the index * added functionality to AddNParticles() to allow extra particle attributes to also be set during particle creation * added function to get index of a particle component given the PID name * changed new get component index and get_particle_arrays_from_comp_name functions to take species name as argument rather than species id * changed warpx_addRealComp to accept a species name as input and only add the new component for that species * added a test of the pywarpx bridge to get particle data and add new particle attributes at runtime * changed all particle interacting functions in libwarpx to use the species name rather than id, also changed the functions to get particle array data to use the component name rather than index * updated test according to PR #2119 changes * removed unneeded BL_ASSERT(nattr == 1) statement * fixed bug in add_particles to correctly determine the number of extra attributes * fixed bug in AddNParticles if fewer attribute values are passed than the number of extra arrays for the species * use isinstance(attr, ndarray) rather than type(attr) is np.ndarray * generalize_runtime_comps_io * fix OpenPMD * fix OpenPMD * fix plot flags in WritePlotFile * fix offset and comment * changed extra pid test to not use an underscore in the pid name * switched _libwarpx.py::add_particles to use kwargs to accept the weight and extra attribute arrays * License update in test file Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * fix typo * added a test with unique_particles=False * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * updated docstring and comments Co-authored-by: atmyers <atmyers2@gmail.com> Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-07-21Use only species name in libwarpx (#2119)Gravatar Roelof Groenewald 2-42/+24
* changed all particle interacting functions in libwarpx to use the species name rather than id, also changed the functions to get particle array data to use the component name rather than index * removed unneeded function declaration
2021-07-20Python - add new particle attributes at runtime (#2112)Gravatar Roelof Groenewald 2-0/+65
* exposes AddRealComp to Python to allow extra particle attributes to be added at runtime; also includes a new function to grab a particle data array from the name of the component rather than the index * added function to get index of a particle component given the PID name * changed new get component index and get_particle_arrays_from_comp_name functions to take species name as argument rather than species id * changed warpx_addRealComp to accept a species name as input and only add the new component for that species
2021-07-13Interface silver mueller (#2051)Gravatar Revathi Jambunathan 2-3/+4
* 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-09Feature pass MPI comm from Python script to AMReX during initialization (#2034)Gravatar KZhu-ME 2-4/+14
* Added functionality to pass mpi comm from python script to amrex during initialization * Fixed missing _ in MPI._sizeof() * Added functions to get the current processor's rank and total number of processors * Renamed MPI_Comm to _MPI_Comm_type and defined _MPI_Comm_type in except statement * Updated comment to explain why mpi4py needs to be imported before loading libwarpx * Removed ifdef flags that prevent amrex_init_with_inited_mpi from being declared when MPI is off * Changed amrex_init_with_inited_mpi to be declared even when not using mpi, but will be defined to be functionally the same as amrex_init * Defined MPI = None to signify whether MPI is used, to add another check when initializing amrex * Changed ifdef blocks in WarpXWrappers.cpp/h to fix compile errors. Added ifdef block to conditionally declare amrex_init_with_inited_mpi in WarpXWrappers.h to prevent compile error when not using MPI. Removed ifdef block to declare/define same function in WarpXWrappers.cpp since function needs to be declared even when MPI is not used, but will never be called in that case. * Changed BL_USE_MPI to AMREX_USE_MPI and removed incorrect MPI=None statement * Changed BL_USE_MPI to AMREX_USE_MPI * Added test to verify correct passing of MPI communicator to amrex * Added ability to pass mpi_comm to sim.step * Change test to check for differeing outputs when passed different inputs * Removed obsolete comments refactored program to use more shared code * Refactored comments * Updated description to match test * Removed unecessary imports and updated comments
2021-07-06Add possibility to start and stop moving window (#2027)Gravatar thomas clark 2-3/+3
* Add possibility to start and stop moving window * Update Benchmark laserInjection_2d * Update Source/Diagnostics/BTDiagnostics.cpp Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * modification of the MoveWindow function in the python interface * False to True for move j in python function Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-06-24Use "Include What You Use" on WarpX (#1947)Gravatar Luca Fedeli 2-9/+23
* 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-07Call function ReadBCParams() during python execution (#1972)Gravatar roelof-groenewald 2-0/+7
* added ReadBCParams() function call to python execution and added a test of the electrostatic solver executing from python * added separate specification of particle boundary conditions in picmi setup and adjusted the inputs for existing tests to follow the new practice * updated input for rz PICMI test and renamed the electrostatic test to follow standard practice * added arguments for particle boundary conditions to Langmuir RZ test * added dictionary to picmi.py to map from picmistandard field boundary condition specifications to that of WarpX * fixes for failing unit tests; added key, pair 'none' to picmi dictionary of field BCs * also using 'none' for upper boundary condition for RZ test Python_Langmuir_rz_multimode
2021-01-21Define: _OPENMP -> AMREX_USE_OMP (#1520)Gravatar Axel Huebl 1-3/+2
* 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-02Fix python wrapper (#1532)Gravatar David Grote 1-16/+23
* Fixes to the Python interface for accessing field and particle data * In Python wrapper, cleaned up how ngrow is handled
2020-10-23Fix Warning for SigmaBox FabFactory (#1466)Gravatar Weiqun Zhang 1-1/+1
2020-10-16New reduced diag: number of macroparticles (#1414)Gravatar NeilZaim 1-5/+5
* New reduced diag: number of macroparticles * Add parentheses in header line * Apply suggestions from code review Co-authored-by: Luca Fedeli <luca.fedeli.88@gmail.com> * Add some consts * Fuse some lines with std::ofstream Co-authored-by: Luca Fedeli <luca.fedeli.88@gmail.com>
2020-09-30removed extra ; (#1397)Gravatar Luca Fedeli 1-34/+34
2020-07-30Add input parameter to control Galerkin-scheme gather (#1191)Gravatar danielbelkin 2-3/+3
* Rename l_lower_order_in_v to galerkin_interpolation * Changed galerkin_interpolation from int to bool * ... and same for member versions. * Add input parameter to control galerkin_interpolation * Update documentation * semicolon * Update Docs/source/running_cpp/parameters.rst Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update Docs/source/running_cpp/parameters.rst Resolve ambiguity Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Fix doc * Add references to documentation Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>