OGS
ProcessLib::LIE::anonymous_namespace{PostUtils.cpp} Namespace Reference

Functions

bool includesNodeID (std::vector< MeshLib::Node * > const &vec_nodes, std::size_t node_id)
 
std::vector< int > const & getMaterialIdsForNode (std::vector< std::pair< std::size_t, std::vector< int >>> const &vec_nodeID_matIDs, std::size_t nodeID)
 

Function Documentation

◆ getMaterialIdsForNode()

std::vector<int> const& ProcessLib::LIE::anonymous_namespace{PostUtils.cpp}::getMaterialIdsForNode ( std::vector< std::pair< std::size_t, std::vector< int >>> const &  vec_nodeID_matIDs,
std::size_t  nodeID 
)

Definition at line 30 of file PostUtils.cpp.

34 {
35  auto itr =
36  std::find_if(vec_nodeID_matIDs.begin(), vec_nodeID_matIDs.end(),
37  [&](std::pair<std::size_t, std::vector<int>> const& entry)
38  { return entry.first == nodeID; });
39  assert(itr != vec_nodeID_matIDs.end());
40  return itr->second;
41 };

Referenced by ProcessLib::LIE::PostProcessTool::PostProcessTool().

◆ includesNodeID()

bool ProcessLib::LIE::anonymous_namespace{PostUtils.cpp}::includesNodeID ( std::vector< MeshLib::Node * > const &  vec_nodes,
std::size_t  node_id 
)

Definition at line 22 of file PostUtils.cpp.

24 {
25  return std::any_of(vec_nodes.begin(), vec_nodes.end(),
26  [&](MeshLib::Node const* node)
27  { return node->getID() == node_id; });
28 }

Referenced by ProcessLib::LIE::PostProcessTool::PostProcessTool().