diff --git a/Source/BoundaryConditions/PML.cpp b/Source/BoundaryConditions/PML.cpp index 91d821d6646..f45ca222e69 100644 --- a/Source/BoundaryConditions/PML.cpp +++ b/Source/BoundaryConditions/PML.cpp @@ -1234,7 +1234,7 @@ PML::CheckPoint ( { using ablastr::fields::Direction; - if (fields.has(FieldType::pml_E_fp, Direction{0}, 0)) + if (fields.has_vector(FieldType::pml_E_fp, 0)) { ablastr::fields::VectorField pml_E_fp = fields.get_alldirs(FieldType::pml_E_fp, 0); ablastr::fields::VectorField pml_B_fp = fields.get_alldirs(FieldType::pml_B_fp, 0); @@ -1246,7 +1246,7 @@ PML::CheckPoint ( VisMF::AsyncWrite(*pml_B_fp[2], dir+"_Bz_fp"); } - if (fields.has(FieldType::pml_E_cp, Direction{0}, 0)) + if (fields.has_vector(FieldType::pml_E_cp, 0)) { ablastr::fields::VectorField pml_E_cp = fields.get_alldirs(FieldType::pml_E_cp, 0); ablastr::fields::VectorField pml_B_cp = fields.get_alldirs(FieldType::pml_B_cp, 0); @@ -1267,7 +1267,7 @@ PML::Restart ( { using ablastr::fields::Direction; - if (fields.has(FieldType::pml_E_fp, Direction{0}, 0)) + if (fields.has_vector(FieldType::pml_E_fp, 0)) { ablastr::fields::VectorField pml_E_fp = fields.get_alldirs(FieldType::pml_E_fp, 0); ablastr::fields::VectorField pml_B_fp = fields.get_alldirs(FieldType::pml_B_fp, 0); @@ -1279,7 +1279,7 @@ PML::Restart ( VisMF::Read(*pml_B_fp[2], dir+"_Bz_fp"); } - if (fields.has(FieldType::pml_E_cp, Direction{0}, 0)) + if (fields.has_vector(FieldType::pml_E_cp, 0)) { ablastr::fields::VectorField pml_E_cp = fields.get_alldirs(FieldType::pml_E_cp, 0); ablastr::fields::VectorField pml_B_cp = fields.get_alldirs(FieldType::pml_B_cp, 0); diff --git a/Source/Evolve/WarpXEvolve.cpp b/Source/Evolve/WarpXEvolve.cpp index 93d265d598f..a685afd28e7 100644 --- a/Source/Evolve/WarpXEvolve.cpp +++ b/Source/Evolve/WarpXEvolve.cpp @@ -1147,7 +1147,7 @@ WarpX::PushParticlesandDeposit (int lev, amrex::Real cur_time, DtType a_dt_type, m_fields.get(FieldType::current_fp, Direction{1}, lev), m_fields.get(FieldType::current_fp, Direction{2}, lev), lev); - if (m_fields.has(FieldType::current_buf, Direction{0}, lev)) { + if (m_fields.has_vector(FieldType::current_buf, lev)) { ApplyInverseVolumeScalingToCurrentDensity( m_fields.get(FieldType::current_buf, Direction{0}, lev), m_fields.get(FieldType::current_buf, Direction{1}, lev), diff --git a/Source/FieldSolver/FiniteDifferenceSolver/EvolveB.cpp b/Source/FieldSolver/FiniteDifferenceSolver/EvolveB.cpp index 63b51cb8416..c6a1e206200 100644 --- a/Source/FieldSolver/FiniteDifferenceSolver/EvolveB.cpp +++ b/Source/FieldSolver/FiniteDifferenceSolver/EvolveB.cpp @@ -79,19 +79,19 @@ void FiniteDifferenceSolver::EvolveB ( fields.get(FieldType::G_fp, lev) : fields.get(FieldType::G_cp, lev); } ablastr::fields::VectorField face_areas; - if (fields.has(FieldType::face_areas, Direction{0}, lev)) { + if (fields.has_vector(FieldType::face_areas, lev)) { face_areas = fields.get_alldirs(FieldType::face_areas, lev); } ablastr::fields::VectorField area_mod; - if (fields.has(FieldType::area_mod, Direction{0}, lev)) { + if (fields.has_vector(FieldType::area_mod, lev)) { area_mod = fields.get_alldirs(FieldType::area_mod, lev); } ablastr::fields::VectorField ECTRhofield; - if (fields.has(FieldType::ECTRhofield, Direction{0}, lev)) { + if (fields.has_vector(FieldType::ECTRhofield, lev)) { ECTRhofield = fields.get_alldirs(FieldType::ECTRhofield, lev); } ablastr::fields::VectorField Venl; - if (fields.has(FieldType::Venl, Direction{0}, lev)) { + if (fields.has_vector(FieldType::Venl, lev)) { Venl = fields.get_alldirs(FieldType::Venl, lev); } diff --git a/Source/Particles/LaserParticleContainer.cpp b/Source/Particles/LaserParticleContainer.cpp index 10849a0c0d5..c804bb12797 100644 --- a/Source/Particles/LaserParticleContainer.cpp +++ b/Source/Particles/LaserParticleContainer.cpp @@ -586,7 +586,7 @@ LaserParticleContainer::Evolve (ablastr::fields::MultiFabRegister& fields, amrex::LayoutData* cost = WarpX::getCosts(lev); const bool has_rho = fields.has(FieldType::rho_fp, lev); - const bool has_buffer = fields.has(FieldType::current_buf, lev); + const bool has_buffer = fields.has_vector(FieldType::current_buf, lev); #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 07997a61f0c..26f9fee38d3 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1753,9 +1753,9 @@ PhysicalParticleContainer::Evolve (ablastr::fields::MultiFabRegister& fields, const iMultiFab* gather_masks = WarpX::GatherBufferMasks(lev); const bool has_rho = fields.has(FieldType::rho_fp, lev); - const bool has_cjx = fields.has(FieldType::current_buf, Direction{0}, lev); - const bool has_cEx = fields.has(FieldType::Efield_cax, Direction{0}, lev); - const bool has_buffer = has_cEx || has_cjx; + const bool has_J_buf = fields.has_vector(FieldType::current_buf, lev); + const bool has_E_cax = fields.has_vector(FieldType::Efield_cax, lev); + const bool has_buffer = has_E_cax || has_J_buf; amrex::MultiFab & Ex = *fields.get(FieldType::Efield_aux, Direction{0}, lev); amrex::MultiFab & Ey = *fields.get(FieldType::Efield_aux, Direction{1}, lev); @@ -1850,7 +1850,7 @@ PhysicalParticleContainer::Evolve (ablastr::fields::MultiFabRegister& fields, pti, lev, current_masks, gather_masks ); } - const long np_current = has_cjx ? nfine_current : np; + const long np_current = has_J_buf ? nfine_current : np; if (has_rho && ! skip_deposition && ! do_not_deposit) { // Deposit charge before particle push, in component 0 of MultiFab rho. @@ -1870,7 +1870,7 @@ PhysicalParticleContainer::Evolve (ablastr::fields::MultiFabRegister& fields, if (! do_not_push) { - const long np_gather = has_cEx ? nfine_gather : np; + const long np_gather = has_E_cax ? nfine_gather : np; int e_is_nodal = Ex.is_nodal() and Ey.is_nodal() and Ez.is_nodal();