Skip to content

Commit 9247bb4

Browse files
committed
small but very important fix
1 parent 1afbdc9 commit 9247bb4

File tree

1 file changed

+3
-3
lines changed
  • feos-saft/src/association

1 file changed

+3
-3
lines changed

feos-saft/src/association/dft.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ where
1616
P: HardSphereProperties,
1717
{
1818
fn weight_functions(&self, temperature: N) -> WeightFunctionInfo<N> {
19-
let p: &P = &self.parameters;
19+
let p = &self.parameters;
2020
let r = p.hs_diameter(temperature) * 0.5;
2121
let [_, _, _, c3] = p.geometry_coefficients(temperature);
2222
WeightFunctionInfo::new(p.component_index().into_owned(), false)
@@ -47,7 +47,7 @@ where
4747
temperature: N,
4848
weighted_densities: ArrayView2<N>,
4949
) -> EosResult<Array1<N>> {
50-
let p: &P = &self.parameters;
50+
let p = &self.parameters;
5151

5252
// number of segments
5353
let n = self.association_parameters.component_index.len();
@@ -97,7 +97,7 @@ where
9797
let n2 = n2i.sum_axis(Axis(0));
9898
let mut xi = n2v
9999
.iter()
100-
.fold(Array::zeros(n2.raw_dim()), |acc, n2v| acc + n2v)
100+
.fold(Array::zeros(n2.raw_dim()), |acc, n2v| acc + n2v * n2v)
101101
/ -(&n2 * &n2)
102102
+ 1.0;
103103
xi.iter_mut()

0 commit comments

Comments
 (0)