-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matheval #1644
Matheval #1644
Conversation
Codecov Report
@@ Coverage Diff @@
## python #1644 +/- ##
========================================
Coverage ? 85%
========================================
Files ? 520
Lines ? 24496
Branches ? 0
========================================
Hits ? 20994
Misses ? 3502
Partials ? 0 Continue to review full report at Codecov.
|
Do we want to depend on a self maintained lib? |
Considering it consists of just one header file and isn't likely to have a high update frequency we might as well copy that into Espresso. |
d035ea9
to
1ca0b8b
Compare
|
I guarded all uses of the matheval library in Espresso, so it should build without it, in case the need arises. I used git subtree to integrate the library, in the end, because unless we upgrade to cmake 3.11 and fetch_content, some changes to mathevalś cmake were needed. From my side, we can go ahead with this pr. However, if someone could push better cmake in the root CMakeList.txt to detect the presence of the library, that would be helpful. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot compile this PR on maxset:
cp ../maintainer/configs/maxset.hpp myconfig.hpp
cmake ..
make
External feature 'MATHEVAL' can not be defined in myconfig.
There were errors in '/work/jgrad/espresso-fork/build/src/config/myconfig-final.hpp'
ping |
pong |
After a renewed discussion in the core team, we have come to the conclusion that we are not able to maintain the code introduced by this PR. I'd like to emphasize that this is not a matter of code quality. The functionality provided by this Pr is of interest but a very similar result can be obtained using tabulated potentials. |
Of course not. Have a good day. |
What?
This adds a mathematical expression parser to the ESPResSo core. With this it is possible to pass a mathematical expression as a string all the way into a tight loop, like the integration loop and have it evaluated in every iteration with, say, the time step.
Why?
This is intended to serve as a building block for constraints or LB boundaries with time-dependent parameters. It was motivated by the Lees-Edwards boundary conditions for LB as the Lees-Edwards shift has to be adjusted every time step.
How?
The parser uses Boost.Spirit X3 and Boost.Fusion under the hood. The compilation time of projects using Boost.Spirit is unfortunately quite excessive, which is why I hide all those nasty details behind an opaque pointer (also known as pImpl).
A unit test and inline Doxygen documentation is supplied alongside.
Right now some of the checks are failing because the Boost version in some of the containers is too old. The oldest Boost version with which it seems to work fine is 1.65.1 (maybe it works with an even older version, but that is the oldest version in the Docker containers for which it works).