Structure ========= pyRat_ is structured as a somewhat hybrid C++ and Python_ project. Repository structure -------------------- .. code-block:: text pyrat/ ├── figs/ ← Figures and images ├── include/ ← C++ header files ├── scripts/ ← Various utility scripts ├── src/ ← C++ and Python source files │ ├── common/ ← Rat-Common bindings │ ├── dmsh/ ← Rat-DistMesh bindings │ ├── mat/ ← Rat-Materials bindings │ ├── mlfmm/ ← Rat-MLFMM bindings │ ├── models/ ← Rat-Models bindings │ ├── pyrat/ ← Python sources for other submodules │ ├── utils/ ← C++ utilities (e.g. type cast) │ ├── rat.cpp/ ← pyrat.rat submodule definition ├── tests/ ← Python unit tests ├── .gitignore ← Git ignored items (e.g. build) ├── CHANGELOG.md ← Changelog for evolution tracking ├── CMakeLists.txt ← C++ CMake configuration file ├── CONTRIBUTING.md ← Contributing guidelines file ├── LICENSE.md ← MIT license file ├── pyproject.toml ← Python project specifications ├── README.md ← Repository simple information The C++ part is used to build the ``pyrat.rat`` submodule which acts as the bridge between Python_ and Rat C++ libraries. It is then aggregated into a global ``pyrat`` Python_ module along with other pure Python_ submodules shipping various helpers. All bindings and their documentations are defined in the header files within the ``include`` and ``src`` directories. The ``CMakeLists.txt`` configuration file uses macros defined by pybind11_ to easily define a Python_ module and how to compile it. It then links the produced ``rat`` library to the Rat-Models library which transitively links to all other dependencies. Module structure ---------------- .. mermaid:: ../../graphs/repo-pyrat/about_bindings_structure.mmd .. Links .. _NumPy: https://numpy.org/ .. _Project-Rat: https://gitlab.com/project-rat .. _PRE Docs: https://gitlab.com/project-rat-extras/docs .. _Project-Rat: https://gitlab.com/project-rat .. _Project-Rat-Extras: https://gitlab.com/project-rat-extras .. _pybind11: https://github.com/pybind/pybind11 .. _pyRat: https://gitlab.com/project-rat-extras/pyrat .. _Python: https://www.python.org/ .. _Python wheel: https://pythonwheels.com/ .. _Python wheels: https://pythonwheels.com/ .. _Rat-Containers: https://gitlab.com/project-rat-extras/rat-containers .. _Rat-Docs: https://gitlab.com/project-rat/rat-documentation .. _Rat-vcpkg: https://gitlab.com/project-rat-extras/rat-vcpkg