diff options
author | 2021-11-22 18:04:18 -0800 | |
---|---|---|
committer | 2021-11-22 18:04:18 -0800 | |
commit | 9e02b95c1f7310550d0ba3d89639b44b72a17de9 (patch) | |
tree | 25c7bd7b477e9a502adf640fd6abaa1df70bb538 /Source/WarpX.cpp | |
parent | e55fef18dea27108247024fffba4fccd84206ac2 (diff) | |
download | WarpX-9e02b95c1f7310550d0ba3d89639b44b72a17de9.tar.gz WarpX-9e02b95c1f7310550d0ba3d89639b44b72a17de9.tar.zst WarpX-9e02b95c1f7310550d0ba3d89639b44b72a17de9.zip |
Python: Start 1D Support (#2582)
* Python: Start 1D Support
Start supporting 1D builds in Python.
* Fix 1D: PML FillZero unused
... since PMLs are not yet supported in 1D.
* BeamRelevant: Fix unused p_pos0
* FromTXYEFileLaserProfile: Not Impl in 1D
* QED Schwinger: 1D not Implemented
Fix unused warnings, add aborts.
* 1D RealVect/IntVect: Initialization
Use explicit scalar constructors, no braces.
Fix warning in clang 10.
* 1D NCI Filter: Fix unused members & Init
Unimplemented, but throws warnings.
* PSATD: 1D not Implemented
- remove compile warnings
- start porting some parts
* NCIGodfreyFilter: Clean up 2D & Else
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index f923c9121..e0613b3f1 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -1435,7 +1435,7 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d bool aux_is_nodal = (field_gathering_algo == GatheringAlgo::MomentumConserving); #if (AMREX_SPACEDIM == 1) - amrex::RealVect dx({WarpX::CellSize(lev)[2]}); + amrex::RealVect dx(WarpX::CellSize(lev)[2]); #elif (AMREX_SPACEDIM == 2) amrex::RealVect dx = {WarpX::CellSize(lev)[0], WarpX::CellSize(lev)[2]}; #elif (AMREX_SPACEDIM == 3) @@ -1964,11 +1964,7 @@ void WarpX::AllocLevelSpectralSolverRZ (amrex::Vector<std::unique_ptr<SpectralSo const amrex::DistributionMapping& dm, const std::array<Real,3>& dx) { -#if (AMREX_SPACEDIM == 3) - RealVect dx_vect(dx[0], dx[1], dx[2]); -#elif (AMREX_SPACEDIM == 2) RealVect dx_vect(dx[0], dx[2]); -#endif amrex::Real solver_dt = dt[lev]; if (WarpX::do_multi_J) solver_dt /= static_cast<amrex::Real>(WarpX::do_multi_J_n_depositions); @@ -2017,6 +2013,8 @@ void WarpX::AllocLevelSpectralSolver (amrex::Vector<std::unique_ptr<SpectralSolv RealVect dx_vect(dx[0], dx[1], dx[2]); #elif (AMREX_SPACEDIM == 2) RealVect dx_vect(dx[0], dx[2]); +#elif (AMREX_SPACEDIM == 1) + RealVect dx_vect(dx[2]); #endif amrex::Real solver_dt = dt[lev]; |