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)));
79 pybind11::buffer_info(
82 pybind11::format_descriptor<T>::format(),
86 std::vector<pybind11::ssize_t>{
87 static_cast<pybind11::ssize_t>(property->size() /
89 static_cast<pybind11::ssize_t>(
91 std::vector<pybind11::ssize_t>{
92 static_cast<pybind11::ssize_t>(sizeof(T) *
94 static_cast<pybind11::ssize_t>(sizeof(T))}
100 OGS_FATAL(
"Could not insert data array '{}' into internal map.",
103 INFO(
"insert data array '{}' with address: {}", name,
104 fmt::ptr(&(it->second)));