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

Method range

cpp/dolfinx/geometry/BoundingBoxTree.h:213–222  ·  view source on GitHub ↗

@brief Return a range of entity indices of the given topological dimension (including ghosts). @param topology Topology to get entities from. @param tdim Dimension of the entities. @return Range of local indices, including ghosts.

Source from the content-addressed store, hash-verified

211 /// @param tdim Dimension of the entities.
212 /// @return Range of local indices, including ghosts.
213 static std::vector<std::int32_t> range(mesh::Topology& topology, int tdim)
214 {
215 topology.create_entities(tdim);
216 auto map = topology.index_map(tdim);
217 assert(map);
218 const std::int32_t num_entities = map->size_local() + map->num_ghosts();
219 std::vector<std::int32_t> r(num_entities);
220 std::iota(r.begin(), r.end(), 0);
221 return r;
222 }
223
224public:
225 /// Constructor

Callers

nothing calls this directly

Calls 4

size_localMethod · 0.80
num_ghostsMethod · 0.80
create_entitiesMethod · 0.45
index_mapMethod · 0.45

Tested by

no test coverage detected