use crate::py::finite_element_space::PyFiniteElementSpace;
use crate::py::mesh::PyMesh;
use pyo3::prelude::*;
use pyrucast_macros::py_op;
#[py_op(method_on = PyFiniteElementSpace)]
#[cfg_attr(feature = "stub-gen", pyo3_stub_gen::derive::gen_stub_pyfunction)]
#[pyfunction]
#[pyo3(name = "restrict_fespace")]
pub fn restrict(fespace: PyRef<PyFiniteElementSpace>, mesh: PyRef<PyMesh>) -> PyFiniteElementSpace {
PyFiniteElementSpace {
inner: crate::ops::finite_element_space::restrict(&fespace.inner, &mesh.inner),
}
}