From 8ac1269271e34f7603bc62d5dc4878998dfdab52 Mon Sep 17 00:00:00 2001 From: Dmitrij Naumov <dmitrij@naumov.de> Date: Tue, 24 Feb 2015 13:12:02 +0000 Subject: [PATCH] [AL] Better name for component id. --- AssemblerLib/MeshComponentMap.cpp | 9 +++++---- AssemblerLib/MeshComponentMap.h | 10 +++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/AssemblerLib/MeshComponentMap.cpp b/AssemblerLib/MeshComponentMap.cpp index c041cc66613..37fae81db48 100644 --- a/AssemblerLib/MeshComponentMap.cpp +++ b/AssemblerLib/MeshComponentMap.cpp @@ -104,19 +104,20 @@ std::vector<std::size_t> MeshComponentMap::getComponentIDs(const Location &l) co return vec_compID; } -Line MeshComponentMap::getLine(Location const& l, std::size_t const c) const +Line MeshComponentMap::getLine(Location const& l, + std::size_t const comp_id) const { auto const &m = _dict.get<ByLocationAndComponent>(); - auto const itr = m.find(Line(l, c)); + auto const itr = m.find(Line(l, comp_id)); assert(itr != m.end()); // The line must exist in the current dictionary. return *itr; } std::size_t MeshComponentMap::getGlobalIndex(Location const& l, - std::size_t const c) const + std::size_t const comp_id) const { auto const &m = _dict.get<ByLocationAndComponent>(); - auto const itr = m.find(Line(l, c)); + auto const itr = m.find(Line(l, comp_id)); return itr!=m.end() ? itr->global_index : nop; } diff --git a/AssemblerLib/MeshComponentMap.h b/AssemblerLib/MeshComponentMap.h index a3e1f6f7507..a4a3dbfb81b 100644 --- a/AssemblerLib/MeshComponentMap.h +++ b/AssemblerLib/MeshComponentMap.h @@ -65,12 +65,12 @@ public: /// | l | comp_id_n | std::vector<std::size_t> getComponentIDs(const Location &l) const; - /// Global index of the given component \c c at given location \c l. + /// Global index of the given component id at given location \c l. /// /// | Location | ComponentID | GlobalIndex | /// | -------- | ----------- | ----------- | - /// | l | c | gi | - std::size_t getGlobalIndex(Location const &l, std::size_t const c) const; + /// | l | comp_id | gi | + std::size_t getGlobalIndex(Location const &l, std::size_t const comp_id) const; /// Global indices for all components at the given location \c l. /// @@ -141,10 +141,10 @@ private: { } /// Looks up if a line is already stored in the dictionary. - /// \attention The line for the location l and component c must exist, + /// \attention The line for the location l and component id must exist, /// the behaviour is undefined otherwise. /// \return a copy of the line. - detail::Line getLine(Location const& l, std::size_t const c) const; + detail::Line getLine(Location const& l, std::size_t const component_id) const; void renumberByLocation(std::size_t offset=0); -- GitLab