Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix wheels
  • Loading branch information
prehner committed Jan 6, 2026
commit 768b94dcf022be3e5c53f958358487a522ff8d48
16 changes: 9 additions & 7 deletions py-feos/src/dft/profile.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
macro_rules! impl_profile {
($struct:ident, $arr:ident, $arr2:ident, $si_arr:ident, $si_arr2:ident, $py_arr2:ident, [$([$ind:expr, $ax:ident]),+]$(, $si_arr3:ident)?) => {


#[pymethods]
impl $struct {
/// Calculate the residual for the given profile.
Expand Down Expand Up @@ -118,7 +120,7 @@ macro_rules! impl_profile {
fn entropy_density(
&mut self,
contributions: PyContributions,
) -> PyResult<typenum::Quot<Entropy<$si_arr<f64>>, Volume>> {
) -> PyResult<<Entropy<$si_arr<f64>> as std::ops::Div<Volume>>::Output> {
Ok(self.0.profile.entropy_density(contributions.into()).map_err(PyFeosError::from)?)
}

Expand Down Expand Up @@ -166,33 +168,33 @@ macro_rules! impl_profile {
}
$(
#[getter]
fn get_drho_dmu(&self) -> PyResult<typenum::Quot<Density<$si_arr3<f64>>, MolarEnergy>> {
fn get_drho_dmu(&self) -> PyResult<<Density<$si_arr3<f64>> as std::ops::Div<MolarEnergy>>::Output> {
Ok(self.0.profile.drho_dmu().map_err(PyFeosError::from)?)
}
)?

#[getter]
fn get_dn_dmu(&self) -> PyResult<typenum::Quot<Moles<DMatrix<f64>>, MolarEnergy>> {
fn get_dn_dmu(&self) -> PyResult<<Moles<DMatrix<f64>> as std::ops::Div<MolarEnergy>>::Output> {
Ok(self.0.profile.dn_dmu().map_err(PyFeosError::from)?)
}

#[getter]
fn get_drho_dp(&self) -> PyResult<typenum::Quot<Density<$si_arr2<f64>>, Pressure>> {
fn get_drho_dp(&self) -> PyResult<<Density<$si_arr2<f64>> as std::ops::Div<Pressure>>::Output> {
Ok(self.0.profile.drho_dp().map_err(PyFeosError::from)?)
}

#[getter]
fn get_dn_dp(&self) -> PyResult<typenum::Quot<Moles<DVector<f64>>, Pressure>> {
fn get_dn_dp(&self) -> PyResult<<Moles<DVector<f64>> as std::ops::Div<Pressure>>::Output> {
Ok(self.0.profile.dn_dp().map_err(PyFeosError::from)?)
}

#[getter]
fn get_drho_dt(&self) -> PyResult<typenum::Quot<Density<$si_arr2<f64>>, Temperature>> {
fn get_drho_dt(&self) -> PyResult<<Density<$si_arr2<f64>> as std::ops::Div<Temperature>>::Output> {
Ok(self.0.profile.drho_dt().map_err(PyFeosError::from)?)
}

#[getter]
fn get_dn_dt(&self) -> PyResult<typenum::Quot<Moles<DVector<f64>>, Temperature>> {
fn get_dn_dt(&self) -> PyResult<<Moles<DVector<f64>> as std::ops::Div<Temperature>>::Output> {
Ok(self.0.profile.dn_dt().map_err(PyFeosError::from)?)
}
}
Expand Down