MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / init_boundary_node_adjacencies

Method init_boundary_node_adjacencies

tools/Assembler/Mesh/TetrahedronMesh.cpp:211–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211void TetrahedronMesh::init_boundary_node_adjacencies() {
212 std::vector<size_t> bv_adj;
213 std::vector<size_t> bv_adj_idx;
214
215 const size_t num_boundary_nodes = getNbrBoundaryNodes();
216 for (size_t i=0; i<num_boundary_nodes; i++) {
217 bv_adj_idx.push_back(bv_adj.size());
218 size_t vi = getBoundaryNode(i);
219 const VectorI neighbors = getNodeAdjacentNodes(vi);
220 for (size_t j=0; j<neighbors.size(); j++) {
221 size_t vj = neighbors[j];
222 if (!isBoundaryNode(vj)) continue;
223 bv_adj.push_back(getBoundaryIndex(vj));
224 }
225 }
226 bv_adj_idx.push_back(bv_adj.size());
227
228 m_bd_node_adj.resize(bv_adj.size());
229 m_bd_node_adj_idx.resize(bv_adj_idx.size());
230 std::copy(bv_adj.begin(), bv_adj.end(), m_bd_node_adj.data());
231 std::copy(bv_adj_idx.begin(), bv_adj_idx.end(), m_bd_node_adj_idx.data());
232}
233
234

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected