SERiF 0.0.1a
3+1D Stellar Structure and Evolution
Loading...
Searching...
No Matches
bindings.cpp File Reference
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/stl_bind.h>
#include <pybind11/numpy.h>
#include "bindings.h"
#include "EOSio.h"
#include "helm.h"
#include "polySolver.h"
#include "mfem.hpp"

Go to the source code of this file.

Functions

void register_polytrope_bindings (pybind11::module &polytrope_submodule)
 Registers C++ classes and functions from the serif::polytrope namespace to Python.
 

Function Documentation

◆ register_polytrope_bindings()

void register_polytrope_bindings ( pybind11::module & polytrope_submodule)

Registers C++ classes and functions from the serif::polytrope namespace to Python.

This function takes a pybind11::module object, representing the serif.polytrope Python submodule, and adds bindings for various components like PolytropeOperator, PolySolver, etc. This allows these C++ components to be instantiated and used directly from Python.

Parameters
polytrope_submoduleThe pybind11 module (typically serif.polytrope) to which the polytrope C++ bindings will be added.
Python Usage Example:
After these bindings are registered and the Python module is imported:
from serif.polytrope import PolySolver
polytrope = PolySolver(1.5, 1)
polytrope.solve()

Definition at line 14 of file bindings.cpp.