aboutsummaryrefslogtreecommitdiff
path: root/Source (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-01-13Fixing staircased EM solver (#2739)Gravatar Lorenzo Giacomel 8-103/+26
* Fixing the staircase consistency * Removed the face_areas multifabs everywhere they're not needed * Bug fix * More fixes * Another fix * Another fix * Initialize areas anyways for the initialization * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: lgiacome <lorenzo.giacome@cern.ch> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-12Don't attempt to use costs when working on PML grids. (#2737)Gravatar Andrew Myers 4-19/+58
2022-01-12Initialize EB grid data on restart. (#2689)Gravatar Andrew Myers 1-0/+2
* Initialize EB grid data on restart. * Add restart test with EBs. Co-authored-by: Peter Scherpelz <peter.scherpelz@modernelectron.com>
2022-01-12Fix PML with anisotropic refinement ratio (#2734)Gravatar Weiqun Zhang 2-64/+72
* Fix PML with anisotropic refinement ratio Use IntVect instead of int for the number of cells in PML so that anisotropic refinement ratio can be properly handled. * Reset Benchmark of Langmuir_multi_2d_MR_anisotropic Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2022-01-11More efficient PML BoxArray (#2631)Gravatar Weiqun Zhang 2-99/+231
* More efficient PML BoxArray If the union of the grids is a single rectangular domain, we can simplify the process and generate more efficient PML BoxArray. * Update Source/BoundaryConditions/PML.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Apply suggestions from code review * reset Python_wrappers benchmark * fix the computation of sigmas for the new BoxArray * Revert "reset Python_wrappers benchmark" This reverts commit 2999304571d525076ba6c1f7cbbcef6e9acafabb. * fix warning * fix 1d * initialize to quiet NaN * Reset Benchmark: pml_x_psatd - maximum relative error: 2.50e-06 - new implementation: 10 PML grids - old implementation: 24 PML grids * Reset Benchmark: LaserAccelerationMR - maximum relative error: 2.73e-04 - new implementation: (18,8,8) PML grids - old implementation: (48,18,18) PML grids * Reset Benchmark: LaserOnFine - maximum relative error: 6.44e-05 - new implementation: (2,6,6) PML grids - old implementation: (2,12,12) PML grids * Reset Benchmark: PlasmaAccelerationMR - maximum relative error: 6.84e-04 - new implementation: (10,6,6) PML grids - old implementation: (24,12,12) PML grids * Reset Benchmark: RefinedInjection - maximum relative error: 2.55e-04 - new implementation: (18,8,8) PML grids - old implementation: (48,18,18) PML grids * Reset Benchmark: momentum-conserving-gather - maximum relative error: 7.43e-04 - new implementation: (10,6,6) PML grids - old implementation: (24,12,12) PML grids * Reset Benchmark: subcyclingMR - maximum relative error: 2.41e-05 - new implementation: (6,6,6) PML grids - old implementation: (12,12,12) PML grids * Reset Benchmark: Langmuir_multi_2d_MR - maximum relative error: 1.32e-01 (B numerical artifact) - new implementation: (0,20,20) PML grids - old implementation: (0,52,40) PML grids * Reset Benchmark: Langmuir_multi_2d_MR_psatd - maximum relative error: 1.05e-01 (B numerical artifact) - new implementation: (0,20,20) PML grids - old implementation: (0,52,40) PML grids * Reset Benchmark: Python_LaserAccelerationMR - maximum relative error: 2.73e-04 - new implementation: (18,8,8) PML grids - old implementation: (48,18,18) PML grids * Reset Benchmark: Python_wrappers - maximum relative error: 1.07e-08 - new implementation: 8 PML grids - old implementation: 16 PML grids * Reset Benchmark: pml_psatd_dive_divb_cleaning - maximum relative error: 4.91e-03 - new implementation: 24 PML grids - old implementation: 98 PML grids * Remove an assertion. We will fix it later * Reset Benchmark: Langmuir_multi_2d_MR_anisotropic - maximum relative error: 1.07e-01 (B numerical artifact) - new implementation: (0,16,16) PML grids - old implementation: (0,40,34) PML grids * Reset Benchmark: PEC_field_mr - maximum relative error: 3.98e-02 - new implementation: (0,2,2) PML grids - old implementation: (0,2,2) PML grids (different number of ghost cells on coarse PML patch) Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2022-01-09Multi-J: J Always Linear in Time (#2679)Gravatar Edoardo Zoni 17-102/+89
* Remove WarpX::J_linear_in_time * Fix Bug * Implement Deposition of Rho at Half Time * Implement New Equations for E * Fix New Equations for E * Cleaning * Fix Limits of X2, X3, X7 * Implement New Equations for F * Implement New Equations for F * Revert E Equations to Avoid Roundoff Changes * Remove Quadratic Equations * Remove Deposition of Rho at Half Time Step
2022-01-07Particle Buffer for Backtransformed Diagnostics (#1898)Gravatar Revathi Jambunathan 38-212/+1562
* move BTD call before Redistribute * define particle buffer, BTD particle functor, particle filter * select particles on the slice * add particle functors * add Lorentz Transform * fix conflict * add call to loretnz operator * storing Particles in buffer * This is WIP. Added particle buffers, filled them, sent them for flush with number already flushed. Does not work for multiple flushes. Crashes for OpenPMD. * trailing endif after rebase * adding print statements and not flushing particles in OPENPMD if numpart is 0 * last timestep flush is ensured at the end of evolve loop * fix bug in declaring uy uy new and computing uzp * set particle Geom, BA, and DMAP for particle flush with plotfile * set Particle BA Geom DMAP for particle buffer and no BTD transform for force flush * separate compute and pack from flush * Fix Typo: resizeable -> resizable Fixes HDF5 BTD particle output. * new class for plotfile particles for BTD * copy particle_H and DATA and Header. some WIP print statements * Merge plotfile * clean print statements * fix warning message * struct declaration in header, fix warning * doxygen comments and copyright * clean print statements * fix eol and override function warning * tile data * fix output species array size bug * fix access for particle buffer size * clean and move time-update * add cur_time update back * remove cur time update which was called twice * dont access particles flushed already for full diagnostics * cur time must be updated for RigidInjection BTD CI test to pass * temporarily move call to BTD * updating time and calling BTD before movewindow * cleanup * reset benchmarks and analysis script * clean and add comments * fix particle box array, geom, dmap * reset benchmarks for multi_J rz and ElectrostaticSphereEB_mixedBC * wip commit * wip commit * add SI conversion * abort for openpmd bp backend if species is selected. Also write particle output for BTD only if write_species is 1 * add documentation for aborting if adios is used with openpmd and add other BTD input parameters * Apply suggestions from code review commit Axel's suggestions from review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * use bool instead of int * fix doxygen format * using h5 as backend in example test to ensure consistency with abort for particle output. * fix doxygen comment * reset benchmark again for comoving_2d_psatd galilean_2d_psatd multi_J_rz_psatd * reset benchmark for background_mcc * self-review suggestions * reset benchmarks. Update with last snapshot full info * Axel's PR suggestions Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Axel's doxygen fix Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * add comments * fix eol * improved exception handling for stringsteam * PR suggestions * Axels' suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Axel's suggestions :) Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * simplify logic * suggestions from review (Axel/Reva) Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * variable name change for clarity * if num particles in tmp array is 0, return * Use new BTD inputs to set up BTD for particles in the corresponding particle container * unused var * fix logic error * speciesID undefined * separate particle and field buffer calls and initialization for BTD. Data common to both are initialized separately * rename variable so it does not ghost existing varname * add more comments * Assert that fields are on * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * redundant function definition * unused variable * unused variable zp * 1D 2D 3D definition * fix else * Apply suggestions from code review Add Prabhat's suggestion Co-authored-by: Prabhat Kumar <89051199+prkkumar@users.noreply.github.com> * missing semicolon and ignore xp yp for 1D * resetting benchmarks for boosted sims and mcc sim * temporarily changing tolerance since the relative difference for momentum_z is 3.68e-3 and the current tolerance is 2.5e-3 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: Prabhat Kumar <89051199+prkkumar@users.noreply.github.com>
2022-01-04Add Coulomb collision and nuclear fusion subfolders (#2389)Gravatar Neïl Zaim 11-7/+8
2022-01-04Allow Dirichlet BCs on r boundaries in RZ (electrostatic) (#2714)Gravatar Roelof Groenewald 3-16/+28
* 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-23Test particle scraping for EB in RZ. (#2691)Gravatar Yinjian Zhao 3-14/+22
* Modify WarpXFaceExtensions.cpp and WarpXInitEB.cpp. * Remove an assertion. * Update particle scraping for RZ * Apply suggestions from code review * Add automated test. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix CI issues * Change permissions Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-23Adding staircased EB in the PMLs (#2693)Gravatar Lorenzo Giacomel 10-73/+246
* Adding EB to PMLs * Fix to guard cells * Initializing EB data only if AMREX_USE_EB * Not compiling at all EB initialization when EB is off * Bug fix (wrong order of PML init arguments)
2021-12-23removed distinct functions computePhiRZ and computePhiCartesian since these ↵Gravatar Roelof Groenewald 2-177/+51
function now share mostly the same code (#2709)
2021-12-22Add embedded BC in RZ. (#2602)Gravatar Yinjian Zhao 6-74/+65
* Start to add embedded BC in RZ. * Add . * Remove scaling * Fix compilation error * Update * Can compile. * Add call linop.setRZ(true). * Remove lines 264 to 312 and 343 to 345. * Add assert. * Remove an assert. * Add an automated test. * Change to MLEBNodeFDLaplacian. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix compilation error * Update the test selection * Correct compilation error * Move test to another worker * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Add new required argument * Update Examples/Tests/ElectrostaticSphereEB/inputs_rz * Update Examples/Tests/ElectrostaticSphereEB/analysis_rz.py * Update analysis script Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-22ParticleMoments: Deduct Lambda Ret Type (#2705)Gravatar Axel Huebl 1-8/+3
We can auto-deduct the return type of the tuples in the particle moments lambdas by using the `amrex::makeTuple` factory function.
2021-12-21Add runtime option to use DM that is 'similar' to the mother grids in the ↵Gravatar Andrew Myers 3-4/+21
PML. (#2665) * add runtime option to use DM that is 'similar' to the mother grids in the PML. * update amrex * toggle similar dm * add runtime option to use DM that is 'similar' to the mother grids in the PML. * toggle similar dm * bump tolerance * document option * Change default PML behavior for psatd_dive_test Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-12-21pre-commit: Python imports (#2686)Gravatar Axel Huebl 2-2/+6
* pre-commit: Python imports Add two new Python rules to: - remove unused imports - sort imports according to PEP8 * pre-commit: Python imports Add two new Python rules to: - remove unused imports - sort imports according to PEP8 `.editorconfig`: isort options https://github.com/PyCQA/isort/wiki/isort-Settings * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * move import os (mpl) * move import yt (mpl) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleanup around matplotlib.use * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleaning: double np and lib Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-21RZ correction in 2d RZ Poisson slver (#2697)Gravatar Weiqun Zhang 1-0/+2
Call MLNodeLaplacian::setRZCorrect, even when it's redundant when the coordinate system is 2d rz, so that the solver does not depend on the coordinate system set in amrex::Geometry.
2021-12-21Inputs: `geometry.dims` option (#2685)Gravatar Axel Huebl 4-19/+54
* 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-20AMREX_ALWAYS_ASSERT -> AMREX_ASSERT for deposition bounds checks (#2688)Gravatar Andrew Myers 2-4/+4
* AMREX_ALWAYS_ASSERT -> AMREX_ASSERT for deposition bounds checks * fix unused * Apply suggestions from code review * Apply suggestions from code review * Simpler ignore + comment Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-12-16AMREX_SPACEDIM : EB, Filter, Laser, Utils, and Diagnostics (#2677)Gravatar Prabhat Kumar 26-153/+153
* 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-12-16Doxygen: Fix Diags, FieldSolver, Parallelization & Particles (#2662)Gravatar Axel Huebl 29-24/+101
* Doxygen: Fix Diags, FieldSolver, Parallelization & Particles * Apply suggestions: Remi Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Apply suggestions: Roelof Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> * Apply suggestions: Luca Co-authored-by: Luca Fedeli <luca.fedeli@for.unipi.it> * Apply suggestions: Edoardo Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Apply suggestions: Andrew * Apply suggestions: Edoardo Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Apply suggestions: Neil Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> * Apply suggestions: Roelof * Apply suggestions: Weiqun Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com> Co-authored-by: Luca Fedeli <luca.fedeli@for.unipi.it> Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Neïl Zaim <49716072+NeilZaim@users.noreply.github.com> Co-authored-by: Weiqun Zhang <WeiqunZhang@lbl.gov>
2021-12-15ABLASTR: Cleanups & Particle Moments (#2675)Gravatar Axel Huebl 11-70/+241
* ABLASTR: Cleanups - lowercase dir - nested directories - nested namespaces - functions: lowercase and snake_case - templates: prefix with `T_` - profiler: doc strings * Add: Particle Moments Co-authored-by: Remi Lehe <rlehe@lbl.gov> Co-authored-by: Remi Lehe <rlehe@lbl.gov>
2021-12-14Fix: `pre-commit run -a` (#2671)Gravatar Axel Huebl 1-1/+0
Prepare to enable autofix bot from https://pre-commit.ci
2021-12-14ABLASTR: Fix Doxygen in `DepositCharge`Gravatar Axel Huebl 1-1/+1
2021-12-14Refactor DepositCharge so it can be called from ImpactX. (#2652)Gravatar Andrew Myers 9-176/+301
* Refactor DepositCharge so it can be called from ImpactX. * change thread_num * Fix namespace * remove all static WarpX:: members and methods from DepositChargeDoIt. * fix unused * Don't access ref_ratio unless lev != depos_lev * more unused * remove function to its own file / namespace * don't need a CMakeLists.txt for this * lower case namespace, rename file * Refactor: Profiler Wrapper Explicit control for synchronization instead of global state. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-12-13Adding EB multifabs to the Python interface (#2647)Gravatar Lorenzo Giacomel 3-0/+27
* 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-13Add high energy asymptotic fit for Proton-Boron total cross section (#2408)Gravatar Neïl Zaim 1-26/+72
* Add high energy asymptotic fit for Proton Boron total cross section * Write keV and MeV instead of kev and mev * Add @return doxystrings
2021-12-13Fix the scope of profiler for SYCL (#2668)Gravatar Weiqun Zhang 1-5/+5
In main.cpp, the destructor of the profiler was called after amrex::Finalize. This caused an error in SYCL due to a device synchronization call in the dtor, because the SYCL queues in amrex had been deleted. In this commit, we limit the scope of the profiler so that its destructor is called before the queues are deleted. Note that it was never an issue for CUDA/HIP, because the device synchronization calls in those backends do not need any amrex objects.
2021-12-13Add PML Support for multi-J Algorithm (#2603)Gravatar Edoardo Zoni 2-8/+31
* Add PML Support for multi-J Algorithm * Add CI Test
2021-12-13Fixing the initialization of the EB data in ghost cells (#2635)Gravatar Lorenzo Giacomel 4-57/+44
* Using ng_FieldSolver ghost cells in the EB data * Removed an unused variable * Fixed makeEBFabFactory also in in WarpXRgrid.cpp * Fixed end of line whitespace * Undoing #2607
2021-12-11ABLASTR Library (#2263)Gravatar Axel Huebl 2-4/+8
* [Draft] ABLASTR Library - CMake object library - include FFTW wrappers to start with * Add: MPIInitHelpers * Enable ABLASTR-only builds * Add alias WarpX::ablastr * ABLASTR: openPMD forwarding * make_third_party_includes_system: Avoid Collision * WarpX: depend on `ablastr` * Definitions: WarpX -> ablastr * CMake: Reduce build objects for ABLASTR Skip all object files that we do not use in builds. * CMake: app/shared links all object targets Our `PRIVATE` source/objects are not PUBLICly propagated themselves.
2021-12-11C++17: if constexpr for templates in ShapeFactors (#2659)Gravatar Luca Fedeli 1-150/+84
* use if constexpr to replace template specialization * Rmove Interface Annotations * Replace static_assert with amrex::Abort * Add includes & authors Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-12-10`use_default_v_<galilean,comoving>` Only w/ Boosted Frame (#2654)Gravatar Edoardo Zoni 1-3/+18
2021-12-10fix for setting the boundary condition potentials in 1D ES simulations (#2649)Gravatar Roelof Groenewald 1-5/+5
2021-12-10use if constexpr to replace template specialization (#2660)Gravatar Luca Fedeli 1-106/+67
2021-12-09GNUmake `installwarpx`: `mv` -> `cp`Gravatar Axel Huebl 1-1/+1
No reason to rebuild. Make will detect dependency when needed.
2021-12-09GNUmake & `WarpX-test.ini`: `python` -> `python3`Gravatar Axel Huebl 1-1/+1
Consistent with all other calls to Python in tests.
2021-12-09GNUmake: Fix Python Install (force) (#2655)Gravatar Axel Huebl 1-1/+1
Local developers and cached CI installs ddi never install `pywarpx` if and old version existed. The `--force` must be with us.
2021-12-09C++17: structured bindings to replace "std::tie(x,y,z) = f()" (#2644)Gravatar Luca Fedeli 3-22/+10
* use structured bindings * std::ignore equivalent in structured bindings Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-12-08Replace AMREX_SPACEDIM: Evolve & FieldSolver (#2642)Gravatar Prabhat Kumar 14-91/+91
* AMREX_SPACEDIM : Boundary Conditions * AMREX_SPACEDIM : Parallelization * Fix compilation * AMREX_SPACEDIM : Initialization * Fix Typo * space * AMREX_SPACEDIM : Particles * AMREX_SPACEDIM : Evolve and FieldSolver
2021-12-08C++17, CMake 3.17+ (#2300)Gravatar Axel Huebl 1-5/+1
* C++17, CMake 3.17+ Update C++ requirements to compile with C++17 or newer. * Superbuild: C++17 in AMReX/PICSAR/openPMD-api * Summit: `cuda/11.0.3` -> `cuda/11.3.1` When compiling AMReX in C++17 on Summit, the `cuda/11.0.3` module (`nvcc 11.0.2211`) dies with: ``` ... Base/AMReX_TinyProfiler.cpp nvcc error : 'cicc' died due to signal 11 (Invalid memory reference) nvcc error : 'cicc' core dumped ``` Although this usually is a memory issue, it also appears in `-j1` compiles.
2021-12-07PSATD: Implement Scalar Damping for F,G (#2432)Gravatar Edoardo Zoni 2-1/+67
* PSATD: Implement F,G Damping * Reset Benchmark * Fix Call to DampFieldsInGuards
2021-12-07Transform the external fields into the boosted frame (#2610)Gravatar David Grote 15-217/+191
They should be specified in the lab frame
2021-12-06AMREX_SPACEDIM : Initialization and Particles (#2628)Gravatar Prabhat Kumar 14-188/+188
* AMREX_SPACEDIM : Boundary Conditions * AMREX_SPACEDIM : Parallelization * Fix compilation * AMREX_SPACEDIM : Initialization * Fix Typo * space * AMREX_SPACEDIM : Particles
2021-12-06Redistribute particles in ContinuousFluxInjection (#2611)Gravatar Remi Lehe 2-18/+42
* Redistribute particles in ContinuousFluxInjection * Fix runtime issues * Avoid overwriting previous particles * Extract tiles by reference * Add loop over levels * Correct number of levels * Replace serialize_ics * Fix compilation for GPU Fix compilation bug Fix GPU compilation bug * make sure we define all tiles in the tmp_pc before touching them in a threaded region. Co-authored-by: Andrew Myers <atmyers2@gmail.com>
2021-12-06Define WARPX_ZINDEX to denote the index for the Z dimension regardless of ↵Gravatar Phil Miller 13-38/+36
the build's dimensionality (#2622) * Define WARPX_ZINDEX to denote the index for the Z dimension regardless of the build's dimensionality * Add WARPX_ZINDEX macro definition to Makefile as well
2021-12-06Correct collision algorithm in RZ. (#2510)Gravatar Yinjian Zhao 3-4/+38
* Add rotation. * Fix a small bug * Add automated test. * rename inputs_rz * Add json * minor * add comment. * Apply suggestions from code review Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> * Update analysis_collision_rz.py * Fix missing import * Change tolerance. * Add warnings * Apply suggestions from code review * Move assert. * fix end-of-Line whitespaces. Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
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-12-02Fix out-of-bound in the initialization of EB (#2607)Gravatar Remi Lehe 1-4/+4
* Call FillBoundary when initializing EB * Avoid out-of-bound * Bug fix * Apply suggestions from code review
2021-12-03Replace AMREX_SPACEDIM: Boundary & Parallelization (#2620)Gravatar Prabhat Kumar 7-82/+82
* AMREX_SPACEDIM : Boundary Conditions * AMREX_SPACEDIM : Parallelization * Fix compilation * Update Source/Parallelization/WarpXComm_K.H