______ _____ _ ________
/ ____/___ / ___/(_)___ ___ / _/ __ |
/ / / __ \\__ \/ / __ `__ \ / // / / /
/ /___/ /_/ /__/ / / / / / / // // /_/ /
\____/\____/____/_/_/ /_/ /_/___/\____/
Kratos CoSimulationApplication
CoSimIO
CoSimIO for coupling and exchanging data between different solvers or other software-tools. It works in combination with the CoSimulationApplication.
The implementation is defined in co_sim_io
A tutorial for using the CoSimIO can be found in tutorial
The tests are contained in tests
Dependencies
- The CoSimIO is implemented as a standalone tool in C++. The only dependency is C++11. This includes most of the major C++ compilers in Windows, Linux, and Mac. A detailed list of C++11 compatible compilers under https://en.cppreference.com/w/cpp/compiler_support#cpp11.
- Dependency on Kratos: There is NO dependency on Kratos. The CoSimIO can be used completely without including or linking against Kratos.
- CoSimIO is header-only, no compiling/linking is required.
- Different means of communication / data-exchange are available. Communication through files is the default, others (e.g. through Sockets or MPI) can be enabled at compile time (and selected at run time). This can introduce other dependencies such as boost or MPI. Except MPI, all these dependencies are header-only.
- The CoSimIO uses std::filesystem which is part of C++17. Until moving to C++17, the C++11 compatible version of std::filesystem is used.
Available languages
Besides the native C++ interface, the CoSimIO also provides interfaces to other languages. Currently the following languages are supported:
- C
- Python
These interfaces are implemented as consistent as possible with the C++ interface.
Usage
This section provides a brief overview on how to use the CoSimIO. For more detailed explanations please check the tutorial in the corresponding language.
C++
The C++ interface is defined in co_sim_io.hpp. It is sufficient to include this header, no compilation/linking is necessary because it is header-only.
C
The C interface is defined in co_sim_io_c.h. In addition to including this header it is required to compile co_sim_io_c.c into a shared library and link against it.
Python
The Python interface is defined in CoSimIO python module. The pybind library is used for the Python exposure of the C++ interface.
Parallelism
Currently the CoSimIO runs purely sequential. In the future capabilities for distributed MPI simulations are planned to be implemented. Shared memory parallelism is currently not planned but might be added at a later stage.
Memory Management
Coupling requires frequent exchange of data. Therefore the CoSimIO uses the memory provided by the including solvers/software-tools directly, without copying it to an auxiliar data structure.