Skip to content

Commit

Permalink
Minor correction to box for wind farms (#2036)
Browse files Browse the repository at this point in the history
Co-authored-by: Mahesh Natarajan <[email protected]>
  • Loading branch information
nataraj2 and Mahesh Natarajan authored Dec 23, 2024
1 parent 03e5ca7 commit 746fe73
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Source/WindFarmParametrization/ERF_WindFarm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,13 +504,13 @@ WindFarm::fill_SMark_multifab_mesoscale_models (const Geometry& geom,
// Initialize wind farm
for ( MFIter mfi(mf_SMark,TilingIfNotGPU()); mfi.isValid(); ++mfi) {

const Box& bx = mfi.tilebox();
const Box& gbx = mfi.growntilebox(1);
auto SMark_array = mf_SMark.array(mfi);
auto Nturb_array = mf_Nturb.array(mfi);
const Array4<const Real>& z_nd_arr = (z_phys_nd) ? z_phys_nd->const_array(mfi) : Array4<Real>{};
int k0 = bx.smallEnd()[2];
int k0 = gbx.smallEnd()[2];

ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
ParallelFor(gbx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept {
if(Nturb_array(i,j,k,0) > 0) {
int li = amrex::min(amrex::max(i, i_lo), i_hi);
int lj = amrex::min(amrex::max(j, j_lo), j_hi);
Expand Down Expand Up @@ -574,7 +574,6 @@ WindFarm::fill_SMark_multifab (const Geometry& geom,

// Initialize wind farm
for ( MFIter mfi(mf_SMark,TilingIfNotGPU()); mfi.isValid(); ++mfi) {
//const Box& bx = mfi.tilebox();
const Box& gbx = mfi.growntilebox(1);
auto SMark_array = mf_SMark.array(mfi);

Expand Down

0 comments on commit 746fe73

Please sign in to comment.