From cef604fa21959b3df2ccfbde43f37400c63ddf50 Mon Sep 17 00:00:00 2001 From: Luke Roberts Date: Fri, 1 Nov 2024 15:54:02 -0600 Subject: [PATCH] format and lint --- src/bvals/comms/combined_buffers.cpp | 11 ++++++----- src/bvals/comms/combined_buffers.hpp | 7 ++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/bvals/comms/combined_buffers.cpp b/src/bvals/comms/combined_buffers.cpp index d284315dc0ff..99a5d9563f9f 100644 --- a/src/bvals/comms/combined_buffers.cpp +++ b/src/bvals/comms/combined_buffers.cpp @@ -166,8 +166,8 @@ void CombinedBuffersRankPartition::AddVarBoundary( //---------------------------------------------------------------------------------------- CombinedBuffersRank::CombinedBuffersRank(int o_rank, BoundaryType b_type, bool send, mpi_comm_t comm, Mesh *pmesh) - : other_rank(o_rank), b_type(b_type), sender(send), buffers_built(false), - comm_(comm), pmesh(pmesh) { + : other_rank(o_rank), b_type(b_type), sender(send), buffers_built(false), comm_(comm), + pmesh(pmesh) { int tag = 1234 + static_cast(GetAssociatedSender(b_type)); if (sender) { @@ -314,9 +314,10 @@ void CombinedBuffers::AddSendBuffer(int partition, MeshBlock *pmb, const std::shared_ptr> &var, BoundaryType b_type) { if (combined_send_buffers.count({nb.rank, b_type}) == 0) - combined_send_buffers.emplace(std::make_pair( - std::make_pair(nb.rank, b_type), - CombinedBuffersRank(nb.rank, b_type, true, comms_[GetAssociatedSender(b_type)], pmesh))); + combined_send_buffers.emplace( + std::make_pair(std::make_pair(nb.rank, b_type), + CombinedBuffersRank(nb.rank, b_type, true, + comms_[GetAssociatedSender(b_type)], pmesh))); combined_send_buffers.at({nb.rank, b_type}).AddSendBuffer(partition, pmb, nb, var); } diff --git a/src/bvals/comms/combined_buffers.hpp b/src/bvals/comms/combined_buffers.hpp index 802ff1438b72..12c3d2a50179 100644 --- a/src/bvals/comms/combined_buffers.hpp +++ b/src/bvals/comms/combined_buffers.hpp @@ -104,7 +104,8 @@ struct CombinedBuffersRank { Mesh *pmesh; bool sender{true}; - CombinedBuffersRank(int o_rank, BoundaryType b_type, bool send, mpi_comm_t comm, Mesh *pmesh); + explicit CombinedBuffersRank(int o_rank, BoundaryType b_type, bool send, + mpi_comm_t comm, Mesh *pmesh); void AddSendBuffer(int partition, MeshBlock *pmb, const NeighborBlock &nb, const std::shared_ptr> &var); @@ -131,9 +132,9 @@ struct CombinedBuffers { std::map comms_; - Mesh *pmesh; + Mesh *pmesh; - CombinedBuffers(Mesh *pmesh) : pmesh(pmesh) { + explicit CombinedBuffers(Mesh *pmesh) : pmesh(pmesh) { #ifdef MPI_PARALLEL // TODO(LFR): Switch to a different communicator for each BoundaryType pair for (auto b_type :