--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/dolfinx_access/nanobind_helpers.h Thu Feb 26 09:32:12 2026 -0500 @@ -0,0 +1,25 @@ +#pragma once +#include <cmath> + +#pragma once +#include <dolfinx/fem/Function.h> + +#pragma once +#include <Python.h> + +namespace dolfinx_access { + using namespace dolfinx::fem; + + using PyObject = ::PyObject; + typedef Function<double> Function_f64; + + const Function_f64* cast_Function_f64(const PyObject* obj); + Function_f64* cast_mut_Function_f64(PyObject* obj); + + bool check_Function_f64(const PyObject* obj); + + PyObject* wrap_Function_f64(Function_f64* f); + +} // namespace dolfinx_access + +extern "C" PyObject* PyInit_dolfinx_access();