Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Updated to `ndarray` 0.17 and `num-dual`0.13 to fix a broken dependency resolution. [#324](https://github.com/feos-org/feos/pull/324)

## [0.9.1] - 2025-11-24
### Fixed
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ categories = ["science"]

[workspace.dependencies]
quantity = "0.12"
num-dual = "0.12"
ndarray = "0.16"
num-dual = "0.13"
ndarray = "0.17"
nalgebra = "0.34"
thiserror = "2.0"
conv = "0.3"
Expand All @@ -41,7 +41,7 @@ rustfft = "6.0"
libm = "0.2"
gauss-quad = "0.2"
approx = "0.5"
criterion = "0.7"
criterion = "0.8"
paste = "1.0"

feos-core = { version = "0.9", path = "crates/feos-core" }
Expand Down
12 changes: 8 additions & 4 deletions crates/feos-dft/src/convolver/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,11 @@ impl<T: DualNum<f64> + DctNum> FourierTransform<T> for SphericalTransform<T> {
let mut f_aux = Array::zeros(f_k.raw_dim());
self.cosine_transform(&f_r * &self.r_grid, f_aux.view_mut(), false);
self.sine_transform(f_r, f_k.view_mut(), false);
f_k.assign(&(&f_k / &self.k_grid - &f_aux));
let f_k_scaled = &f_k / &self.k_grid - &f_aux;
f_k.assign(&f_k_scaled);
}
f_k.assign(&(&f_k / &self.k_grid));
let f_k_scaled = &f_k / &self.k_grid;
f_k.assign(&f_k_scaled);
f_k[0] = T::zero();
}

Expand All @@ -210,9 +212,11 @@ impl<T: DualNum<f64> + DctNum> FourierTransform<T> for SphericalTransform<T> {
let mut f_aux = Array::zeros(f_r.raw_dim());
self.cosine_transform(&f_k * &self.k_grid, f_aux.view_mut(), true);
self.sine_transform(f_k, f_r.view_mut(), true);
f_r.assign(&(&f_r / &self.r_grid - &f_aux));
let f_r_scaled = &f_r / &self.r_grid - &f_aux;
f_r.assign(&f_r_scaled);
}
f_r.assign(&(&f_r / &self.r_grid));
let f_r_scaled = &f_r / &self.r_grid;
f_r.assign(&f_r_scaled);
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/feos-dft/src/profile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ where
let mut value = profile.to_owned();
for (i, &w) in integration_weights.iter().enumerate() {
for mut l in value.lanes_mut(Axis_nd(i)) {
l.assign(&(&l * w));
l.mul_assign(w);
}
}
Volume::from_reduced(functional_determinant) * value.sum()
Expand Down
6 changes: 4 additions & 2 deletions crates/feos-dft/src/weight_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ impl<T: DualNum<f64> + Copy> WeightFunction<T> {

// Apply Lanczos sigma factor
if let Some(l) = lanczos {
w_i.assign(&(&w_i * l));
let w_i_l = &w_i * l;
w_i.assign(&w_i_l);
}
}

Expand Down Expand Up @@ -126,7 +127,8 @@ impl<T: DualNum<f64> + Copy> WeightFunction<T> {

// Apply Lanczos sigma factor
if let Some(l) = lanczos {
w_i.assign(&(&w_i * l));
let w_i_l = &w_i * l;
w_i.assign(&w_i_l)
}
}
}
Expand Down