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