30 INFO(
"found data array '{}' with address: {}", name,
31 fmt::ptr(&(data_array_it->second)));
32 return data_array_it->second;
35 auto& mesh_properties =
_mesh.getProperties();
38 auto*
property = mesh_properties.getPropertyVector<T>(name);
39 if (property ==
nullptr)
41 OGS_FATAL(
"Couldn't access data array '{}'.", name);
45 auto capsule = pybind11::capsule(property, [](
void* ) {});
47 auto const n_components =
property->getNumberOfGlobalComponents();
48 if (n_components == 1)
53 pybind11::buffer_info(
56 pybind11::format_descriptor<T>::format(),
66 OGS_FATAL(
"Could not insert data array '{}' into internal map.",
69 INFO(
"insert data array '{}' with address: {}", name,
70 fmt::ptr(&(it->second)));
78 pybind11::buffer_info(
81 pybind11::format_descriptor<T>::format(),
85 std::vector<pybind11::ssize_t>{
86 static_cast<pybind11::ssize_t>(property->size() /
88 static_cast<pybind11::ssize_t>(
90 std::vector<pybind11::ssize_t>{
91 static_cast<pybind11::ssize_t>(sizeof(T) *
93 static_cast<pybind11::ssize_t>(sizeof(T))}
98 OGS_FATAL(
"Could not insert data array '{}' into internal map.",
101 INFO(
"insert data array '{}' with address: {}", name,
102 fmt::ptr(&(it->second)));