______ _____ _ ________
/ ____/___ / ___/(_)___ ___ / _/ __ |
/ / / __ \\__ \/ / __ `__ \ / // / / /
/ /___/ /_/ /__/ / / / / / / // // /_/ /
\____/\____/____/_/_/ /_/ /_/___/\____/
Kratos CoSimulationApplication
The CoSimIO is a small library for interprocess communication in CoSimulation contexts. It is designed for exchanging data between different solvers or other software-tools. For performing coupled simulations it is used in combination with the CoSimulationApplication.
It is implemented as a detached interface. This means that it follows the interface of Kratos but is independent of Kratos, which allows for an easy integration into other codes / solvers
The implementation is defined in co_sim_io
Documentation and tutorials can be found here
Different methods for interprocess communication are available, their documentation can be found here
The tests are contained in tests
The changelog contains information about relevant changes in the different versions.
- 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 here.
- Dependency on Kratos: There is NO dependency on Kratos. The CoSimIO can be used completely without including or linking against Kratos.
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.
This section provides a brief overview on how to use the CoSimIO. For more detailed explanations please check the documentation in the corresponding language.
The C++ interface is defined in co_sim_io.hpp. In addition to including this header it is required to compile CoSimIO into a shared library and link against it.
The C interface is defined in co_sim_io_c.h. In addition to including this header it is required to compile CoSimIO into a shared library and link against it.
The Python interface is defined in CoSimIO python module. The pybind library is used for the Python exposure of the C++ interface.
The CoSimIO supports pure sequential and mpi-parallel executions. Shared memory parallelism is currently not planned but might be added at a later stage.
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.
- Boost for the
intrusive_ptr
- pybind11 for exposing C++ to python
- filesystem Header-only single-file std::filesystem compatible helper library, based on the C++17 specs
- asio for socket based interprocess communication
- doctest C++ testing framework for the unit tests