Skip to content
Snippets Groups Projects
Commit c0f304e1 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

MeshComponentMap: Remove not required header. Use nop. Correct doc.

parent 7ec24157
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
*/ */
#include <iostream> #include <iostream>
#include <numeric>
#include <boost/range/algorithm/for_each.hpp> #include <boost/range/algorithm/for_each.hpp>
...@@ -79,8 +78,7 @@ std::size_t MeshComponentMap::getGlobalIndex(Location const& l, ...@@ -79,8 +78,7 @@ std::size_t MeshComponentMap::getGlobalIndex(Location const& l,
{ {
auto const &m = _dict.get<ByLocationAndComponent>(); auto const &m = _dict.get<ByLocationAndComponent>();
auto const itr = m.find(Line(l, c)); auto const itr = m.find(Line(l, c));
return itr!=m.end() ? itr->global_index return itr!=m.end() ? itr->global_index : nop;
: std::numeric_limits<std::size_t>::max();
} }
std::vector<std::size_t> MeshComponentMap::getGlobalIndices(const Location &l) const std::vector<std::size_t> MeshComponentMap::getGlobalIndices(const Location &l) const
......
...@@ -53,11 +53,11 @@ public: ...@@ -53,11 +53,11 @@ public:
/// Component ids at given location \c l. /// Component ids at given location \c l.
/// ///
/// | Location | ComponentID | GlobalIndex | /// | Location | ComponentID |
/// | -------- | ----------- | ----------- | /// | -------- | ----------- |
/// | l | comp_id_1 | gi23 | /// | l | comp_id_1 |
/// | l | ... | ... | /// | l | ... |
/// | l | comp_id_n | gi45 | /// | l | comp_id_n |
std::vector<std::size_t> getComponentIDs(const Location &l) const; 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 \c c at given location \c l.
...@@ -74,14 +74,9 @@ public: ...@@ -74,14 +74,9 @@ public:
/// ///
/// | Location | ComponentID | GlobalIndex | /// | Location | ComponentID | GlobalIndex |
/// | -------- | ----------- | ----------- | /// | -------- | ----------- | ----------- |
/// | l_1 | comp_id_1 | gi23 | /// | l | comp_id_1 | gi23 |
/// | ... | ... | ... |
/// | l_1 | comp_id_k | gi45 |
/// | l_2 | comp_id_1 | gi56 |
/// | ... | ... | ... |
/// | l_2 | comp_id_m | gi67 |
/// | ... | ... | ... | /// | ... | ... | ... |
/// | l_n | comp_id_n | gi78 | /// | l | comp_id_k | gi45 |
std::vector<std::size_t> getGlobalIndices(const Location &l) const; std::vector<std::size_t> getGlobalIndices(const Location &l) const;
/// Global indices for all components at all given locations \c ls ordered /// Global indices for all components at all given locations \c ls ordered
...@@ -94,7 +89,7 @@ public: ...@@ -94,7 +89,7 @@ public:
/// | l_1 | comp_id_1 | gi23 | /// | l_1 | comp_id_1 | gi23 |
/// | ... | ... | ... | /// | ... | ... | ... |
/// | l_1 | comp_id_k | gi45 | /// | l_1 | comp_id_k | gi45 |
/// | l_2 | comp_id_1 | gi56 | /// | l_2 | comp_id_1 | gi46 |
/// | ... | ... | ... | /// | ... | ... | ... |
/// | l_2 | comp_id_m | gi67 | /// | l_2 | comp_id_m | gi67 |
/// | ... | ... | ... | /// | ... | ... | ... |
...@@ -107,7 +102,7 @@ public: ...@@ -107,7 +102,7 @@ public:
/// | l_1 | comp_id_1 | gi23 | /// | l_1 | comp_id_1 | gi23 |
/// | ... | ... | ... | /// | ... | ... | ... |
/// | l_k | comp_id_1 | gi45 | /// | l_k | comp_id_1 | gi45 |
/// | l_1 | comp_id_2 | gi56 | /// | l_1 | comp_id_2 | gi46 |
/// | ... | ... | ... | /// | ... | ... | ... |
/// | l_m | comp_id_2 | gi78 | /// | l_m | comp_id_2 | gi78 |
/// | ... | ... | ... | /// | ... | ... | ... |
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment