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
These two issues are tightly coupled, so I'll discuss them together. I think having a simple C API for scripting proposes would be very interesting. Why C if we are using C++? Two reasons"
There is no standard way to access C++ functions from a binary file. It's main problem is the lack of a standardized ABI. The C language, on the contrary, provides a standard ABI.
C is the de facto standard for scripting languages. Almost all of them (Python, Perl, MATLAB, Julia, etc) provide simple ways to interface with C code.
The idea would be to implement and "external" API in C and wrap it on our favorite scripting language. The "external" API would be mainly implemented in the Framework with the following objectives:
Configuring a CFcase. Adding modules, configuring boundary and initial conditions with user-defined functions, changing modules at run time, retrieving the module config options.
Getting and setting data. Accessing the mesh and physical properties.
Implement prototyping modules. One could start implementing a module using a higher-level language and, when all the building blocks are properly defined and debugged, implement a fast module in C++.
Implement a general and extendable GUI.
Point 3 might be the most controversial. Why spend time implementing the same module in two different languages? The though process is adapted to COOLFluiD's developers:
COOLFLuiD is probably the first large code that the students working on it ever faced. They have little experience on software patterns, algorithms or data structures (I certainly had!).
It may even be the first C++ code or the first time working on Linux!
So, by first interfacing COOLFuiD through Octave/MATLAB ( or any other language the students have already used ) the development process is "eased in", with the focus first on the algorithm and getting things done with simpler tools and debug processes. Later, with the help of the more experienced programmers, the design for an efficient C++ code can be laid out and implemented.
The text was updated successfully, but these errors were encountered:
These two issues are tightly coupled, so I'll discuss them together. I think having a simple C API for scripting proposes would be very interesting. Why C if we are using C++? Two reasons"
The idea would be to implement and "external" API in C and wrap it on our favorite scripting language. The "external" API would be mainly implemented in the Framework with the following objectives:
Point 3 might be the most controversial. Why spend time implementing the same module in two different languages? The though process is adapted to COOLFluiD's developers:
So, by first interfacing COOLFuiD through Octave/MATLAB ( or any other language the students have already used ) the development process is "eased in", with the focus first on the algorithm and getting things done with simpler tools and debug processes. Later, with the help of the more experienced programmers, the design for an efficient C++ code can be laid out and implemented.
The text was updated successfully, but these errors were encountered: