The coupler is composed of three main categories of modules which manage (i) the setup of the interface between client applications, (ii) data exchanges and (iii) access to parameters.
(i) The setup library calls are intended to establish the communicators with overlapping processors from the client applications. Therefore, these library calls must follow any internal calls within the client applications to initialise MPI and to setup a process topology. The setup routines then create the CPL_INTER_COMM which is the logical process topology which governs any data exchanges, or overlaps, between the client appellations. In addition, it initialises the coupling parameters which are prescribed by the user. It should be noted that the initialisation step involves many error checks and logical expressions in order to ensure that the topology of the interface between the client applications is accurate. This utility is therefore advantageous in coupling any set of client applications, since the extensive checks minimise user error.
(ii) The exchange class is a variant of the MPI, non-blocking send and receive operations, and other global operations (within the scope of the coupler communicators) such as scatter and gather. One important point to note is that the coupler data transfer operations are designed to handle any data structure, dimensionality and size being exchanged. Therefore, the coupler retains generality and remains a general-purpose interfacing utility independent of the client applications and data structures.
(iii) The final category of library routines is a utility for retrieving parameters from the coupler. It can provide information on process topology, logical overlaps between topologies...etc. It is used throughout the setup process, but is also accessible to client applications that require direct knowledge of coupler entities.