5252#include < cmath>
5353#include < memory>
5454
55- using namespace amrex ;
55+ using namespace amrex ::literals ;
5656using warpx::fields::FieldType;
5757
5858#ifdef WARPX_USE_FFT
@@ -143,7 +143,7 @@ namespace {
143143 * from the current J (computed from D according to the Vay deposition scheme)
144144 */
145145 void PSATDSubtractCurrentPartialSumsAvg (
146- [[maybe_unused]] const amrex::Vector<std::array<Real,3 >>& cell_size_at_all_levels,
146+ [[maybe_unused]] const amrex::Vector<std::array<amrex:: Real,3 >>& cell_size_at_all_levels,
147147 [[maybe_unused]] ablastr::fields::MultiFabRegister& fields)
148148 {
149149 using ablastr::fields::Direction;
@@ -449,7 +449,7 @@ WarpX::PSATDBackwardTransformG ()
449449 for (int lev = 0 ; lev <= finest_level; ++lev)
450450 {
451451 if (m_fields.has (FieldType::G_fp, lev)) {
452- MultiFab* G_fp = m_fields.get (FieldType::G_fp, lev);
452+ amrex:: MultiFab* G_fp = m_fields.get (FieldType::G_fp, lev);
453453#ifdef WARPX_DIM_RZ
454454 spectral_solver_fp[lev]->BackwardTransform (lev, *G_fp, Idx.G );
455455#else
@@ -462,7 +462,7 @@ WarpX::PSATDBackwardTransformG ()
462462 if (spectral_solver_cp[lev])
463463 {
464464 if (m_fields.has (FieldType::G_cp, lev)) {
465- MultiFab* G_cp = m_fields.get (FieldType::G_cp, lev);
465+ amrex:: MultiFab* G_cp = m_fields.get (FieldType::G_cp, lev);
466466#ifdef WARPX_DIM_RZ
467467 spectral_solver_fp[lev]->BackwardTransform (lev, *G_cp, Idx.G );
468468#else
@@ -819,7 +819,7 @@ WarpX::PushPSATD (amrex::Real start_time)
819819 current_fp_string = " current_fp" ;
820820 PSATDBackwardTransformJ (current_fp_string, current_cp_string);
821821 // TODO Cumulative sums need to be fixed with periodic single box
822- auto cell_size_at_all_levels = amrex::Vector<std::array<Real,3 >>{};
822+ auto cell_size_at_all_levels = amrex::Vector<std::array<amrex:: Real,3 >>{};
823823 for (int lev = 0 ; lev <= finest_level; ++lev){
824824 cell_size_at_all_levels.push_back (CellSize (lev));
825825 }
@@ -876,7 +876,7 @@ WarpX::PushPSATD (amrex::Real start_time)
876876 // Inverse FFT of J, subtract cumulative sums of D
877877 current_fp_string = " current_fp" ;
878878 PSATDBackwardTransformJ (current_fp_string, current_cp_string);
879- auto cell_size_at_all_levels = amrex::Vector<std::array<Real,3 >>{};
879+ auto cell_size_at_all_levels = amrex::Vector<std::array<amrex:: Real,3 >>{};
880880 for (int lev = 0 ; lev <= finest_level; ++lev){
881881 cell_size_at_all_levels.push_back (CellSize (lev));
882882 }
@@ -1265,7 +1265,7 @@ WarpX::DampFieldsInGuards(const int lev,
12651265 if (iside == 0 && WarpX::field_boundary_lo[dampdir] != FieldBoundaryType::Damped) { continue ; }
12661266 if (iside == 1 && WarpX::field_boundary_hi[dampdir] != FieldBoundaryType::Damped) { continue ; }
12671267
1268- for ( amrex::MFIter mfi (*Efield[0 ], amrex::TilingIfNotGPU ()); mfi.isValid (); ++mfi )
1268+ for (amrex::MFIter mfi (*Efield[0 ], amrex::TilingIfNotGPU ()); mfi.isValid (); ++mfi)
12691269 {
12701270 amrex::Array4<amrex::Real> const & Ex_arr = Efield[0 ]->array (mfi);
12711271 amrex::Array4<amrex::Real> const & Ey_arr = Efield[1 ]->array (mfi);
@@ -1397,11 +1397,11 @@ void WarpX::DampFieldsInGuards(const int lev, amrex::MultiFab* mf)
13971397// It is faster to apply this on the grid than to do it particle by particle.
13981398// It is put here since there isn't another nice place for it.
13991399void
1400- WarpX::ApplyInverseVolumeScalingToCurrentDensity (MultiFab* Jx, MultiFab* Jy, MultiFab* Jz, int lev) const
1400+ WarpX::ApplyInverseVolumeScalingToCurrentDensity (amrex:: MultiFab* Jx, amrex:: MultiFab* Jy, amrex:: MultiFab* Jz, int lev) const
14011401{
14021402 const amrex::IntVect ngJ = Jx->nGrowVect ();
1403- const std::array<Real,3 >& dx = CellSize (lev);
1404- const Real dr = dx[0 ];
1403+ const std::array<amrex:: Real,3 >& dx = CellSize (lev);
1404+ const amrex:: Real dr = dx[0 ];
14051405
14061406 constexpr int NODE = amrex::IndexType::NODE;
14071407
@@ -1410,27 +1410,27 @@ WarpX::ApplyInverseVolumeScalingToCurrentDensity (MultiFab* Jx, MultiFab* Jy, Mu
14101410 const amrex::Real axis_volume_factor = (m_verboncoeur_axis_correction ? 1 ._rt /3 ._rt : 1 ._rt /4 ._rt );
14111411#endif
14121412
1413- for ( MFIter mfi (*Jx, TilingIfNotGPU ()); mfi.isValid (); ++mfi )
1413+ for (amrex:: MFIter mfi (*Jx, amrex:: TilingIfNotGPU ()); mfi.isValid (); ++mfi)
14141414 {
14151415
1416- Array4<Real> const & Jr_arr = Jx->array (mfi);
1417- Array4<Real> const & Jt_arr = Jy->array (mfi);
1418- Array4<Real> const & Jz_arr = Jz->array (mfi);
1416+ amrex:: Array4<amrex:: Real> const & Jr_arr = Jx->array (mfi);
1417+ amrex:: Array4<amrex:: Real> const & Jt_arr = Jy->array (mfi);
1418+ amrex:: Array4<amrex:: Real> const & Jz_arr = Jz->array (mfi);
14191419
1420- Box const & tilebox = mfi.tilebox ();
1421- Box tbr = convert ( tilebox, Jx->ixType ().toIntVect () );
1422- Box tbt = convert ( tilebox, Jy->ixType ().toIntVect () );
1423- Box tbz = convert ( tilebox, Jz->ixType ().toIntVect () );
1420+ amrex:: Box const & tilebox = mfi.tilebox ();
1421+ amrex:: Box tbr = convert ( tilebox, Jx->ixType ().toIntVect () );
1422+ amrex:: Box tbt = convert ( tilebox, Jy->ixType ().toIntVect () );
1423+ amrex:: Box tbz = convert ( tilebox, Jz->ixType ().toIntVect () );
14241424
14251425 // Lower corner of tile box physical domain
14261426 // Note that this is done before the tilebox.grow so that
14271427 // these do not include the guard cells.
14281428 const amrex::XDim3 xyzmin = WarpX::LowerCorner (tilebox, lev, 0 ._rt );
1429- const Real rmin = xyzmin.x ;
1430- const Real rminr = xyzmin.x + (tbr.type (0 ) == NODE ? 0 ._rt : 0 .5_rt*dx[0 ]);
1431- const Real rmint = xyzmin.x + (tbt.type (0 ) == NODE ? 0 ._rt : 0 .5_rt*dx[0 ]);
1432- const Real rminz = xyzmin.x + (tbz.type (0 ) == NODE ? 0 ._rt : 0 .5_rt*dx[0 ]);
1433- const Dim3 lo = lbound (tilebox);
1429+ const amrex:: Real rmin = xyzmin.x ;
1430+ const amrex:: Real rminr = xyzmin.x + (tbr.type (0 ) == NODE ? 0 ._rt : 0 .5_rt*dx[0 ]);
1431+ const amrex:: Real rmint = xyzmin.x + (tbt.type (0 ) == NODE ? 0 ._rt : 0 .5_rt*dx[0 ]);
1432+ const amrex:: Real rminz = xyzmin.x + (tbz.type (0 ) == NODE ? 0 ._rt : 0 .5_rt*dx[0 ]);
1433+ const amrex:: Dim3 lo = lbound (tilebox);
14341434 const int irmin = lo.x ;
14351435
14361436 // For ishift, 1 means cell centered, 0 means node centered
@@ -1605,11 +1605,11 @@ WarpX::ApplyInverseVolumeScalingToCurrentDensity (MultiFab* Jx, MultiFab* Jy, Mu
16051605}
16061606
16071607void
1608- WarpX::ApplyInverseVolumeScalingToChargeDensity (MultiFab* Rho, int lev) const
1608+ WarpX::ApplyInverseVolumeScalingToChargeDensity (amrex:: MultiFab* Rho, int lev) const
16091609{
16101610 const amrex::IntVect ngRho = Rho->nGrowVect ();
1611- const std::array<Real,3 >& dx = WarpX::CellSize (lev);
1612- const Real dr = dx[0 ];
1611+ const std::array<amrex:: Real,3 >& dx = WarpX::CellSize (lev);
1612+ const amrex:: Real dr = dx[0 ];
16131613
16141614 constexpr int NODE = amrex::IndexType::NODE;
16151615
@@ -1620,23 +1620,23 @@ WarpX::ApplyInverseVolumeScalingToChargeDensity (MultiFab* Rho, int lev) const
16201620 const amrex::Real axis_volume_factor = (m_verboncoeur_axis_correction ? 1 .0_rt/4 .0_rt : 1 .0_rt/8 .0_rt);
16211621#endif
16221622
1623- Box tilebox;
1623+ amrex:: Box tilebox;
16241624
1625- for ( MFIter mfi (*Rho, TilingIfNotGPU ()); mfi.isValid (); ++mfi )
1625+ for (amrex:: MFIter mfi (*Rho, amrex:: TilingIfNotGPU ()); mfi.isValid (); ++mfi)
16261626 {
16271627
1628- Array4<Real> const & Rho_arr = Rho->array (mfi);
1628+ amrex:: Array4<amrex:: Real> const & Rho_arr = Rho->array (mfi);
16291629
16301630 tilebox = mfi.tilebox ();
1631- Box tb = convert ( tilebox, Rho->ixType ().toIntVect () );
1631+ amrex:: Box tb = convert ( tilebox, Rho->ixType ().toIntVect () );
16321632
16331633 // Lower corner of tile box physical domain
16341634 // Note that this is done before the tilebox.grow so that
16351635 // these do not include the guard cells.
16361636 const amrex::XDim3 xyzmin = WarpX::LowerCorner (tilebox, lev, 0 ._rt );
1637- const Dim3 lo = lbound (tilebox);
1638- const Real rmin = xyzmin.x ;
1639- const Real rminr = xyzmin.x + (tb.type (0 ) == NODE ? 0 ._rt : 0 .5_rt*dx[0 ]);
1637+ const amrex:: Dim3 lo = lbound (tilebox);
1638+ const amrex:: Real rmin = xyzmin.x ;
1639+ const amrex:: Real rminr = xyzmin.x + (tb.type (0 ) == NODE ? 0 ._rt : 0 .5_rt*dx[0 ]);
16401640 const int irmin = lo.x ;
16411641 const int ishift = (rminr > rmin ? 1 : 0 );
16421642
0 commit comments