5.2.1 Component System

A component system enables to implement reusable software entities, offering a defined interface. The interface must support an initialization, execution, and cleanup step (Figure 5.8). Where the first is essential to, for instance, allocate data structures for the subsequent step of execution, the latter enables to implement appropriate cleanup methods, such as releasing memory. The execution step contains the actual computation. In general, such a three-step approach allows for multiple executions of a plugin within a simulation introduced by, for instance, loops. Utilizing a three-step interface is a common approach in scientific frameworks, such as the ESMF [29]. Furthermore, the system must support the addition of new components as well as the convenient exchange of components, i.e., the exchange must not require recompilation.

It is particularly important to provide a high level or usability. Developers and advanced users will implement additional components and thus the interface has to be intuitive to facilitate straightforward implementations without requiring significant development efforts.


pict


Figure 5.8: A component must provide a decoupled initialization, execution, and cleanup state. Where the initialization and cleanup state is only executed once by the framework, the component might be executed several times if, for instance, it is part of a loop.