Comments (2)
Since we have to deal with this problem now anyways: Is there any way we can make the implementation of the Python FFI for the dual numbers more ergonomic? It's virtually impossible to make a Box<dyn DualNum<f64>>
using a PyDualNumber<PyObject>
and doing a (manually implemented) type check for every operation we have also seems unfeasible.
Aside from that the steps that you outline seem doable. Maybe expose ALL dual numbers that are created in the num-dual Python FFI and then in feos we can just build the States that we need. E.g., currently num-dual builds dual numbers with up to 10 derivatives but we would only need them for up to 2 in feos.
(For more than 10 derivatives backward AD should be seriously considered anyways)
from feos.
These are things to consider:
- which dual numbers do we generate Python bindings for?
- which do we actually export in a
num-dual
module (the Python package)
For feos
we just have to make sure that all variants we need in HelmholtzEnergy
are build and public in the python
(Rust) module. But I agree, we should investigate if any improvements to the way we build the bindings can be made. This is, however, an issue for num-dual
.
In feos
, currently two macros are used. One implements the getters for the states that are at the moment defined manually, the second one implements the HelmholtzEnergy
trait. It should be possible to do that all automatically given a list of dual numbers.
from feos.
Related Issues (20)
- Helping bubble points and dew points at given pressure to converge HOT 2
- PC-SAFT extensions on README
- How to obtain the pressure of dispersive term and that of repulsive term HOT 3
- Can I use feos to plot pressure-density diagram of binary mixture? HOT 5
- `Parameter::from_multiple_json` fails when components exist in multiple files
- Adjust Joback parameters to work with new ideal gas treatment
- Improve `Estimator` and `DataSet` objects
- Polarizable models? HOT 2
- Question regarding the calculation of the ideal gas molar entropy HOT 2
- cutoff_radius limit not necessary in structured (periodic) porous media? HOT 1
- Output the fraction of non-bonded association sites HOT 2
- PC-SAFT vapor-liquid DFT solver HOT 4
- How to calculate the thermal conductivity of mixtures HOT 2
- association scheme variables Na, Nb, Nc HOT 3
- More derivatives at the same time HOT 37
- Some jupyter notebooks throwing error HOT 2
- Feedback for users regarding the availability of binary interaction parameters
- question about polar term in Heterosegmented gc-PCP-SAFT HOT 2
- Make critical point calculation more robust HOT 3
- Fix unit bug in `quantum_d` Python getter of `SaftVRQMieParameter` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feos.