Skip to content

Commit 67426ec

Browse files
authored
Topology doc and code path improvements (#3577)
* Clean up topology * Small fixes * Doc fixes * Doc fix
1 parent 76080fb commit 67426ec

File tree

8 files changed

+338
-314
lines changed

8 files changed

+338
-314
lines changed

cpp/dolfinx/fem/dofmapbuilder.cpp

+9-4
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ build_basic_dofmaps(
209209
local_entity_offsets.back()
210210
+ num_entity_dofs * (im->size_local() + im->num_ghosts()));
211211

212-
if (d < D and !topology.connectivity({D, i}, {d, et_index}))
212+
if (d < D
213+
and !topology.connectivity({int(D), int(i)},
214+
{int(d), int(et_index)}))
213215
{
214216
throw std::runtime_error("Missing needed connectivity. Cell type:"
215217
+ std::to_string(i)
@@ -280,13 +282,16 @@ build_basic_dofmaps(
280282
const std::vector<std::vector<int>>& e_dofs_d = entity_dofs[d];
281283

282284
// Skip over undefined topology, e.g. quad facets of tetrahedra
283-
if (d < D and !topology.connectivity({D, i}, {d, et}))
285+
if (d < D
286+
and !topology.connectivity({int(D), int(i)}, {int(d), int(et)}))
284287
continue;
285288

286289
// Iterate over each entity of current dimension d and type et
287290
std::span<const std::int32_t> c_to_e
288-
= d < D ? topology.connectivity({D, i}, {d, et})->links(c)
289-
: std::span<const std::int32_t>(&c, 1);
291+
= d < D
292+
? topology.connectivity({int(D), int(i)}, {int(d), int(et)})
293+
->links(c)
294+
: std::span<const std::int32_t>(&c, 1);
290295

291296
int w = 0;
292297
for (std::size_t e = 0; e < e_dofs_d.size(); ++e)

cpp/dolfinx/mesh/Geometry.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ class Geometry
9797
/// Destructor
9898
~Geometry() = default;
9999

100-
/// Copy Assignment
100+
/// Copy assignment
101101
Geometry& operator=(const Geometry&) = delete;
102102

103-
/// Move Assignment
103+
/// Move assignment
104104
Geometry& operator=(Geometry&&) = default;
105105

106106
/// @brief Return dimension of the Euclidean coordinate system.
@@ -120,7 +120,7 @@ class Geometry
120120

121121
/// @brief Degree-of-freedom map associated with the `i`th coordinate
122122
/// map element in the geometry.
123-
/// @param i Index of the requested degree-of-freedom map. The
123+
/// @param[in] i Index of the requested degree-of-freedom map. The
124124
/// degree-of-freedom map corresponds to the geometry element
125125
/// `cmaps()[i]`.
126126
/// @return A dofmap array, with shape `(num_cells, dofs_per_cell)`.

0 commit comments

Comments
 (0)