@@ -187,7 +187,12 @@ std::tuple<std::vector<T>, std::vector<T>> closest_point_projection(
187187 constexpr T eps = std::numeric_limits<T>::epsilon ();
188188 constexpr T roundoff_tol = 100 * eps;
189189
190+ #if DOLFINX_VERSION_MINOR >= 11
191+ const dolfinx::fem::CoordinateElement<T>& cmap
192+ = mesh.geometry ().cmaps ().front ();
193+ #else
190194 const dolfinx::fem::CoordinateElement<T>& cmap = mesh.geometry ().cmap ();
195+ #endif
191196 std::vector<T> closest_points (3 * cells.size (), T (0 ));
192197 assert (cells.size () == points.size () / 3 );
193198 std::vector<T> reference_points (cells.size () * tdim);
@@ -201,8 +206,13 @@ std::tuple<std::vector<T>, std::vector<T>> closest_point_projection(
201206 const std::size_t basis_data_size
202207 = std::reduce (tab_shape.begin (), tab_shape.end (), 1 , std::multiplies{});
203208
209+ #if DOLFINX_VERSION_MINOR >= 11
210+ md::mdspan<const std::int32_t , md::dextents<std::size_t , 2 >> x_dofmap
211+ = mesh.geometry ().dofmaps ().at (0 );
212+ #else
204213 md::mdspan<const std::int32_t , md::dextents<std::size_t , 2 >> x_dofmap
205214 = mesh.geometry ().dofmap (0 );
215+ #endif
206216 std::span<const T> x = mesh.geometry ().x ();
207217
208218 auto compute_chunk = [&](std::size_t c0, std::size_t c1)
0 commit comments