From 3163a61b23fe7d2d6c6e45550502064d5aa3a378 Mon Sep 17 00:00:00 2001 From: Steven Hofmeyr Date: Fri, 13 Sep 2024 10:38:22 -1000 Subject: [PATCH] Removed some unused code and changed a checking loop to not use managed memory. --- src/InteractionModel.H | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/InteractionModel.H b/src/InteractionModel.H index eed36dd..30aac59 100644 --- a/src/InteractionModel.H +++ b/src/InteractionModel.H @@ -165,9 +165,9 @@ void interactAgentsImpl(IModel &interaction_model, AgentContainer& agents, int b max_group = agents.getMaxGroup(bin_idx); #ifdef DEBUG auto bingroup_ptr = soa.GetIntData(bin_idx).data(); - for (int i = 0; i < np; i++) { + ParallelFor(np, [=] AMREX_GPU_DEVICE (int i) noexcept { AMREX_ASSERT(bingroup_ptr[i] <= max_group); - } + }); #endif } max_group++; @@ -196,8 +196,6 @@ void interactAgentsImpl(IModel &interaction_model, AgentContainer& agents, int b auto prob_ptr = soa.GetRealData(RealIdx::nattribs + r0(d) + RealIdxDisease::prob).data(); auto lparm = agents.getDiseaseParameters_d(d); Real scale = 1.0_prt; // TODO this should vary based on cell - Real infect = lparm->infect; - infect *= (1.0_rt - lparm->vac_eff); ParallelFor(bins_ptr->numItems(), [=] AMREX_GPU_DEVICE (int ii) noexcept { auto infectious_i = inds[ii];