use pyo3::prelude::*;
pub fn register_module(py: Python<'_>, parent_module: &PyModule) -> PyResult<()>
{
let ideal = PyModule::new(py, "ideal")?;
super::thermodynamics::py::register_module(py, ideal)?;
parent_module.add_submodule(ideal)?;
ideal.add_class::<Ideal>()?;
Ok(())
}
#[pyclass]
pub struct Ideal
{
#[pyo3(get)]
pub hinge_mass: f64,
#[pyo3(get)]
pub link_length: f64,
#[pyo3(get)]
pub number_of_links: u8,
#[pyo3(get)]
pub thermodynamics: super::thermodynamics::py::Ideal
}
#[pymethods]
impl Ideal
{
#[new]
pub fn init(number_of_links: u8, link_length: f64, hinge_mass: f64) -> Self
{
Ideal
{
hinge_mass,
link_length,
number_of_links,
thermodynamics: super::thermodynamics::py::Ideal::init(number_of_links, link_length, hinge_mass)
}
}
}