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 26 of file PostUtils.cpp.

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

References getMaterialIdsForNode().

Referenced by getMaterialIdsForNode().

◆ includesNodeID()

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

Definition at line 18 of file PostUtils.cpp.

20{
21 return std::any_of(vec_nodes.begin(), vec_nodes.end(),
22 [&](MeshLib::Node const* node)
23 { return node->getID() == node_id; });
24}

References includesNodeID().

Referenced by includesNodeID().