コード例 #1
0
boost::optional<EntityCollection<Node>>
NodeConnectivity::getNodeNeighbors(Node::Ptr const & vertex) const {
    NodeNeighbor_t::const_iterator it = node_neighbors_.find(vertex->id());
    if (it == node_neighbors_.end())
        return boost::optional<EntityCollection<Node>>();

    return boost::optional<EntityCollection<Node>>(it->second);
}
コード例 #2
0
boost::optional<EntityCollection<Cell>>
NodeConnectivity::getCellsAttachedToNode(Node::Ptr const & vertex) const {
    NodeCell_t::const_iterator it = node_cells_.find(vertex->id());
    if (it == node_cells_.end())
        return boost::optional<EntityCollection<Cell>>();

    return boost::optional<EntityCollection<Cell>>(it->second);
}
コード例 #3
0
void
GeometricalEntityMapper::addNode(Node::Ptr const & node, ComputationalNode::Ptr const & cnode) {
    node_map_[node->id()] = Link<Node, ComputationalNode>(node, cnode);
}