This page gives an overview on available preCICE APIs and minimal reference implementations.

preCICE is written in C++. Thus, the native API language of preCICE is C++ as well. If you are new to the preCICE API, we recommended that you first follow the step-by-step guide.

Native API

The definite documentation of the C++ API is available on the preCICE doxygen pages.

Language Location Installation
C++ precice/precice/tree/main/src/precice/SolverInterface.hpp Automatically included

Bindings

Besides the C++ API, there are also bindings to other languages available:

Language Location Installation
C precice/precice/tree/main/extras/bindings/c native bindings
Fortran precice/precice/tree/main/extras/bindings/fortran native bindings
Fortran Module precice/fortran-module make
Python precice/python-bindings pip3 install pyprecice
Matlab precice/matlab-bindings installation script
Julia precice/PreCICE.jl add PreCICE

The community is also working on the following bindings:

Language Location Notes
Rust ajaust/rust-precice Experimental prototype / work in progress

Minimal reference implementations

For all languages, we provide minimal reference implementations, so called solver dummies. They can be a great source to copy from.

Language Location
C++ precice/precice/examples/solverdummies/cpp
C precice/precice/examples/solverdummies/c
Fortran precice/precice/examples/solverdummies/fortran
Fortran Module precice/fortran-module/examples/solverdummy
Python precice/python-bindings/solverdummy
Matlab precice/matlab-bindings/solverdummy
Julia precice/PreCICE.jl/solverdummy

The community also maintains MPI-parallel versions of some of these solver dummies.

Architectural overview of bindings

All the language bindings are calling the C++ API of preCICE and some of them are interdependent. Here is an overview of what uses what:

Architectural overview of bindings