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

Method init_boundary_nodes

tools/Assembler/Mesh/TetrahedronMesh.cpp:186–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186void TetrahedronMesh::init_boundary_nodes() {
187 const size_t dim = getDim();
188 const size_t num_faces = m_mesh->get_num_faces();
189 const size_t num_vertices = m_mesh->get_num_vertices();
190 const size_t vertex_per_face = m_mesh->get_vertex_per_face();
191 const VectorI& faces = m_mesh->get_faces();
192
193 size_t count = 1;
194 m_boundary_idx = VectorI::Zero(num_vertices);
195 for (size_t i=0; i<num_faces * vertex_per_face; i++) {
196 if (m_boundary_idx[faces[i]] == 0) {
197 m_boundary_idx[faces[i]] = count;
198 count ++;
199 }
200 }
201 m_boundary_idx.array() -= 1;
202
203 m_boundary.resize(count-1);
204 for (size_t i=0; i<num_vertices; i++) {
205 if (m_boundary_idx[i] >= 0) {
206 m_boundary[m_boundary_idx[i]] = i;
207 }
208 }
209}
210
211void TetrahedronMesh::init_boundary_node_adjacencies() {
212 std::vector<size_t> bv_adj;

Callers

nothing calls this directly

Calls 4

get_num_facesMethod · 0.45
get_num_verticesMethod · 0.45
get_vertex_per_faceMethod · 0.45
get_facesMethod · 0.45

Tested by

no test coverage detected