Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 25, 2024
1 parent f0bc4ce commit 12f4599
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/BinaryOrbitCIC/binary_orbit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,8 @@ auto problem_main() -> int
// check max abs particle distance
float max_err = NAN;
if (amrex::ParallelDescriptor::IOProcessor() && (!sim.userData_.dist.empty())) {
auto result =
std::max_element(sim.userData_.dist.begin(), sim.userData_.dist.end(),
[](amrex::ParticleReal a, amrex::ParticleReal b) { return std::abs(a) < std::abs(b); });
auto result = std::max_element(sim.userData_.dist.begin(), sim.userData_.dist.end(),
[](amrex::ParticleReal a, amrex::ParticleReal b) { return std::abs(a) < std::abs(b); });
max_err = std::abs(*result);
}
amrex::ParallelDescriptor::Bcast(&max_err, 1, MPI_REAL, amrex::ParallelDescriptor::ioProcessor, amrex::ParallelDescriptor::Communicator());
Expand Down

0 comments on commit 12f4599

Please sign in to comment.