diff --git a/src/interface/meshblock_data.hpp b/src/interface/meshblock_data.hpp index a0fb115b1189..9fab1f354674 100644 --- a/src/interface/meshblock_data.hpp +++ b/src/interface/meshblock_data.hpp @@ -76,9 +76,9 @@ class MeshBlockData { MeshBlock *GetParentPointer() const { return GetBlockPointer(); } void SetAllowedDt(const Real dt) const { GetBlockPointer()->SetAllowedDt(dt); } Mesh *GetMeshPointer() const { return GetBlockPointer()->pmy_mesh; } - + // This mirrors a MeshBlockData routine - int NumBlocks() const { return 1;} + int NumBlocks() const { return 1; } template IndexRange GetBoundsI(Ts &&...args) const { diff --git a/src/interface/metadata.cpp b/src/interface/metadata.cpp index 52e73798e177..244a1860363e 100644 --- a/src/interface/metadata.cpp +++ b/src/interface/metadata.cpp @@ -251,12 +251,13 @@ bool Metadata::IsValid(bool throw_on_fail) const { PARTHENON_THROW("Either the Independent or Derived flag must be set"); } } - + if (IsSet(FillGhost) && IsSet(CellMemAligned) && (!IsSet(Cell))) { valid = false; if (throw_on_fail) { - PARTHENON_THROW("Cannot communicate ghosts of non-cell fields that have cell aligned memory."); - } + PARTHENON_THROW( + "Cannot communicate ghosts of non-cell fields that have cell aligned memory."); + } } // Prolongation/restriction @@ -325,10 +326,10 @@ Metadata::GetArrayDims(std::weak_ptr wpmb, bool coarse) const { } else if (IsSet(Node)) { arrDims[MAX_VARIABLE_DIMENSION - 1] = 1; // Only one lower left node per cell } - if (!IsSet(CellMemAligned) && !IsSet(Cell)) { + if (!IsSet(CellMemAligned) && !IsSet(Cell)) { arrDims[0]++; if (arrDims[1] > 1) arrDims[1]++; - if (arrDims[2] > 1) arrDims[2]++; + if (arrDims[2] > 1) arrDims[2]++; } } else if (IsSet(Particle)) { assert(N >= 0 && N <= MAX_VARIABLE_DIMENSION - 1); diff --git a/src/interface/metadata.hpp b/src/interface/metadata.hpp index a6008625072d..ca8afeddbe54 100644 --- a/src/interface/metadata.hpp +++ b/src/interface/metadata.hpp @@ -693,7 +693,6 @@ Set_t GetByFlag(const Metadata::FlagCollection &flags, NameMap_t &nameMap, return out; } } // namespace MetadataUtils - } // namespace parthenon #endif // INTERFACE_METADATA_HPP_ diff --git a/src/interface/sparse_pack_base.cpp b/src/interface/sparse_pack_base.cpp index d85deced41c9..d4ead84113c8 100644 --- a/src/interface/sparse_pack_base.cpp +++ b/src/interface/sparse_pack_base.cpp @@ -75,7 +75,8 @@ SparsePackBase::GetAllocStatus(T *pmd, const PackDescriptor &desc, const auto &uid_map = pmbd->GetUidMap(); for (int i = 0; i < nvar; ++i) { for (const auto &[var_name, uid] : desc.var_groups[i]) { - astat[idx++] = uid_map.count(uid) > 0 ? (uid_map.at(uid))->GetAllocationStatus() : -1; + astat[idx++] = + uid_map.count(uid) > 0 ? (uid_map.at(uid))->GetAllocationStatus() : -1; } } }); diff --git a/src/interface/sparse_pack_base.hpp b/src/interface/sparse_pack_base.hpp index 7e0e524c4db5..4b01547d7b04 100644 --- a/src/interface/sparse_pack_base.hpp +++ b/src/interface/sparse_pack_base.hpp @@ -162,10 +162,10 @@ struct PackDescriptor { const std::size_t nvar_tot; private: - static int GetNVarsTotal(const std::vector &var_groups) { - int nvar_tot = 0; - for (const auto &group : var_groups) { - for (const auto &[a, b] : group) { + static int GetNVarsTotal(const std::vector &var_groups) { + int nvar_tot = 0; + for (const auto &group : var_groups) { + for (const auto &[a, b] : group) { nvar_tot++; } }