-
Notifications
You must be signed in to change notification settings - Fork 0
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
Raise the level of abstraction #84
Comments
The example The current idea is to have a second DSL that allows to define where such an external datatype can be found (e.g., the header files) or the possibility to create a custom data type, define its interfaces and implement it with arbitrary C++. The idea of the interface definition is to use it for consistency checking in the models during code generation. |
Ok, great! What are the external data types then used for, particle properties? A functional style for the particle computations would be very nice. Currently, evolve and interact are side-effects on particles. Converting this into a functional style at least would be interesting w.r.t. function composition, although the side-effect will persist because of the computational model.
|
Actually, I meant declarative approach. That is, there is the goal of just having to describe the interact and evolve formulae for the phenomenon to be modeled and in the simulation code to just define which particles interact on which properties. A data flow analysis should then select the correct formulae and all its dependent variables. For a functional style I think there are too many side effects (such as solvers solving equations on a grid etc) during each iteration. The declarative approach would be an interesting feature for composition/reuse as one could write fragment simulations where properties to be simulated on could be templates. A complete simulation could be designed by instantiating these fragment. Once instantiated the actual formulae are selected and code can be generated. The external data types could be used for custom property types. But maybe also custom data types are used for variables in the simulation which could be used here. |
In its current state, the DSL looks more like an imperative particle programming language. While an imperative approach is powerful in terms of expressivenes, a DSL may not need to strive for this, i.e., supporting arbitrary simulations is not necessary. What one instead could do is to provide some interop with the library so that users can write C++ code embedded into the DSL or vice-versa.
The problem is that if the DSL gets conceptually close to an imperative programming language it will not add too much benefit over using OpenFPM directly, which already has some nice template-library abstractions inside.
The text was updated successfully, but these errors were encountered: