Skip to content

Commit 150568d

Browse files
g-bauerprehner
andauthored
Restructure feos-core (#226)
* PC SAFT done. Checking benches * Extracted d(T), benches are not faster * Added user_defined impl * Added ideal gas implementation to user_defined module * Changes according to review, added SAFTVRQMie * Refactored uv-theory * Refactored PeTs * Refactored GC-PCSAFT * adjust dft * Python fixes * Removed VirialOrder from Python Interface, resolved deprecated method of indexset * Add uvtheory to Cargo feature * Updated maturin version, updated github actions, changed universal2 command, split macos wheel release * Updated uv-theory name change in Python doc * cleanup * checked Rust docs * Removed unchanged notebooks, pub keyword in density_iteration and added docs for methods in IdealGas trait. * Update to uvtheory notebook, added entries to changelogs * Remove unchanged notebooks * updated changelogs --------- Co-authored-by: Philipp Rehner <prehner@ethz.ch>
1 parent a23f9c5 commit 150568d

File tree

99 files changed

+1901
-1430
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+1901
-1430
lines changed

.github/workflows/documentation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
build-documentation:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515
- name: Setup python
1616
uses: actions/setup-python@v2
1717
with:
@@ -22,7 +22,7 @@ jobs:
2222
run: |
2323
pip install sphinx nbsphinx ipython pygments sphinx_inline_tabs sphinx_design sphinx_copybutton myst_parser furo
2424
- name: Build Wheels
25-
uses: messense/maturin-action@v1
25+
uses: PyO3/maturin-action@v1
2626
with:
2727
manylinux: auto
2828
command: build
@@ -33,7 +33,7 @@ jobs:
3333
- name: Build documentation
3434
run: sphinx-build docs/ public/ -b html
3535
- name: Upload artifacts
36-
uses: actions/upload-artifact@v2
36+
uses: actions/upload-artifact@v3
3737
with:
3838
name: documentation
3939
path: public

.github/workflows/release.yml

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ jobs:
88
linux:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1212
- uses: actions/setup-python@v2
1313
with:
1414
python-version: 3.9
1515
- name: Build Wheels
16-
uses: messense/maturin-action@v1
16+
uses: PyO3/maturin-action@v1
1717
with:
1818
manylinux: auto
1919
command: build
2020
args: --profile release-lto --out dist
2121
- name: Upload wheels
22-
uses: actions/upload-artifact@v2
22+
uses: actions/upload-artifact@v3
2323
with:
2424
name: dist
2525
path: dist
2626

2727
macos:
2828
runs-on: macos-latest
2929
steps:
30-
- uses: actions/checkout@v2
30+
- uses: actions/checkout@v4
3131
- uses: actions/setup-python@v2
3232
with:
3333
python-version: 3.9
@@ -39,27 +39,45 @@ jobs:
3939
profile: minimal
4040
default: true
4141
- name: Build wheels - x86_64
42-
uses: messense/maturin-action@v1
42+
uses: PyO3/maturin-action@v1
4343
with:
4444
target: x86_64
4545
args: --profile release-lto --out dist
46+
- name: Upload wheels
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: dist
50+
path: dist
51+
macos_universal2:
52+
runs-on: macos-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
- uses: actions/setup-python@v2
56+
with:
57+
python-version: 3.9
58+
architecture: x64
59+
- name: Install Rust toolchain
60+
uses: actions-rs/toolchain@v1
61+
with:
62+
toolchain: stable
63+
profile: minimal
64+
default: true
4665
- name: Build wheels - universal2
47-
uses: messense/maturin-action@v1
66+
uses: PyO3/maturin-action@v1
4867
with:
49-
args: --profile release-lto --universal2 --out dist
68+
args: --release --target universal2-apple-darwin --out dist
5069
- name: Upload wheels
51-
uses: actions/upload-artifact@v2
70+
uses: actions/upload-artifact@v3
5271
with:
5372
name: dist
5473
path: dist
55-
5674
windows:
5775
runs-on: windows-latest
5876
strategy:
5977
matrix:
6078
target: [x64, x86]
6179
steps:
62-
- uses: actions/checkout@v2
80+
- uses: actions/checkout@v4
6381
- uses: actions/setup-python@v2
6482
with:
6583
python-version: 3.9
@@ -71,12 +89,12 @@ jobs:
7189
profile: minimal
7290
default: true
7391
- name: Build wheels
74-
uses: messense/maturin-action@v1
92+
uses: PyO3/maturin-action@v1
7593
with:
7694
target: ${{ matrix.target }}
7795
args: --profile release-lto --out dist
7896
- name: Upload wheels
79-
uses: actions/upload-artifact@v2
97+
uses: actions/upload-artifact@v3
8098
with:
8199
name: dist
82100
path: dist
@@ -105,7 +123,7 @@ jobs:
105123
name: Release crates.io
106124
runs-on: ubuntu-latest
107125
steps:
108-
- uses: actions/checkout@v2
126+
- uses: actions/checkout@v4
109127
- uses: actions-rs/toolchain@v1
110128
with:
111129
profile: minimal

.github/workflows/release_core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: Release crates.io
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313
- uses: actions-rs/toolchain@v1
1414
with:
1515
profile: minimal

.github/workflows/release_derive.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: Release crates.io
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313
- uses: actions-rs/toolchain@v1
1414
with:
1515
profile: minimal

.github/workflows/release_dft.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: Release crates.io
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v4
1313
- uses: actions-rs/toolchain@v1
1414
with:
1515
profile: minimal

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
crate: [feos-core, feos-dft]
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
- name: Build
2222
run: cargo build --release -p ${{ matrix.crate }}
2323
- name: Run tests
@@ -31,7 +31,7 @@ jobs:
3131
model: [pcsaft, gc_pcsaft, pets, uvtheory, saftvrqmie]
3232

3333
steps:
34-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3535
- name: Build
3636
run: cargo build --release --features ${{ matrix.model }}
3737
- name: Run tests
@@ -45,7 +45,7 @@ jobs:
4545
model: [pcsaft, gc_pcsaft]
4646

4747
steps:
48-
- uses: actions/checkout@v3
48+
- uses: actions/checkout@v4
4949
- name: Build
5050
run: cargo build --release --features "${{ matrix.model }} dft"
5151
- name: Run tests

.github/workflows/wheels.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@ jobs:
88
linux:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1212
- uses: actions/setup-python@v2
1313
with:
1414
python-version: 3.9
1515
- name: Build Wheels
16-
uses: messense/maturin-action@v1
16+
uses: PyO3/maturin-action@v1
1717
with:
1818
manylinux: auto
1919
command: build
2020
args: --release --out dist
2121
- name: Upload wheels
22-
uses: actions/upload-artifact@v2
22+
uses: actions/upload-artifact@v3
2323
with:
2424
name: dist
2525
path: dist
2626
macos:
2727
runs-on: macos-latest
2828
steps:
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v4
3030
- uses: actions/setup-python@v2
3131
with:
3232
python-version: 3.9
@@ -38,19 +38,19 @@ jobs:
3838
profile: minimal
3939
default: true
4040
- name: Build wheels - x86_64
41-
uses: messense/maturin-action@v1
41+
uses: PyO3/maturin-action@v1
4242
with:
4343
target: x86_64
4444
args: --release --out dist
4545
- name: Upload wheels
46-
uses: actions/upload-artifact@v2
46+
uses: actions/upload-artifact@v3
4747
with:
4848
name: dist
4949
path: dist
5050
macos_universal2:
5151
runs-on: macos-latest
5252
steps:
53-
- uses: actions/checkout@v2
53+
- uses: actions/checkout@v4
5454
- uses: actions/setup-python@v2
5555
with:
5656
python-version: 3.9
@@ -62,11 +62,11 @@ jobs:
6262
profile: minimal
6363
default: true
6464
- name: Build wheels - universal2
65-
uses: messense/maturin-action@v1
65+
uses: PyO3/maturin-action@v1
6666
with:
67-
args: --release --universal2 --out dist
67+
args: --release --target universal2-apple-darwin --out dist
6868
- name: Upload wheels
69-
uses: actions/upload-artifact@v2
69+
uses: actions/upload-artifact@v3
7070
with:
7171
name: dist
7272
path: dist
@@ -76,7 +76,7 @@ jobs:
7676
matrix:
7777
target: [x64, x86]
7878
steps:
79-
- uses: actions/checkout@v2
79+
- uses: actions/checkout@v4
8080
- uses: actions/setup-python@v2
8181
with:
8282
python-version: 3.9
@@ -88,12 +88,12 @@ jobs:
8888
profile: minimal
8989
default: true
9090
- name: Build wheels
91-
uses: messense/maturin-action@v1
91+
uses: PyO3/maturin-action@v1
9292
with:
9393
target: ${{ matrix.target }}
9494
args: --release --out dist
9595
- name: Upload wheels
96-
uses: actions/upload-artifact@v2
96+
uses: actions/upload-artifact@v3
9797
with:
9898
name: dist
9999
path: dist

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
### Changed
10+
- Updated model implementations to account for the removal of trait objects for Helmholtz energy contributions and the de Broglie in `feos-core`. [#226](https://github.com/feos-org/feos/pull/226)
11+
- Changed Helmholtz energy functions in `PcSaft` contributions so that the temperature-dependent diameter is re-used across different contributions. [#226](https://github.com/feos-org/feos/pull/226)
12+
- Renamed structs in `uvtheory` module in accordance with names in other models (`UV...` to `UVTheory...`). [#226](https://github.com/feos-org/feos/pull/226)
13+
- Restructured `uvtheory` module: added modules for BH and WCA. [#226](https://github.com/feos-org/feos/pull/226)
14+
- Updated github action versions for CI/CD. [#226](https://github.com/feos-org/feos/pull/226)
15+
- Added `codegen-units = 1` to `release-lto` profile. [#226](https://github.com/feos-org/feos/pull/226)
16+
17+
### Removed
18+
- Removed `VirialOrder` from `uvtheory` module. Orders are now variants of the existing `Perturbation` enum. [#226](https://github.com/feos-org/feos/pull/226)
19+
920
## [0.6.1] - 2024-01-11
1021
- Python only: Release the changes introduced in `feos-core` 0.6.1.
1122

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ criterion = "0.5"
5353
[profile.release-lto]
5454
inherits = "release"
5555
lto = true
56+
codegen-units = 1
57+
5658

5759
[features]
5860
default = []

benches/contributions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fn pcsaft(c: &mut Criterion) {
7878
let name1 = comp1.identifier.name.as_deref().unwrap();
7979
let name2 = comp2.identifier.name.as_deref().unwrap();
8080
let mix = format!("{name1}_{name2}");
81-
group.bench_function(mix, |b| b.iter(|| eos.evaluate_residual(&state_hd)));
81+
group.bench_function(mix, |b| b.iter(|| eos.residual_helmholtz_energy(&state_hd)));
8282
}
8383
}
8484
}

0 commit comments

Comments
 (0)