I want to add an optional argument cells
to determine_point_ownership
. I have a working small commit at the following url: https://github.com/FEniCS/dolfinx/compare/main…ordinary-slim:dolfinx:main
I would like to submit a PR. The issue is I get a stringpop overflow warning when I compile the dolfinx/python/dolfinx/wrappers/geometry.cpp
:
inlined from 'constexpr void fmt::v9::detail::format_dragon(basic_fp<__int128 unsigned>, unsigned
int, int, buffer<char>&, int&)' at /usr/include/fmt/format.h:3011:29:
/usr/include/c++/13/bits/stl_algobase.h:437:30: warning: 'void* __builtin_memmove(void*,
const void*, long unsigned int)' writing between 5 and 9223372036854775807 bytes into a region
of size 4 overflows the destination [-Wstringop-overflow=]
437 | __builtin_memmove(__result, __first, sizeof(_Tp) * _Num);
This is the slightly modified wrapper of determine_point_ownership
:
m.def("determine_point_ownership",
[](const dolfinx::mesh::Mesh<T>& mesh,
nb::ndarray<const T, nb::c_contig> points,
nb::ndarray<const std::int32_t, nb::ndim<1>, nb::c_contig> cells,
const T padding)
{
const std::size_t p_s0 = points.ndim() == 1 ? 1 : points.shape(0);
std::span<const T> _p(points.data(), 3 * p_s0);
return dolfinx::geometry::determine_point_ownership<T>(mesh, _p,
std::span(cells.data(), cells.size()),
padding);
},
nb::arg("mesh"), nb::arg("points"), nb::arg("cells"), nb::arg("padding"),
"Compute PointOwnershipData for mesh-points pair.");
Could somebody have a look at my code please?