directly from c++

Asked by JOHN on 2017-10-26

Hi everyone,
I understand this might be a simple question
But is there a way to run ESYS directly from a c++ programm without the python at all?
Any help is appreciated
Thank you for your time

Question information

Language:
English Edit question
Status:
Solved
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Solved by:
Dion Weatherley
Solved:
2017-10-27
Last query:
2017-10-27
Last reply:
2017-10-27
Dion Weatherley (d-weatherley) said : #1

Hi John,

Yes there is a way to run ESyS-Particle "headless" (i.e. without the Python interface). However, it is a rather ugly way to initialise simulations. The C++ API in ESyS-Particle (which is wrapped by boost.python) uses different naming conventions and syntax to the Python API. The latter has been designed to be more user-friendly and is much better documented. In fact, the C++ API is essentially undocumented...you need to figure it out by examining the ESyS-Particle source code.

In any case, if you are interested to try headless simulations, there's an example of how to do this here:
http://www.esys-particle.org/files/ESyS-P_cpp_simulaton_example.tar.gz

Cheers,

Dion

Best Dion Weatherley (d-weatherley) said : #2

P.S. I should note that there is relatively little computational overhead when using the ESyS-Particle Python API. As this is largely just used during initialisation of simulations (Runnables notwithstanding), a headless simulation will typically only run slightly faster than one initialised using Python. For any decent sized simulation, the Python overhead should be so small to be effectively negligible.

Cheers,

Dion

JOHN (washingmachine) said : #3

Thanks, I might take your advice and keep the wrapper, but it is always good to have the option

JOHN (washingmachine) said : #4

Thanks Dion Weatherley, that solved my question.