1#include <pybind11/pybind11.h>
2#include <pybind11/stl.h>
3#include <pybind11/stl_bind.h>
4#include <pybind11/numpy.h>
12namespace py = pybind11;
15 py::class_<serif::polytrope::PolySolver>(polytrope_submodule,
"PolySolver")
16 .def(py::init<double, int>(), py::arg(
"polytropic_index"), py::arg(
"FEM_order"))
23 py::class_<serif::polytrope::PolytropeOperator, mfem::Operator>(polytrope_submodule,
"PolytropeOperator")
void solve() const
Solves the polytropic system.
mfem::GridFunction & getPhi() const
Gets a reference to the solution grid function for .
mfem::GridFunction & getTheta() const
Gets a reference to the solution grid function for .
double getN() const
Gets the polytropic index .
double getOrder() const
Gets the finite element order used for the variable.
void Mult(const mfem::Vector &xFree, mfem::Vector &yFree) const override
Applies the PolytropeOperator: y = F(x). This computes the residual of the nonlinear system.
void register_polytrope_bindings(pybind11::module &polytrope_submodule)
Registers C++ classes and functions from the serif::polytrope namespace to Python.
Declares the function to register polytrope module C++ components with pybind11.