diff --git a/AssemblerLib/MeshComponentMap.cpp b/AssemblerLib/MeshComponentMap.cpp index c201ca0e7e6d94d69ca15448bd6fc137d1769cfc..8c550d51005c44b84aadf7e533b71d4ffcf38fdb 100644 --- a/AssemblerLib/MeshComponentMap.cpp +++ b/AssemblerLib/MeshComponentMap.cpp @@ -11,7 +11,6 @@ */ #include <iostream> -#include <numeric> #include <boost/range/algorithm/for_each.hpp> @@ -79,8 +78,7 @@ std::size_t MeshComponentMap::getGlobalIndex(Location const& l, { auto const &m = _dict.get<ByLocationAndComponent>(); auto const itr = m.find(Line(l, c)); - return itr!=m.end() ? itr->global_index - : std::numeric_limits<std::size_t>::max(); + return itr!=m.end() ? itr->global_index : nop; } std::vector<std::size_t> MeshComponentMap::getGlobalIndices(const Location &l) const diff --git a/AssemblerLib/MeshComponentMap.h b/AssemblerLib/MeshComponentMap.h index 3573bc42034741add87494ed513f884332954de6..b4543e1c7432936d868acc633c323fb6e00465c9 100644 --- a/AssemblerLib/MeshComponentMap.h +++ b/AssemblerLib/MeshComponentMap.h @@ -53,11 +53,11 @@ public: /// Component ids at given location \c l. /// - /// | Location | ComponentID | GlobalIndex | - /// | -------- | ----------- | ----------- | - /// | l | comp_id_1 | gi23 | - /// | l | ... | ... | - /// | l | comp_id_n | gi45 | + /// | Location | ComponentID | + /// | -------- | ----------- | + /// | l | comp_id_1 | + /// | l | ... | + /// | 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. @@ -74,14 +74,9 @@ public: /// /// | Location | ComponentID | GlobalIndex | /// | -------- | ----------- | ----------- | - /// | l_1 | comp_id_1 | gi23 | - /// | ... | ... | ... | - /// | l_1 | comp_id_k | gi45 | - /// | l_2 | comp_id_1 | gi56 | - /// | ... | ... | ... | - /// | l_2 | comp_id_m | gi67 | + /// | l | comp_id_1 | gi23 | /// | ... | ... | ... | - /// | l_n | comp_id_n | gi78 | + /// | l | comp_id_k | gi45 | std::vector<std::size_t> getGlobalIndices(const Location &l) const; /// Global indices for all components at all given locations \c ls ordered @@ -94,7 +89,7 @@ public: /// | l_1 | comp_id_1 | gi23 | /// | ... | ... | ... | /// | l_1 | comp_id_k | gi45 | - /// | l_2 | comp_id_1 | gi56 | + /// | l_2 | comp_id_1 | gi46 | /// | ... | ... | ... | /// | l_2 | comp_id_m | gi67 | /// | ... | ... | ... | @@ -107,7 +102,7 @@ public: /// | l_1 | comp_id_1 | gi23 | /// | ... | ... | ... | /// | l_k | comp_id_1 | gi45 | - /// | l_1 | comp_id_2 | gi56 | + /// | l_1 | comp_id_2 | gi46 | /// | ... | ... | ... | /// | l_m | comp_id_2 | gi78 | /// | ... | ... | ... |