Welcome to JCMsuite’s C-API guide!

This document shows how to use JCMsuite from C/C++. We assume that the reader is familiar with the basic concepts of using JCMsuite, especially regarding the necessary input files and mesh generation and simulation flow.

The major concept of the C-API reflects the usage of JCMsuite via command line. First, the necessary input for the simulation has to be created, namely the content of the |project.jcmp|, materials.jcm, sources.jcm, layout.jcm, boundary_conditions.jcm. Instead of having those files in a folder on your hard drive, they are created on a so-called Pinboard, which can be understood as a virtual drive. Meshing is started by providing a handle to the layout file and creates a grid.jcm on the pinboard. Then, the solver can be started, providing a handle to the simulation file, usually |project.jcmp|. The simulation results can either be written to the hard drive, or they are created on the Pinbord as well. If they are created on the Pinboard, the C-API gives access to the content of the output files.

An initialization of the interface and finalization after usage takes care of creation and deletion of all global objects within the interface. Further, there is support for using JCMsuite simulatenously from different threads.