Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf committed Jan 15, 2025
1 parent acf1a31 commit 949cf34
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions amr-wind/utilities/sampling/SamplingContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ void SamplingContainer::initialize_particles(
continue;
}

int uid_offset = 0;
for(int iprobe2=0; iprobe2 < iprobe; iprobe2++){
uid_offset += samplers[iprobe2]->num_points();
}
const int uid_offset = std::accumulate(
samplers.begin(), samplers.begin() + iprobe, 0,
[&](int sum, const auto& s) { return sum + s->num_points(); });
const auto probe_id = probe->id();
amrex::Gpu::DeviceVector<amrex::RealVect> dlocs(npts);
amrex::Gpu::copy(
Expand Down

0 comments on commit 949cf34

Please sign in to comment.