You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rustguide/core/index.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,14 @@ We will learn how equations of state are abstracted using traits, how generalize
5
5
6
6
## Setup
7
7
8
-
To setup your workspace, [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the [`feos-core` github repository](https://github.com/feos-org/feos-core) and from that clone the fork.
8
+
To setup your workspace, [fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the [`feos` github repository](https://github.com/feos-org/feos) and from that clone the fork.
9
9
10
-
To build the Rust library, type:
10
+
To build the Rust library, switch to the `feos-core` crate
11
+
```
12
+
cd feos-core
13
+
```
14
+
15
+
and type:
11
16
12
17
```
13
18
cargo build
@@ -20,7 +25,7 @@ cargo build
20
25
-`quantity`: for scalar and vector valued dimensioned quantities. Those are used in almost all user-facing interfaces.
21
26
-`num-dual`: for generalized (hyper-) dual numbers. These data types are very important because we use them to be able to compute partial, higher-order derivatives of the Helmholtz energy without needing to implement them analytically.
22
27
-`ndarray`: for multidimensional arrays. We use these when mathematical operations are performed on arrays. They are a central data structure for `feos-dft`.
23
-
-`pyO3`: for the Python interface. All interfaces to Python are written in pure Rust using `pyO3`. It's awesome.
28
+
-`pyo3`: for the Python interface. All interfaces to Python are written in pure Rust using `PyO3`. It's awesome.
Copy file name to clipboardExpand all lines: docs/rustguide/index.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ On the following pages we discuss the structure of the {math}`\text{FeO}_\text{s
6
6
## Introduction
7
7
8
8
{math}`\text{FeO}_\text{s}` is primarily developed on Linux but it is tested and runs on Linux, macOS and Windows.
9
-
You need a [Rust compiler](https://www.rust-lang.org/tools/install)(version 1.51+) to compile the code.
9
+
You need a [Rust compiler](https://www.rust-lang.org/tools/install) to compile the code.
10
10
For development, [Visual Studio Code](https://code.visualstudio.com/) with the [rust-analyzer](https://rust-analyzer.github.io/) plugin works pretty well, but you should use what you are comfortable in.
11
11
12
12
## Prerequisites
@@ -29,7 +29,7 @@ Eventually you'll need to learn and understand
29
29
30
30
## Project Structure
31
31
32
-
{math}`\text{FeO}_\text{s}`is split into multiple crates that build on each other.
32
+
Some common functionalities of {math}`\text{FeO}_\text{s}`are contained in separate workspace crates so that they can be used as standalone dependencies outside of {math}`\text{FeO}_\text{s}`.
33
33
The most important ones are
34
34
35
35
*`feos-core` (`core` for short): defines traits and structs for equations of state and implements thermodynamic states, phase equilibria and critical point routines.
@@ -38,14 +38,16 @@ The most important ones are
38
38
These crates offer abstractions for tasks that are common for all equations of state and Helmholtz energy functionals.
39
39
Using `core` and `dft`, the following *implementations* of equations of state and functionals are currently available:
40
40
41
-
*`feos-pcsaft`: the [PC-SAFT equation of state](https://pubs.acs.org/doi/abs/10.1021/ie0003887).
41
+
*`pcsaft`: the [PC-SAFT](https://pubs.acs.org/doi/abs/10.1021/ie0003887) equation of state and Helmholtz energy functional.
42
+
*`gc-pcsaft`: the [hetero-segmented group contribution](https://aip.scitation.org/doi/full/10.1063/1.4945000) method of the PC-SAFT equation of state.
43
+
*`uv-theory`: the equation of state based on [uv-Theory](https://aip.scitation.org/doi/full/10.1063/5.0073572).
44
+
*`pets`: the [PeTS](https://www.tandfonline.com/doi/full/10.1080/00268976.2018.1447153) equation of state and Helmholtz energy functional.
42
45
43
-
The following crates are actively worked on and will be released in the near future:
46
+
In addition to that, the `hard_sphere`and `assocation` modules contain implementations of the corresponding Helmholtz energy contributions that are used across multiple models.
44
47
45
-
*`feos-gc-pcsaft`: the [hetero-segmented group contribution](https://aip.scitation.org/doi/full/10.1063/1.4945000) method of the PC-SAFT equation of state.
46
-
*`feos-uv-theory`: the equation of state based on [uv-Theory](https://aip.scitation.org/doi/full/10.1063/5.0073572).
47
-
*`feos-thol`: the [Thol equation of state](https://aip.scitation.org/doi/full/10.1063/1.4945000) for pure Lennard-Jones fluids.
48
-
*`feos-pets`: the [PeTS equation of state](https://www.tandfonline.com/doi/full/10.1080/00268976.2018.1447153).
48
+
To reduce compile times during development, every model is gated by its own `feature`. Specific parts of the library can be built and tested by passing the corresponding feature flags to the Rust compiler.
49
+
50
+
Due to the particular treatment of procedural macros in Rust, an additional workspace crate `feos-derive` provides procedural macros for the implementation of the `EquationOfState` and `HelmholtzEnergyFunctional` traits for `enum`s used in FFIs like `PyO3`.
0 commit comments