MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / get_simplices

Method get_simplices

cpp/dolfinx/refinement/plaza.cpp:251–271  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

249}
250//-----------------------------------------------------------------------------
251std::pair<std::array<std::int32_t, 32>, std::size_t>
252plaza::impl::get_simplices(std::span<const std::int64_t> indices,
253 std::span<const std::int32_t> longest_edge, int tdim,
254 bool uniform)
255{
256 if (tdim == 2)
257 {
258 assert(longest_edge.size() == 1);
259 auto [_d, size] = get_triangles(indices, longest_edge[0], uniform);
260 std::array<std::int32_t, 32> d;
261 std::copy_n(_d.begin(), size, d.begin());
262 return {d, size};
263 }
264 else if (tdim == 3)
265 {
266 assert(longest_edge.size() == 4);
267 return get_tetrahedra(indices, longest_edge);
268 }
269 else
270 throw std::runtime_error("Topological dimension not supported");
271}
272//-----------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

get_trianglesFunction · 0.85
get_tetrahedraFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected