From ac6add8c8598615885b1faecbafcf5b203886356 Mon Sep 17 00:00:00 2001 From: Marc Henry de Frahan Date: Mon, 20 May 2024 15:16:43 -0600 Subject: [PATCH] Identify locations --- amr-wind/diffusion/incflo_diffusion.cpp | 3 +++ amr-wind/equation_systems/CompRHSOps.H | 2 ++ amr-wind/equation_systems/DiffusionOps.cpp | 1 + amr-wind/equation_systems/PDEOps.H | 1 + amr-wind/equation_systems/density/density_ops.H | 2 ++ amr-wind/equation_systems/icns/icns_advection.cpp | 6 ++++++ amr-wind/equation_systems/icns/icns_diffusion.H | 4 ++++ amr-wind/equation_systems/icns/icns_ops.H | 1 + amr-wind/equation_systems/levelset/levelset_ops.H | 2 ++ amr-wind/equation_systems/tke/tke_ops.H | 1 + amr-wind/equation_systems/vof/vof_hybridsolver_ops.H | 1 + amr-wind/immersed_boundary/bluff_body/bluff_body_ops.cpp | 2 ++ amr-wind/immersed_boundary/bluff_body/box_ops.H | 1 + amr-wind/immersed_boundary/bluff_body/cylinder_ops.H | 1 + amr-wind/immersed_boundary/bluff_body/sphere_ops.H | 1 + amr-wind/mesh_mapping_models/ChannelFlowMap.cpp | 5 +++++ amr-wind/mesh_mapping_models/ConstantMap.cpp | 5 +++++ amr-wind/ocean_waves/boundary_ops/OceanWavesBoundary.cpp | 4 ++++ amr-wind/overset/OversetOps.cpp | 1 + amr-wind/physics/BoussinesqBubble.cpp | 1 + amr-wind/physics/BurggrafFlow.cpp | 3 ++- amr-wind/physics/ChannelFlow.cpp | 2 ++ amr-wind/physics/ConvectingTaylorVortex.cpp | 2 ++ amr-wind/physics/EkmanSpiral.cpp | 1 + amr-wind/physics/HybridRANSLESABL.cpp | 2 ++ amr-wind/physics/RayleighTaylor.cpp | 1 + amr-wind/physics/ScalarAdvection.cpp | 2 ++ amr-wind/physics/SyntheticTurbulence.cpp | 1 + amr-wind/physics/TaylorGreenVortex.cpp | 1 + amr-wind/physics/VortexDipole.cpp | 3 ++- amr-wind/physics/VortexRing.cpp | 2 ++ amr-wind/physics/mms/MMS.cpp | 1 + amr-wind/physics/multiphase/BreakingWaves.cpp | 1 + amr-wind/physics/multiphase/DamBreak.cpp | 1 + amr-wind/physics/multiphase/MultiPhase.cpp | 7 +++++++ amr-wind/physics/multiphase/RainDrop.cpp | 2 ++ amr-wind/physics/multiphase/SloshingTank.cpp | 1 + amr-wind/physics/multiphase/VortexPatch.cpp | 3 +++ amr-wind/physics/multiphase/VortexPatchScalarVel.cpp | 2 ++ amr-wind/physics/multiphase/ZalesakDisk.cpp | 3 +++ amr-wind/physics/multiphase/ZalesakDiskScalarVel.cpp | 3 +++ amr-wind/physics/multiphase/hydrostatic_ops.H | 4 +++- amr-wind/physics/udfs/UDF.cpp | 1 + amr-wind/projection/incflo_apply_nodal_projection.cpp | 3 +++ amr-wind/transport_models/TwoPhaseTransport.H | 4 ++++ amr-wind/turbulence/LES/AMD.cpp | 1 + amr-wind/turbulence/LES/AMDNoTherm.cpp | 1 + amr-wind/turbulence/LES/Kosovic.cpp | 2 ++ amr-wind/turbulence/LES/OneEqKsgs.cpp | 3 +++ amr-wind/turbulence/LES/Smagorinsky.cpp | 1 + amr-wind/turbulence/RANS/KLAxell.cpp | 1 + amr-wind/turbulence/RANS/KOmegaSST.cpp | 3 +++ amr-wind/turbulence/RANS/KOmegaSSTIDDES.cpp | 1 + amr-wind/utilities/averaging/ReAveraging.cpp | 1 + amr-wind/utilities/averaging/ReynoldsStress.cpp | 1 + amr-wind/utilities/sampling/FreeSurfaceSampler.cpp | 3 +++ amr-wind/utilities/sampling/SamplingContainer.cpp | 1 + amr-wind/utilities/tagging/CurvatureRefinement.cpp | 1 + amr-wind/utilities/tagging/FieldRefinement.H | 1 + amr-wind/utilities/tagging/GradientMagRefinement.cpp | 1 + amr-wind/utilities/tagging/OversetRefinement.cpp | 1 + amr-wind/utilities/tagging/QCriterionRefinement.cpp | 1 + amr-wind/utilities/tagging/VorticityMagRefinement.cpp | 1 + amr-wind/wind_energy/ABL.cpp | 1 + amr-wind/wind_energy/ABLBoundaryPlane.cpp | 2 ++ amr-wind/wind_energy/ABLFieldInit.cpp | 2 ++ amr-wind/wind_energy/ABLModulatedPowerLaw.cpp | 2 ++ amr-wind/wind_energy/ABLStats.cpp | 2 ++ amr-wind/wind_energy/actuator/ActuatorContainer.cpp | 1 + 69 files changed, 133 insertions(+), 3 deletions(-) diff --git a/amr-wind/diffusion/incflo_diffusion.cpp b/amr-wind/diffusion/incflo_diffusion.cpp index 5b02ceda7a..2949b11831 100644 --- a/amr-wind/diffusion/incflo_diffusion.cpp +++ b/amr-wind/diffusion/incflo_diffusion.cpp @@ -221,6 +221,7 @@ void viscosity_to_uniform_space( repo.get_mesh_mapping_det_j(amr_wind::FieldLoc::ZFACE); // beta accounted for mesh mapping (x-face) = J/fac^2 * mu + // needs openmp pragma? for (amrex::MFIter mfi(b[0]); mfi.isValid(); ++mfi) { amrex::Array4 const& mu = b[0].array(mfi); amrex::Array4 const& fac = @@ -235,6 +236,7 @@ void viscosity_to_uniform_space( }); } // beta accounted for mesh mapping (y-face) = J/fac^2 * mu + // needs openmp pragma? for (amrex::MFIter mfi(b[1]); mfi.isValid(); ++mfi) { amrex::Array4 const& mu = b[1].array(mfi); amrex::Array4 const& fac = @@ -249,6 +251,7 @@ void viscosity_to_uniform_space( }); } // beta accounted for mesh mapping (z-face) = J/fac^2 * mu + // needs openmp pragma? for (amrex::MFIter mfi(b[2]); mfi.isValid(); ++mfi) { amrex::Array4 const& mu = b[2].array(mfi); amrex::Array4 const& fac = diff --git a/amr-wind/equation_systems/CompRHSOps.H b/amr-wind/equation_systems/CompRHSOps.H index b0a83415c6..80fd1face0 100644 --- a/amr-wind/equation_systems/CompRHSOps.H +++ b/amr-wind/equation_systems/CompRHSOps.H @@ -79,6 +79,7 @@ struct ComputeRHSOp #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(field(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); auto fld = field(lev).array(mfi); @@ -199,6 +200,7 @@ struct ComputeRHSOp #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(field(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); auto fld = field(lev).array(mfi); diff --git a/amr-wind/equation_systems/DiffusionOps.cpp b/amr-wind/equation_systems/DiffusionOps.cpp index 73a9cb5c1e..e8091fb0c3 100644 --- a/amr-wind/equation_systems/DiffusionOps.cpp +++ b/amr-wind/equation_systems/DiffusionOps.cpp @@ -128,6 +128,7 @@ void DiffSolverIface::linsys_solve_impl() #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(rhs, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); diff --git a/amr-wind/equation_systems/PDEOps.H b/amr-wind/equation_systems/PDEOps.H index 6dcdd7e955..2e64d0f34d 100644 --- a/amr-wind/equation_systems/PDEOps.H +++ b/amr-wind/equation_systems/PDEOps.H @@ -100,6 +100,7 @@ struct SrcTermOpBase #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(src_term, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); diff --git a/amr-wind/equation_systems/density/density_ops.H b/amr-wind/equation_systems/density/density_ops.H index d1e15eb7fd..fdd1b62bf9 100644 --- a/amr-wind/equation_systems/density/density_ops.H +++ b/amr-wind/equation_systems/density/density_ops.H @@ -30,6 +30,7 @@ struct ComputeRHSOp #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(field(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); auto rho = field(lev).array(mfi); @@ -62,6 +63,7 @@ struct ComputeRHSOp #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(field(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); auto rho = field(lev).array(mfi); diff --git a/amr-wind/equation_systems/icns/icns_advection.cpp b/amr-wind/equation_systems/icns/icns_advection.cpp index 67d06d7c69..dc228fce6a 100644 --- a/amr-wind/equation_systems/icns/icns_advection.cpp +++ b/amr-wind/equation_systems/icns/icns_advection.cpp @@ -399,6 +399,8 @@ void MacProjOp::mac_proj_to_uniform_space( // scale U^mac to accommodate for mesh mapping -> U^bar = J/fac * // U^mac beta accounted for mesh mapping = J/fac^2 * 1/rho construct // rho and mesh map u_mac on x-face + // this one + // needs openmp pragma? for (amrex::MFIter mfi(*(rho_face[0])); mfi.isValid(); ++mfi) { amrex::Array4 const& u = u_mac(lev).array(mfi); amrex::Array4 const& rho = rho_face[0]->array(mfi); @@ -415,6 +417,8 @@ void MacProjOp::mac_proj_to_uniform_space( }); } // construct rho on y-face + // this one + // needs openmp pragma? for (amrex::MFIter mfi(*(rho_face[1])); mfi.isValid(); ++mfi) { amrex::Array4 const& v = v_mac(lev).array(mfi); amrex::Array4 const& rho = rho_face[1]->array(mfi); @@ -431,6 +435,8 @@ void MacProjOp::mac_proj_to_uniform_space( }); } // construct rho on z-face + // this one + // needs openmp pragma? for (amrex::MFIter mfi(*(rho_face[2])); mfi.isValid(); ++mfi) { amrex::Array4 const& w = w_mac(lev).array(mfi); amrex::Array4 const& rho = rho_face[2]->array(mfi); diff --git a/amr-wind/equation_systems/icns/icns_diffusion.H b/amr-wind/equation_systems/icns/icns_diffusion.H index 2792e27c1b..0234df82df 100644 --- a/amr-wind/equation_systems/icns/icns_diffusion.H +++ b/amr-wind/equation_systems/icns/icns_diffusion.H @@ -169,6 +169,7 @@ public: #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(divtau(lev), amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); @@ -240,6 +241,7 @@ public: #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(rhs, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); @@ -401,6 +403,7 @@ public: #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(divtau(lev), amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); @@ -483,6 +486,7 @@ public: #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(rhs, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); diff --git a/amr-wind/equation_systems/icns/icns_ops.H b/amr-wind/equation_systems/icns/icns_ops.H index 7acb631144..44ff96e630 100644 --- a/amr-wind/equation_systems/icns/icns_ops.H +++ b/amr-wind/equation_systems/icns/icns_ops.H @@ -93,6 +93,7 @@ struct SrcTermOp : SrcTermOpBase #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(src_term, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); diff --git a/amr-wind/equation_systems/levelset/levelset_ops.H b/amr-wind/equation_systems/levelset/levelset_ops.H index 3b29b9299e..3742157acf 100644 --- a/amr-wind/equation_systems/levelset/levelset_ops.H +++ b/amr-wind/equation_systems/levelset/levelset_ops.H @@ -69,6 +69,7 @@ struct ComputeRHSOp #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(field(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); auto phi = field(lev).array(mfi); @@ -101,6 +102,7 @@ struct ComputeRHSOp #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(field(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); auto phi = field(lev).array(mfi); diff --git a/amr-wind/equation_systems/tke/tke_ops.H b/amr-wind/equation_systems/tke/tke_ops.H index c395100b1f..93f96bc8cc 100644 --- a/amr-wind/equation_systems/tke/tke_ops.H +++ b/amr-wind/equation_systems/tke/tke_ops.H @@ -42,6 +42,7 @@ struct PostSolveOp const int nlevels = repo.num_active_levels(); const auto clip_value = m_clip_value; for (int lev = 0; lev < nlevels; ++lev) { + // this one for (amrex::MFIter mfi(field(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& field_arr = field(lev).array(mfi); diff --git a/amr-wind/equation_systems/vof/vof_hybridsolver_ops.H b/amr-wind/equation_systems/vof/vof_hybridsolver_ops.H index f22fa4ffc3..cb0a0ffd1f 100644 --- a/amr-wind/equation_systems/vof/vof_hybridsolver_ops.H +++ b/amr-wind/equation_systems/vof/vof_hybridsolver_ops.H @@ -19,6 +19,7 @@ static void replace_masked_vof( auto& vof = f_vof(lev); const auto& vof_new = f_vof_new(lev); + // this one for (amrex::MFIter mfi(iblank); mfi.isValid(); ++mfi) { const auto& gbx = mfi.growntilebox(); const amrex::Array4& native_flag = diff --git a/amr-wind/immersed_boundary/bluff_body/bluff_body_ops.cpp b/amr-wind/immersed_boundary/bluff_body/bluff_body_ops.cpp index 516de2f489..4e49f3438a 100644 --- a/amr-wind/immersed_boundary/bluff_body/bluff_body_ops.cpp +++ b/amr-wind/immersed_boundary/bluff_body/bluff_body_ops.cpp @@ -47,6 +47,7 @@ void apply_mms_vel(CFDSim& sim) const auto& dx = geom[lev].CellSizeArray(); const auto& problo = geom[lev].ProbLoArray(); + // this one for (amrex::MFIter mfi(levelset(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); const auto& phi = levelset(lev).const_array(mfi); @@ -90,6 +91,7 @@ void apply_dirichlet_vel(CFDSim& sim, const amrex::Vector& vel_bc) // Defining the "ghost-cell" band distance amrex::Real phi_b = std::cbrt(dx[0] * dx[1] * dx[2]); + // this one for (amrex::MFIter mfi(levelset(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& varr = velocity(lev).array(mfi); diff --git a/amr-wind/immersed_boundary/bluff_body/box_ops.H b/amr-wind/immersed_boundary/bluff_body/box_ops.H index 11567c6366..f7864616da 100644 --- a/amr-wind/immersed_boundary/bluff_body/box_ops.H +++ b/amr-wind/immersed_boundary/bluff_body/box_ops.H @@ -59,6 +59,7 @@ struct InitDataOp for (int lev = 0; lev < nlevels; ++lev) { const auto& problo = geom[lev].ProbLoArray(); const auto& dx = geom[lev].CellSizeArray(); + // this one for (amrex::MFIter mfi(levelset(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); const auto& epsilon_node = mask_node(lev).array(mfi); diff --git a/amr-wind/immersed_boundary/bluff_body/cylinder_ops.H b/amr-wind/immersed_boundary/bluff_body/cylinder_ops.H index 2002f661b6..46440c0c33 100644 --- a/amr-wind/immersed_boundary/bluff_body/cylinder_ops.H +++ b/amr-wind/immersed_boundary/bluff_body/cylinder_ops.H @@ -58,6 +58,7 @@ struct InitDataOp const auto& problo = geom[lev].ProbLoArray(); const auto& dx = geom[lev].CellSizeArray(); + // this one for (amrex::MFIter mfi(levelset(lev)); mfi.isValid(); ++mfi) { const auto& phi = levelset(lev).array(mfi); diff --git a/amr-wind/immersed_boundary/bluff_body/sphere_ops.H b/amr-wind/immersed_boundary/bluff_body/sphere_ops.H index ec8fc94709..cda68c77ff 100644 --- a/amr-wind/immersed_boundary/bluff_body/sphere_ops.H +++ b/amr-wind/immersed_boundary/bluff_body/sphere_ops.H @@ -56,6 +56,7 @@ struct InitDataOp const auto& problo = geom[lev].ProbLoArray(); const auto& dx = geom[lev].CellSizeArray(); + // this one for (amrex::MFIter mfi(levelset(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); const auto& phi = levelset(lev).array(mfi); diff --git a/amr-wind/mesh_mapping_models/ChannelFlowMap.cpp b/amr-wind/mesh_mapping_models/ChannelFlowMap.cpp index 7b6306fe7e..9a6209a148 100644 --- a/amr-wind/mesh_mapping_models/ChannelFlowMap.cpp +++ b/amr-wind/mesh_mapping_models/ChannelFlowMap.cpp @@ -70,6 +70,7 @@ void ChannelFlowMap::create_cell_node_map(int lev, const amrex::Geometry& geom) prob_hi[0] - prob_lo[0], prob_hi[1] - prob_lo[1], prob_hi[2] - prob_lo[2]}; + // this one for (amrex::MFIter mfi((*m_mesh_scale_fac_cc)(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); @@ -149,6 +150,7 @@ void ChannelFlowMap::create_face_map(int lev, const amrex::Geometry& geom) prob_hi[0] - prob_lo[0], prob_hi[1] - prob_lo[1], prob_hi[2] - prob_lo[2]}; + // this one for (amrex::MFIter mfi((*m_mesh_scale_fac_xf)(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); @@ -181,6 +183,7 @@ void ChannelFlowMap::create_face_map(int lev, const amrex::Geometry& geom) }); } + // this one for (amrex::MFIter mfi((*m_mesh_scale_fac_yf)(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); @@ -213,6 +216,7 @@ void ChannelFlowMap::create_face_map(int lev, const amrex::Geometry& geom) }); } + // this one for (amrex::MFIter mfi((*m_mesh_scale_fac_zf)(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); @@ -277,6 +281,7 @@ void ChannelFlowMap::create_non_uniform_mesh( probhi_physical[0] - prob_lo[0], probhi_physical[1] - prob_lo[1], probhi_physical[2] - prob_lo[2]}; + // this one for (amrex::MFIter mfi((*m_non_uniform_coord_cc)(lev)); mfi.isValid(); ++mfi) { diff --git a/amr-wind/mesh_mapping_models/ConstantMap.cpp b/amr-wind/mesh_mapping_models/ConstantMap.cpp index 56292e8d42..0184ccaa36 100644 --- a/amr-wind/mesh_mapping_models/ConstantMap.cpp +++ b/amr-wind/mesh_mapping_models/ConstantMap.cpp @@ -27,6 +27,7 @@ void ConstantMap::create_cell_node_map(int lev) amrex::Real fac_y = m_fac[1]; amrex::Real fac_z = m_fac[2]; + // this one for (amrex::MFIter mfi((*m_mesh_scale_fac_cc)(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); @@ -69,6 +70,7 @@ void ConstantMap::create_face_map(int lev) amrex::Real fac_y = m_fac[1]; amrex::Real fac_z = m_fac[2]; + // this one for (amrex::MFIter mfi((*m_mesh_scale_fac_xf)(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); amrex::Array4 const& scale_fac_xf = @@ -86,6 +88,7 @@ void ConstantMap::create_face_map(int lev) }); } + // this one for (amrex::MFIter mfi((*m_mesh_scale_fac_yf)(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); amrex::Array4 const& scale_fac_yf = @@ -103,6 +106,7 @@ void ConstantMap::create_face_map(int lev) }); } + // this one for (amrex::MFIter mfi((*m_mesh_scale_fac_zf)(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); amrex::Array4 const& scale_fac_zf = @@ -129,6 +133,7 @@ void ConstantMap::create_non_uniform_mesh(int lev, const amrex::Geometry& geom) const auto& problo = geom.ProbLoArray(); const auto& dx = geom.CellSizeArray(); + // this one for (amrex::MFIter mfi((*m_non_uniform_coord_cc)(lev)); mfi.isValid(); ++mfi) { diff --git a/amr-wind/ocean_waves/boundary_ops/OceanWavesBoundary.cpp b/amr-wind/ocean_waves/boundary_ops/OceanWavesBoundary.cpp index 5f97144b72..421d683a44 100644 --- a/amr-wind/ocean_waves/boundary_ops/OceanWavesBoundary.cpp +++ b/amr-wind/ocean_waves/boundary_ops/OceanWavesBoundary.cpp @@ -96,6 +96,7 @@ void OceanWavesBoundary::set_velocity( auto shift_to_interior = amrex::IntVect::TheDimensionVector(idir) * (ori.isLow() ? 1 : -1); + // this one for (amrex::MFIter mfi(mfab); mfi.isValid(); ++mfi) { auto gbx = amrex::grow(mfi.validbox(), nghost); amrex::IntVect shift_to_cc = {0, 0, 0}; @@ -166,6 +167,7 @@ void OceanWavesBoundary::set_vof( const auto& dbx = ori.isLow() ? amrex::adjCellLo(domain, idir, nghost) : amrex::adjCellHi(domain, idir, nghost); + // this one for (amrex::MFIter mfi(mfab); mfi.isValid(); ++mfi) { auto gbx = amrex::grow(mfi.validbox(), nghost); const auto& bx = @@ -216,6 +218,7 @@ void OceanWavesBoundary::set_density( const auto& dbx = ori.isLow() ? amrex::adjCellLo(domain, idir, nghost) : amrex::adjCellHi(domain, idir, nghost); + // this one for (amrex::MFIter mfi(mfab); mfi.isValid(); ++mfi) { auto gbx = amrex::grow(mfi.validbox(), nghost); const auto& bx = @@ -287,6 +290,7 @@ void OceanWavesBoundary::set_inflow_sibling_velocity( #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(mfab); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); const auto& bx = vbx & dbx; diff --git a/amr-wind/overset/OversetOps.cpp b/amr-wind/overset/OversetOps.cpp index 6e7121823a..8a1e2dc58d 100644 --- a/amr-wind/overset/OversetOps.cpp +++ b/amr-wind/overset/OversetOps.cpp @@ -140,6 +140,7 @@ void OversetOps::update_gradp() #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (MFIter mfi(grad_p(lev), TilingIfNotGPU()); mfi.isValid(); ++mfi) { Box const& tbx = mfi.tilebox(); Array4 const& gp_lev = grad_p(lev).array(mfi); diff --git a/amr-wind/physics/BoussinesqBubble.cpp b/amr-wind/physics/BoussinesqBubble.cpp index 444e42134d..c8dc9d67f8 100644 --- a/amr-wind/physics/BoussinesqBubble.cpp +++ b/amr-wind/physics/BoussinesqBubble.cpp @@ -32,6 +32,7 @@ void BoussinesqBubble::initialize_fields(int level, const amrex::Geometry& geom) auto& density = m_density(level); auto& scalars = (*m_temperature)(level); + // needs openmp pragma? for (amrex::MFIter mfi(density); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); diff --git a/amr-wind/physics/BurggrafFlow.cpp b/amr-wind/physics/BurggrafFlow.cpp index 1e36618df3..ea4b4daf2f 100644 --- a/amr-wind/physics/BurggrafFlow.cpp +++ b/amr-wind/physics/BurggrafFlow.cpp @@ -63,6 +63,7 @@ void BurggrafFlow::initialize_fields(int level, const amrex::Geometry& geom) UExact u_exact; VExact v_exact; + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); @@ -181,4 +182,4 @@ void BurggrafFlow::post_init_actions() { output_error(); } void BurggrafFlow::post_advance_work() { output_error(); } -} // namespace amr_wind::burggraf \ No newline at end of file +} // namespace amr_wind::burggraf diff --git a/amr-wind/physics/ChannelFlow.cpp b/amr-wind/physics/ChannelFlow.cpp index 24335585fc..f406d82831 100644 --- a/amr-wind/physics/ChannelFlow.cpp +++ b/amr-wind/physics/ChannelFlow.cpp @@ -148,6 +148,7 @@ void ChannelFlow::initialize_fields( const auto C0 = m_C0; const auto C1 = m_C1; const auto dpdx = m_dpdx; + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); auto vel = velocity.array(mfi); @@ -181,6 +182,7 @@ void ChannelFlow::initialize_fields( } auto& walldist = m_repo.get_field("wall_dist")(level); + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); auto vel = velocity.array(mfi); diff --git a/amr-wind/physics/ConvectingTaylorVortex.cpp b/amr-wind/physics/ConvectingTaylorVortex.cpp index c8c57c05ed..595e8d2ffc 100644 --- a/amr-wind/physics/ConvectingTaylorVortex.cpp +++ b/amr-wind/physics/ConvectingTaylorVortex.cpp @@ -156,6 +156,7 @@ void ConvectingTaylorVortex::initialize_fields( GpyExact gpy_exact; GpzExact gpz_exact; + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); @@ -240,6 +241,7 @@ amrex::Real ConvectingTaylorVortex::compute_error(const Field& field) } if (m_sim.has_overset()) { + // this one for (amrex::MFIter mfi(field(lev)); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); diff --git a/amr-wind/physics/EkmanSpiral.cpp b/amr-wind/physics/EkmanSpiral.cpp index 25dda0ba95..c3bf5491c3 100644 --- a/amr-wind/physics/EkmanSpiral.cpp +++ b/amr-wind/physics/EkmanSpiral.cpp @@ -111,6 +111,7 @@ void EkmanSpiral::initialize_fields(int level, const amrex::Geometry& geom) UExact u_exact; VExact v_exact; + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); diff --git a/amr-wind/physics/HybridRANSLESABL.cpp b/amr-wind/physics/HybridRANSLESABL.cpp index 94a20d2e50..a447365aaa 100644 --- a/amr-wind/physics/HybridRANSLESABL.cpp +++ b/amr-wind/physics/HybridRANSLESABL.cpp @@ -20,6 +20,7 @@ void HybridRANSLESABL::initialize_fields(int level, const amrex::Geometry& geom) const amrex::Real dz = geom.CellSize()[2]; const amrex::Real ds = std::cbrt(dx * dy * dz); + // this one for (amrex::MFIter mfi((*m_tke)(level)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); const auto& tke_arr = (*m_tke)(level).array(mfi); @@ -88,6 +89,7 @@ void HybridRANSLESABL::compute_sdr_impl() const amrex::Real dz = geom.CellSize()[2]; const amrex::Real ds = std::cbrt(dx * dy * dz); + // this one for (amrex::MFIter mfi((*tke)(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); const auto& tke_arr = (*tke)(lev).array(mfi); diff --git a/amr-wind/physics/RayleighTaylor.cpp b/amr-wind/physics/RayleighTaylor.cpp index e0756f4fd8..1aa2d14e24 100644 --- a/amr-wind/physics/RayleighTaylor.cpp +++ b/amr-wind/physics/RayleighTaylor.cpp @@ -24,6 +24,7 @@ void RayleighTaylor::initialize_fields(int level, const amrex::Geometry& geom) velocity.setVal(0.0); + // needs openmp pragma? for (amrex::MFIter mfi(density); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); diff --git a/amr-wind/physics/ScalarAdvection.cpp b/amr-wind/physics/ScalarAdvection.cpp index 38069bd977..0a32904e4d 100644 --- a/amr-wind/physics/ScalarAdvection.cpp +++ b/amr-wind/physics/ScalarAdvection.cpp @@ -160,6 +160,7 @@ void ScalarAdvection::initialize_fields( auto& density = m_density(level); density.setVal(m_rho); + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); auto vel = velocity.array(mfi); @@ -213,6 +214,7 @@ void ScalarAdvection::initialize_scalar(const Shape& scalar_function) const auto& problo = m_repo.mesh().Geom(level).ProbLoArray(); auto& scalar = (*m_scalar)(level); + // this one for (amrex::MFIter mfi(scalar); mfi.isValid(); ++mfi) { const auto& dx = m_repo.mesh().Geom(level).CellSizeArray(); const auto& nbx = mfi.nodaltilebox(); diff --git a/amr-wind/physics/SyntheticTurbulence.cpp b/amr-wind/physics/SyntheticTurbulence.cpp index d9614f6bdc..6ba3f8ebc9 100644 --- a/amr-wind/physics/SyntheticTurbulence.cpp +++ b/amr-wind/physics/SyntheticTurbulence.cpp @@ -574,6 +574,7 @@ void SyntheticTurbulence::update_impl( const auto& gauss_scaling = m_gauss_scaling; const auto& epsilon = m_epsilon; + // this one for (amrex::MFIter mfi(m_turb_force(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& turb_force_arr = m_turb_force(lev).array(mfi); diff --git a/amr-wind/physics/TaylorGreenVortex.cpp b/amr-wind/physics/TaylorGreenVortex.cpp index 2de400cdda..ac17a6b399 100644 --- a/amr-wind/physics/TaylorGreenVortex.cpp +++ b/amr-wind/physics/TaylorGreenVortex.cpp @@ -32,6 +32,7 @@ void TaylorGreenVortex::initialize_fields( const amrex::Real Ly = probhi[1] - problo[1]; const amrex::Real Lz = probhi[2] - problo[2]; + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); const auto& dx = geom.CellSizeArray(); diff --git a/amr-wind/physics/VortexDipole.cpp b/amr-wind/physics/VortexDipole.cpp index 259b70697c..92f50ce4d0 100644 --- a/amr-wind/physics/VortexDipole.cpp +++ b/amr-wind/physics/VortexDipole.cpp @@ -36,6 +36,7 @@ void VortexDipole::initialize_fields(int level, const amrex::Geometry& geom) const auto& problo = geom.ProbLoArray(); + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); const auto& dx = geom.CellSizeArray(); @@ -74,4 +75,4 @@ void VortexDipole::initialize_fields(int level, const amrex::Geometry& geom) } } -} // namespace amr_wind \ No newline at end of file +} // namespace amr_wind diff --git a/amr-wind/physics/VortexRing.cpp b/amr-wind/physics/VortexRing.cpp index e6f075fa7c..6d82141347 100644 --- a/amr-wind/physics/VortexRing.cpp +++ b/amr-wind/physics/VortexRing.cpp @@ -164,6 +164,7 @@ void VortexRing::initialize_velocity(const VortexRingType& vorticity_theta) const auto& problo = m_repo.mesh().Geom(level).ProbLoArray(); + // this one for (amrex::MFIter mfi(m_velocity(level)); mfi.isValid(); ++mfi) { const auto& dx = m_repo.mesh().Geom(level).CellSizeArray(); const auto& nbx = mfi.nodaltilebox(); @@ -247,6 +248,7 @@ void VortexRing::initialize_velocity(const VortexRingType& vorticity_theta) for (int level = 0; level <= m_repo.mesh().finestLevel(); ++level) { auto& velocity = m_velocity(level); + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); diff --git a/amr-wind/physics/mms/MMS.cpp b/amr-wind/physics/mms/MMS.cpp index 67c19d6829..6d39077d2b 100644 --- a/amr-wind/physics/mms/MMS.cpp +++ b/amr-wind/physics/mms/MMS.cpp @@ -57,6 +57,7 @@ void MMS::initialize_fields(int level, const amrex::Geometry& geom) velocity.boxArray(), velocity.distributionMap, velocity.nComp(), velocity.nGrow(), amrex::MFInfo().SetArena(amrex::The_Pinned_Arena())); + // this one for (amrex::MFIter mfi(h_density); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); const auto& vel = h_velocity.array(mfi); diff --git a/amr-wind/physics/multiphase/BreakingWaves.cpp b/amr-wind/physics/multiphase/BreakingWaves.cpp index de203b33f0..a635135486 100644 --- a/amr-wind/physics/multiphase/BreakingWaves.cpp +++ b/amr-wind/physics/multiphase/BreakingWaves.cpp @@ -69,6 +69,7 @@ void BreakingWaves::initialize_fields(int level, const amrex::Geometry& geom) sdr.setVal(m_sdr0); } + // this one for (amrex::MFIter mfi(levelset); mfi.isValid(); ++mfi) { const auto& vbx = mfi.growntilebox(); auto vel = velocity.array(mfi); diff --git a/amr-wind/physics/multiphase/DamBreak.cpp b/amr-wind/physics/multiphase/DamBreak.cpp index 3ffa69ca7e..6bbd3071a7 100644 --- a/amr-wind/physics/multiphase/DamBreak.cpp +++ b/amr-wind/physics/multiphase/DamBreak.cpp @@ -42,6 +42,7 @@ void DamBreak::initialize_fields(int level, const amrex::Geometry& geom) const amrex::Real rho1 = mphase.rho1(); const amrex::Real rho2 = mphase.rho2(); + // this one for (amrex::MFIter mfi(levelset); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); auto phi = levelset.array(mfi); diff --git a/amr-wind/physics/multiphase/MultiPhase.cpp b/amr-wind/physics/multiphase/MultiPhase.cpp index 1b0392e4e8..c693f01fed 100644 --- a/amr-wind/physics/multiphase/MultiPhase.cpp +++ b/amr-wind/physics/multiphase/MultiPhase.cpp @@ -304,6 +304,7 @@ void MultiPhase::set_density_via_levelset() auto& density = m_density(lev); auto& levelset = (*m_levelset)(lev); + // this one for (amrex::MFIter mfi(density); mfi.isValid(); ++mfi) { const auto& vbx = mfi.growntilebox(); const auto& dx = geom[lev].CellSizeArray(); @@ -341,6 +342,7 @@ void MultiPhase::set_density_via_vof(amr_wind::FieldState fstate) auto& density = m_density.state(fstate)(lev); auto& vof = (*m_vof).state(fstate)(lev); + // this one for (amrex::MFIter mfi(density); mfi.isValid(); ++mfi) { const auto& vbx = mfi.growntilebox(); const amrex::Array4& F = vof.array(mfi); @@ -379,6 +381,7 @@ void MultiPhase::calculate_advected_facedensity() for (int lev = 0; lev < nlevels; ++lev) { + // this one for (amrex::MFIter mfi((*m_vof)(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& bxg1 = amrex::grow(bx, 1); @@ -427,6 +430,7 @@ void MultiPhase::favre_filtering() auto& velocity = m_velocity(lev); auto& density = m_density(lev); + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(1); const amrex::Array4& vel = velocity.array(mfi); @@ -448,6 +452,7 @@ void MultiPhase::favre_filtering() auto& vof = (*m_vof)(lev); auto& mom_fil = (*momentum_filter)(lev); auto& rho_fil = (*density_filter)(lev); + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); const amrex::Array4& vel = velocity.array(mfi); @@ -478,6 +483,7 @@ void MultiPhase::levelset2vof() auto& vof = (*m_vof)(lev); const auto& dx = geom[lev].CellSizeArray(); + // this one for (amrex::MFIter mfi(levelset); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); const amrex::Array4& phi = levelset.array(mfi); @@ -528,6 +534,7 @@ void MultiPhase::levelset2vof( auto& vof = vof_scr(lev); const auto& dx = geom[lev].CellSizeArray(); + // this one for (amrex::MFIter mfi(levelset); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); const amrex::Array4& phi = levelset.array(mfi); diff --git a/amr-wind/physics/multiphase/RainDrop.cpp b/amr-wind/physics/multiphase/RainDrop.cpp index fb1f36625b..b4895c5541 100644 --- a/amr-wind/physics/multiphase/RainDrop.cpp +++ b/amr-wind/physics/multiphase/RainDrop.cpp @@ -32,6 +32,7 @@ void RainDrop::initialize_fields(int level, const amrex::Geometry& geom) const amrex::Real yc = m_loc[1]; const amrex::Real zc = m_loc[2]; const amrex::Real radius = m_radius; + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); auto phi = levelset.array(mfi); @@ -69,6 +70,7 @@ void RainDrop::initialize_fields(int level, const amrex::Geometry& geom) amrex::Gpu::copy( amrex::Gpu::hostToDevice, m_vel.begin(), m_vel.end(), dvel.begin()); const auto* vptr = dvel.data(); + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); auto vel = velocity.array(mfi); diff --git a/amr-wind/physics/multiphase/SloshingTank.cpp b/amr-wind/physics/multiphase/SloshingTank.cpp index 7a78a31830..45570285fe 100644 --- a/amr-wind/physics/multiphase/SloshingTank.cpp +++ b/amr-wind/physics/multiphase/SloshingTank.cpp @@ -34,6 +34,7 @@ void SloshingTank::initialize_fields(int level, const amrex::Geometry& geom) const amrex::Real Lx = probhi[0] - problo[0]; const amrex::Real Ly = probhi[1] - problo[1]; + // this one for (amrex::MFIter mfi(levelset); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); auto phi = levelset.array(mfi); diff --git a/amr-wind/physics/multiphase/VortexPatch.cpp b/amr-wind/physics/multiphase/VortexPatch.cpp index 364308bd6f..9527e91654 100644 --- a/amr-wind/physics/multiphase/VortexPatch.cpp +++ b/amr-wind/physics/multiphase/VortexPatch.cpp @@ -45,6 +45,7 @@ void VortexPatch::initialize_fields(int level, const amrex::Geometry& geom) auto& v_mac = m_sim.repo().get_field("v_mac")(level); auto& w_mac = m_sim.repo().get_field("w_mac")(level); + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); auto uf = u_mac.array(mfi); @@ -117,6 +118,7 @@ void VortexPatch::pre_advance_work() auto& u_mac = m_sim.repo().get_field("u_mac")(lev); auto& v_mac = m_sim.repo().get_field("v_mac")(lev); auto& w_mac = m_sim.repo().get_field("w_mac")(lev); + // this one for (amrex::MFIter mfi(m_velocity(lev)); mfi.isValid(); ++mfi) { const auto& vbx = mfi.growntilebox(1); const auto& dx = geom[lev].CellSizeArray(); @@ -162,6 +164,7 @@ void VortexPatch::post_advance_work() // Overriding the velocity field for (int lev = 0; lev < nlevels; ++lev) { + // this one for (amrex::MFIter mfi(m_velocity(lev)); mfi.isValid(); ++mfi) { const auto& vbx = mfi.growntilebox(); const auto& dx = geom[lev].CellSizeArray(); diff --git a/amr-wind/physics/multiphase/VortexPatchScalarVel.cpp b/amr-wind/physics/multiphase/VortexPatchScalarVel.cpp index 24b3184d8c..dabc08c629 100644 --- a/amr-wind/physics/multiphase/VortexPatchScalarVel.cpp +++ b/amr-wind/physics/multiphase/VortexPatchScalarVel.cpp @@ -47,6 +47,7 @@ void VortexPatchScalarVel::initialize_fields( auto& v_mac = m_sim.repo().get_field("v_mac")(level); auto& w_mac = m_sim.repo().get_field("w_mac")(level); + // this one for (amrex::MFIter mfi(velocity); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); auto uf = u_mac.array(mfi); @@ -128,6 +129,7 @@ void VortexPatchScalarVel::pre_advance_work() auto& u_mac = m_sim.repo().get_field("u_mac")(lev); auto& v_mac = m_sim.repo().get_field("v_mac")(lev); auto& w_mac = m_sim.repo().get_field("w_mac")(lev); + // this one for (amrex::MFIter mfi(m_velocity(lev)); mfi.isValid(); ++mfi) { const auto& vbx = mfi.growntilebox(1); const auto& dx = geom[lev].CellSizeArray(); diff --git a/amr-wind/physics/multiphase/ZalesakDisk.cpp b/amr-wind/physics/multiphase/ZalesakDisk.cpp index d0139f1478..ac5aa8717a 100644 --- a/amr-wind/physics/multiphase/ZalesakDisk.cpp +++ b/amr-wind/physics/multiphase/ZalesakDisk.cpp @@ -50,6 +50,7 @@ void ZalesakDisk::initialize_fields(int level, const amrex::Geometry& geom) const amrex::Real hwidth = m_halfwidth; const amrex::Real depth = m_depth; + // this one for (amrex::MFIter mfi(levelset); mfi.isValid(); ++mfi) { const auto& gbx = mfi.growntilebox(1); auto uf = u_mac.array(mfi); @@ -143,6 +144,7 @@ void ZalesakDisk::pre_advance_work() auto& u_mac = m_sim.repo().get_field("u_mac")(lev); auto& v_mac = m_sim.repo().get_field("v_mac")(lev); auto& w_mac = m_sim.repo().get_field("w_mac")(lev); + // this one for (amrex::MFIter mfi(m_velocity(lev)); mfi.isValid(); ++mfi) { const auto& gbx = mfi.growntilebox(1); const auto& dx = geom[lev].CellSizeArray(); @@ -175,6 +177,7 @@ void ZalesakDisk::post_advance_work() // Overriding the velocity field for (int lev = 0; lev < nlevels; ++lev) { + // this one for (amrex::MFIter mfi(m_velocity(lev)); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); const auto& dx = geom[lev].CellSizeArray(); diff --git a/amr-wind/physics/multiphase/ZalesakDiskScalarVel.cpp b/amr-wind/physics/multiphase/ZalesakDiskScalarVel.cpp index 90fe542d2c..698c462a39 100644 --- a/amr-wind/physics/multiphase/ZalesakDiskScalarVel.cpp +++ b/amr-wind/physics/multiphase/ZalesakDiskScalarVel.cpp @@ -83,6 +83,7 @@ void ZalesakDiskScalarVel::initialize_fields( const amrex::Real hwidth = m_halfwidth; const amrex::Real depth = m_depth; + // this one for (amrex::MFIter mfi(levelset); mfi.isValid(); ++mfi) { const auto& gbx = mfi.growntilebox(1); auto uf = u_mac.array(mfi); @@ -185,6 +186,7 @@ void ZalesakDiskScalarVel::pre_advance_work() auto& u_mac = m_sim.repo().get_field("u_mac")(lev); auto& v_mac = m_sim.repo().get_field("v_mac")(lev); auto& w_mac = m_sim.repo().get_field("w_mac")(lev); + // this one for (amrex::MFIter mfi(m_velocity(lev)); mfi.isValid(); ++mfi) { const auto& gbx = mfi.growntilebox(1); const auto& dx = geom[lev].CellSizeArray(); @@ -250,6 +252,7 @@ amrex::Real ZalesakDiskScalarVel::compute_error(const Field& field) } if (m_sim.has_overset()) { + // this one for (amrex::MFIter mfi(field(lev)); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); diff --git a/amr-wind/physics/multiphase/hydrostatic_ops.H b/amr-wind/physics/multiphase/hydrostatic_ops.H index 0cea6e1af8..f965702457 100644 --- a/amr-wind/physics/multiphase/hydrostatic_ops.H +++ b/amr-wind/physics/multiphase/hydrostatic_ops.H @@ -15,6 +15,7 @@ static void define_rho0( for (int lev = 0; lev < rho0.repo().num_active_levels(); ++lev) { const auto& dx = geom[lev].CellSizeArray(); const auto& problo = geom[lev].ProbLoArray(); + // this one for (amrex::MFIter mfi(rho0(lev)); mfi.isValid(); ++mfi) { amrex::Box const& bx = mfi.validbox(); auto rho0_arr = rho0(lev).array(mfi); @@ -41,6 +42,7 @@ static void define_p0( const auto& dx = geom[lev].CellSizeArray(); const auto& problo = geom[lev].ProbLoArray(); const auto& probhi = geom[lev].ProbHiArray(); + // this one for (amrex::MFIter mfi(p0(lev)); mfi.isValid(); ++mfi) { amrex::Box const& nbx = mfi.grownnodaltilebox(); auto p0_arr = p0(lev).array(mfi); @@ -64,4 +66,4 @@ static void define_p0( } // namespace amr_wind::hydrostatic -#endif \ No newline at end of file +#endif diff --git a/amr-wind/physics/udfs/UDF.cpp b/amr-wind/physics/udfs/UDF.cpp index 7a3427de26..52dc3ba1b4 100644 --- a/amr-wind/physics/udfs/UDF.cpp +++ b/amr-wind/physics/udfs/UDF.cpp @@ -46,6 +46,7 @@ void UDFImpl::operator()(int level, const amrex::Geometry& geom) const amrex::Real time = 0.0; const auto ncomp = m_field.num_comp(); const auto& dop = m_op.device_instance(); + // this one for (amrex::MFIter mfi(mfab); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& marr = mfab.array(mfi); diff --git a/amr-wind/projection/incflo_apply_nodal_projection.cpp b/amr-wind/projection/incflo_apply_nodal_projection.cpp index 8f6b6e17d1..e631a87330 100644 --- a/amr-wind/projection/incflo_apply_nodal_projection.cpp +++ b/amr-wind/projection/incflo_apply_nodal_projection.cpp @@ -214,6 +214,7 @@ void incflo::ApplyProjection( #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (MFIter mfi(velocity(lev), TilingIfNotGPU()); mfi.isValid(); ++mfi) { Box const& bx = mfi.tilebox(); @@ -271,6 +272,7 @@ void incflo::ApplyProjection( #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (MFIter mfi(sigma[lev], TilingIfNotGPU()); mfi.isValid(); ++mfi) { Box const& bx = mfi.tilebox(); @@ -438,6 +440,7 @@ void incflo::ApplyProjection( #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (MFIter mfi(grad_p(lev), TilingIfNotGPU()); mfi.isValid(); ++mfi) { Box const& tbx = mfi.tilebox(); Box const& nbx = mfi.nodaltilebox(); diff --git a/amr-wind/transport_models/TwoPhaseTransport.H b/amr-wind/transport_models/TwoPhaseTransport.H index 6042349b31..dd124185cd 100644 --- a/amr-wind/transport_models/TwoPhaseTransport.H +++ b/amr-wind/transport_models/TwoPhaseTransport.H @@ -139,6 +139,7 @@ public: const auto& vof = m_repo.get_field("vof"); for (int lev = 0; lev < m_repo.num_active_levels(); ++lev) { + // this one for (amrex::MFIter mfi((*mu)(lev)); mfi.isValid(); ++mfi) { const auto& vbx = mfi.growntilebox(); const auto& volfrac = vof(lev).const_array(mfi); @@ -160,6 +161,7 @@ public: const auto& geom = m_repo.mesh().Geom(); for (int lev = 0; lev < m_repo.num_active_levels(); ++lev) { + // this one for (amrex::MFIter mfi((*mu)(lev)); mfi.isValid(); ++mfi) { const auto& vbx = mfi.growntilebox(); const auto& dx = geom[lev].CellSizeArray(); @@ -205,6 +207,7 @@ public: const auto& vof = m_repo.get_field("vof"); for (int lev = 0; lev < m_repo.num_active_levels(); ++lev) { + // this one for (amrex::MFIter mfi((*alpha)(lev)); mfi.isValid(); ++mfi) { const auto& vbx = mfi.growntilebox(); const auto& volfrac = vof(lev).const_array(mfi); @@ -229,6 +232,7 @@ public: const auto& geom = m_repo.mesh().Geom(); for (int lev = 0; lev < m_repo.num_active_levels(); ++lev) { + // this one for (amrex::MFIter mfi((*alpha)(lev)); mfi.isValid(); ++mfi) { const auto& vbx = mfi.growntilebox(); const auto& dx = geom[lev].CellSizeArray(); diff --git a/amr-wind/turbulence/LES/AMD.cpp b/amr-wind/turbulence/LES/AMD.cpp index 840eab9b57..73ce29c64d 100644 --- a/amr-wind/turbulence/LES/AMD.cpp +++ b/amr-wind/turbulence/LES/AMD.cpp @@ -133,6 +133,7 @@ void AMD::update_alphaeff(Field& alphaeff) const auto& geom = geom_vec[lev]; const auto& dx = geom.CellSizeArray(); + // this one for (amrex::MFIter mfi(alphaeff(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& gradVel_arr = (*gradVel)(lev).const_array(mfi); diff --git a/amr-wind/turbulence/LES/AMDNoTherm.cpp b/amr-wind/turbulence/LES/AMDNoTherm.cpp index 310aac57f3..2da4c6c748 100644 --- a/amr-wind/turbulence/LES/AMDNoTherm.cpp +++ b/amr-wind/turbulence/LES/AMDNoTherm.cpp @@ -50,6 +50,7 @@ void AMDNoTherm::update_turbulent_viscosity( const auto& geom = geom_vec[lev]; const auto& dx = geom.CellSizeArray(); + // this one for (amrex::MFIter mfi(mu_turb(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& gradVel_arr = (*gradVel)(lev).array(mfi); diff --git a/amr-wind/turbulence/LES/Kosovic.cpp b/amr-wind/turbulence/LES/Kosovic.cpp index dfae6d5f0a..914460cab7 100644 --- a/amr-wind/turbulence/LES/Kosovic.cpp +++ b/amr-wind/turbulence/LES/Kosovic.cpp @@ -81,6 +81,7 @@ void Kosovic::update_turbulent_viscosity( const amrex::Real locSurfaceRANSExp = m_surfaceRANSExp; const amrex::Real locSurfaceFactor = m_surfaceFactor; const amrex::Real locC1 = m_C1; + // this one for (amrex::MFIter mfi(mu_turb(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& mu_arr = mu_turb(lev).array(mfi); @@ -140,6 +141,7 @@ void Kosovic::update_alphaeff(Field& alphaeff) const amrex::Real muCoeff = (m_refMOL < 0) ? 3 : 1; const int nlevels = repo.num_active_levels(); for (int lev = 0; lev < nlevels; ++lev) { + // this one for (amrex::MFIter mfi(mu_turb(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& muturb_arr = mu_turb(lev).array(mfi); diff --git a/amr-wind/turbulence/LES/OneEqKsgs.cpp b/amr-wind/turbulence/LES/OneEqKsgs.cpp index d7fafbcb60..7ac42b968a 100644 --- a/amr-wind/turbulence/LES/OneEqKsgs.cpp +++ b/amr-wind/turbulence/LES/OneEqKsgs.cpp @@ -117,6 +117,7 @@ void OneEqKsgsM84::update_turbulent_viscosity( const amrex::Real dz = geom.CellSize()[2]; const amrex::Real ds = std::cbrt(dx * dy * dz); + // this one for (amrex::MFIter mfi(mu_turb(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& mu_arr = mu_turb(lev).array(mfi); @@ -181,6 +182,7 @@ void OneEqKsgsM84::update_alphaeff(Field& alphaeff) const amrex::Real dz = geom.CellSize()[2]; const amrex::Real ds = std::cbrt(dx * dy * dz); + // this one for (amrex::MFIter mfi(mu_turb(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& muturb_arr = mu_turb(lev).array(mfi); @@ -247,6 +249,7 @@ void OneEqKsgsM84::post_advance_work() const amrex::Real dz = geom.CellSize()[2]; const amrex::Real ds = std::cbrt(dx * dy * dz); + // this one for (amrex::MFIter mfi(tke(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.growntilebox(); const auto& tke_arr = tke(lev).array(mfi); diff --git a/amr-wind/turbulence/LES/Smagorinsky.cpp b/amr-wind/turbulence/LES/Smagorinsky.cpp index ec5c75718d..6ea54d3c3d 100644 --- a/amr-wind/turbulence/LES/Smagorinsky.cpp +++ b/amr-wind/turbulence/LES/Smagorinsky.cpp @@ -47,6 +47,7 @@ void Smagorinsky::update_turbulent_viscosity( const amrex::Real ds_sqr = ds * ds; const amrex::Real smag_factor = Cs_sqr * ds_sqr; + // this one for (amrex::MFIter mfi(mu_turb(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& mu_arr = mu_turb(lev).array(mfi); diff --git a/amr-wind/turbulence/RANS/KLAxell.cpp b/amr-wind/turbulence/RANS/KLAxell.cpp index 4eb765fdb1..13700f2a8b 100644 --- a/amr-wind/turbulence/RANS/KLAxell.cpp +++ b/amr-wind/turbulence/RANS/KLAxell.cpp @@ -103,6 +103,7 @@ void KLAxell::update_turbulent_viscosity( const auto& geom = geom_vec[lev]; const auto& problo = repo.mesh().Geom(lev).ProbLoArray(); const amrex::Real dz = geom.CellSize()[2]; + // this one for (amrex::MFIter mfi(mu_turb(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& mu_arr = mu_turb(lev).array(mfi); diff --git a/amr-wind/turbulence/RANS/KOmegaSST.cpp b/amr-wind/turbulence/RANS/KOmegaSST.cpp index 8aab69899a..42e7a5c3e8 100644 --- a/amr-wind/turbulence/RANS/KOmegaSST.cpp +++ b/amr-wind/turbulence/RANS/KOmegaSST.cpp @@ -113,6 +113,7 @@ void KOmegaSST::update_turbulent_viscosity( const int nlevels = repo.num_active_levels(); for (int lev = 0; lev < nlevels; ++lev) { + // this one for (amrex::MFIter mfi(mu_turb(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& lam_mu_arr = (*lam_mu)(lev).array(mfi); @@ -281,6 +282,7 @@ void KOmegaSST::update_scalar_diff( const auto& repo = deff.repo(); const int nlevels = repo.num_active_levels(); for (int lev = 0; lev < nlevels; ++lev) { + // this one for (amrex::MFIter mfi(deff(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& lam_mu_arr = (*lam_mu)(lev).array(mfi); @@ -304,6 +306,7 @@ void KOmegaSST::update_scalar_diff( const auto& repo = deff.repo(); const int nlevels = repo.num_active_levels(); for (int lev = 0; lev < nlevels; ++lev) { + // this one for (amrex::MFIter mfi(deff(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& lam_mu_arr = (*lam_mu)(lev).array(mfi); diff --git a/amr-wind/turbulence/RANS/KOmegaSSTIDDES.cpp b/amr-wind/turbulence/RANS/KOmegaSSTIDDES.cpp index cd3dd0ca47..2904f19bb5 100644 --- a/amr-wind/turbulence/RANS/KOmegaSSTIDDES.cpp +++ b/amr-wind/turbulence/RANS/KOmegaSSTIDDES.cpp @@ -130,6 +130,7 @@ void KOmegaSSTIDDES::update_turbulent_viscosity( const amrex::Real hmax = amrex::max(amrex::max(dx, dy), dz); + // this one for (amrex::MFIter mfi(mu_turb(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& lam_mu_arr = (*lam_mu)(lev).array(mfi); diff --git a/amr-wind/utilities/averaging/ReAveraging.cpp b/amr-wind/utilities/averaging/ReAveraging.cpp index 10d90edfc3..364dc5cb61 100644 --- a/amr-wind/utilities/averaging/ReAveraging.cpp +++ b/amr-wind/utilities/averaging/ReAveraging.cpp @@ -49,6 +49,7 @@ void ReAveraging::operator()( #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(ffab, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); diff --git a/amr-wind/utilities/averaging/ReynoldsStress.cpp b/amr-wind/utilities/averaging/ReynoldsStress.cpp index a503257537..e6d59bc411 100644 --- a/amr-wind/utilities/averaging/ReynoldsStress.cpp +++ b/amr-wind/utilities/averaging/ReynoldsStress.cpp @@ -66,6 +66,7 @@ void ReynoldsStress::operator()( #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(ffab, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); diff --git a/amr-wind/utilities/sampling/FreeSurfaceSampler.cpp b/amr-wind/utilities/sampling/FreeSurfaceSampler.cpp index 876f618b13..66a4ace160 100644 --- a/amr-wind/utilities/sampling/FreeSurfaceSampler.cpp +++ b/amr-wind/utilities/sampling/FreeSurfaceSampler.cpp @@ -236,6 +236,7 @@ void FreeSurfaceSampler::initialize(const std::string& key) geom.ProbLoArray(); const amrex::GpuArray phi = geom.ProbHiArray(); + // this one for (amrex::MFIter mfi(floc(lev)); mfi.isValid(); ++mfi) { auto loc_arr = floc(lev).array(mfi); auto idx_arr = fidx(lev).array(mfi); @@ -446,6 +447,7 @@ bool FreeSurfaceSampler::update_sampling_locations() geom.InvCellSizeArray(); const amrex::GpuArray plo = geom.ProbLoArray(); + // this one for (amrex::MFIter mfi(floc(lev)); mfi.isValid(); ++mfi) { auto loc_arr = floc(lev).const_array(mfi); auto idx_arr = fidx(lev).const_array(mfi); @@ -621,6 +623,7 @@ void FreeSurfaceSampler::post_regrid_actions() geom.ProbLoArray(); const amrex::GpuArray phi = geom.ProbHiArray(); + // this one for (amrex::MFIter mfi(floc(lev)); mfi.isValid(); ++mfi) { auto loc_arr = floc(lev).array(mfi); auto idx_arr = fidx(lev).array(mfi); diff --git a/amr-wind/utilities/sampling/SamplingContainer.cpp b/amr-wind/utilities/sampling/SamplingContainer.cpp index 00b19df1d5..298f043011 100644 --- a/amr-wind/utilities/sampling/SamplingContainer.cpp +++ b/amr-wind/utilities/sampling/SamplingContainer.cpp @@ -19,6 +19,7 @@ void SamplingContainer::setup_container( const int nlevels = m_mesh.finestLevel() + 1; for (int lev = 0; lev < nlevels; ++lev) { + // needs openmp pragma? for (amrex::MFIter mfi = MakeMFIter(lev); mfi.isValid(); ++mfi) { DefineAndReturnParticleTile(lev, mfi.index(), mfi.LocalTileIndex()); } diff --git a/amr-wind/utilities/tagging/CurvatureRefinement.cpp b/amr-wind/utilities/tagging/CurvatureRefinement.cpp index 268ffa99ab..f77894b8d2 100644 --- a/amr-wind/utilities/tagging/CurvatureRefinement.cpp +++ b/amr-wind/utilities/tagging/CurvatureRefinement.cpp @@ -56,6 +56,7 @@ void CurvatureRefinement::operator()( #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(mfab, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); diff --git a/amr-wind/utilities/tagging/FieldRefinement.H b/amr-wind/utilities/tagging/FieldRefinement.H index 5b9f3a21f3..e0b81fbdfe 100644 --- a/amr-wind/utilities/tagging/FieldRefinement.H +++ b/amr-wind/utilities/tagging/FieldRefinement.H @@ -54,6 +54,7 @@ public: #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(mfab, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); diff --git a/amr-wind/utilities/tagging/GradientMagRefinement.cpp b/amr-wind/utilities/tagging/GradientMagRefinement.cpp index b1af1ca1d4..a367729753 100644 --- a/amr-wind/utilities/tagging/GradientMagRefinement.cpp +++ b/amr-wind/utilities/tagging/GradientMagRefinement.cpp @@ -56,6 +56,7 @@ void GradientMagRefinement::operator()( #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(mfab, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); diff --git a/amr-wind/utilities/tagging/OversetRefinement.cpp b/amr-wind/utilities/tagging/OversetRefinement.cpp index 475603ef72..cf5b7be8ac 100644 --- a/amr-wind/utilities/tagging/OversetRefinement.cpp +++ b/amr-wind/utilities/tagging/OversetRefinement.cpp @@ -34,6 +34,7 @@ void OversetRefinement::operator()( #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(ibfab, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); diff --git a/amr-wind/utilities/tagging/QCriterionRefinement.cpp b/amr-wind/utilities/tagging/QCriterionRefinement.cpp index f7bbd4b0d8..20ed7c7001 100644 --- a/amr-wind/utilities/tagging/QCriterionRefinement.cpp +++ b/amr-wind/utilities/tagging/QCriterionRefinement.cpp @@ -64,6 +64,7 @@ void QCriterionRefinement::operator()( #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(mfab, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); diff --git a/amr-wind/utilities/tagging/VorticityMagRefinement.cpp b/amr-wind/utilities/tagging/VorticityMagRefinement.cpp index 5544587330..fe1797cf10 100644 --- a/amr-wind/utilities/tagging/VorticityMagRefinement.cpp +++ b/amr-wind/utilities/tagging/VorticityMagRefinement.cpp @@ -60,6 +60,7 @@ void VorticityMagRefinement::operator()( #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(mfab, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); diff --git a/amr-wind/wind_energy/ABL.cpp b/amr-wind/wind_energy/ABL.cpp index 8504e7b595..a5539707a3 100644 --- a/amr-wind/wind_energy/ABL.cpp +++ b/amr-wind/wind_energy/ABL.cpp @@ -106,6 +106,7 @@ void ABL::initialize_fields(int level, const amrex::Geometry& geom) } bool interp_fine_levels = false; + // needs openmp pragma? for (amrex::MFIter mfi(density); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); diff --git a/amr-wind/wind_energy/ABLBoundaryPlane.cpp b/amr-wind/wind_energy/ABLBoundaryPlane.cpp index e0ed399106..6a64cb8bc8 100644 --- a/amr-wind/wind_energy/ABLBoundaryPlane.cpp +++ b/amr-wind/wind_energy/ABLBoundaryPlane.cpp @@ -176,6 +176,7 @@ void InletData::read_data_native( bndry_n[ori].boxArray(), bndry_n[ori].DistributionMap(), bndry_n[ori].nComp(), 0, amrex::MFInfo()); + // needs openmp pragma? for (amrex::MFIter mfi(bndry); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); @@ -199,6 +200,7 @@ void InletData::read_data_native( bndry.copyTo((*m_data_n[ori])[lev], 0, nstart, static_cast(nc)); + // needs openmp pragma? for (amrex::MFIter mfi(bndry); mfi.isValid(); ++mfi) { const auto& vbx = mfi.validbox(); const auto& bndry_np1_arr = bndry_np1[ori].array(mfi); diff --git a/amr-wind/wind_energy/ABLFieldInit.cpp b/amr-wind/wind_energy/ABLFieldInit.cpp index 000c6c5b5d..7a661fb0cb 100644 --- a/amr-wind/wind_energy/ABLFieldInit.cpp +++ b/amr-wind/wind_energy/ABLFieldInit.cpp @@ -345,6 +345,7 @@ void ABLFieldInit::perturb_temperature( #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(theta_fab, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); @@ -382,6 +383,7 @@ void ABLFieldInit::init_tke( #ifdef AMREX_USE_OMP #pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) #endif + // this one for (amrex::MFIter mfi(tke_fab, amrex::TilingIfNotGPU()); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); diff --git a/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp b/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp index 9b096be399..1a99beba3e 100644 --- a/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp +++ b/amr-wind/wind_energy/ABLModulatedPowerLaw.cpp @@ -174,6 +174,7 @@ void ABLModulatedPowerLaw::set_velocity( const auto& dbx = ori.isLow() ? amrex::adjCellLo(domain, idir, nghost) : amrex::adjCellHi(domain, idir, nghost); + // needs openmp pragma? for (amrex::MFIter mfi(mfab); mfi.isValid(); ++mfi) { auto gbx = amrex::grow(mfi.validbox(), nghost); const auto& bx = @@ -250,6 +251,7 @@ void ABLModulatedPowerLaw::set_temperature( const auto& dbx = ori.isLow() ? amrex::adjCellLo(domain, idir, nghost) : amrex::adjCellHi(domain, idir, nghost); + // needs openmp pragma? for (amrex::MFIter mfi(mfab); mfi.isValid(); ++mfi) { auto gbx = amrex::grow(mfi.validbox(), nghost); const auto& bx = diff --git a/amr-wind/wind_energy/ABLStats.cpp b/amr-wind/wind_energy/ABLStats.cpp index ad0aadea50..67ea0ada6c 100644 --- a/amr-wind/wind_energy/ABLStats.cpp +++ b/amr-wind/wind_energy/ABLStats.cpp @@ -117,6 +117,7 @@ void ABLStats::calc_sfs_stress_avgs( const int nlevels = repo.num_active_levels(); for (int lev = 0; lev < nlevels; ++lev) { + // this one for (amrex::MFIter mfi(m_mueff(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& mueff_arr = m_mueff(lev).array(mfi); @@ -184,6 +185,7 @@ void ABLStats::calc_tke_diffusion( const int nlevels = m_sim.repo().num_active_levels(); for (int lev = 0; lev < nlevels; ++lev) { + // this one for (amrex::MFIter mfi(diffusion(lev)); mfi.isValid(); ++mfi) { const auto& bx = mfi.tilebox(); const auto& diffusion_arr = diffusion(lev).array(mfi); diff --git a/amr-wind/wind_energy/actuator/ActuatorContainer.cpp b/amr-wind/wind_energy/actuator/ActuatorContainer.cpp index 6399d27b08..1b4af4b1f9 100644 --- a/amr-wind/wind_energy/actuator/ActuatorContainer.cpp +++ b/amr-wind/wind_energy/actuator/ActuatorContainer.cpp @@ -96,6 +96,7 @@ void ActuatorContainer::initialize_particles(const int total_pts) bool assigned = false; const int nlevels = m_mesh.finestLevel() + 1; for (int lev = 0; ((lev < nlevels) && !assigned); ++lev) { + // needs openmp pragma? for (auto mfi = MakeMFIter(lev); (mfi.isValid() && !assigned); ++mfi) { auto& ptile = GetParticles( lev)[std::make_pair(mfi.index(), mfi.LocalTileIndex())];