In this chapter, we will demonstrate how one builds a sophisticated software capability using a large collection of components. These collections of components are known as ``toolkits'', since the components are generally selected to solve a certain class of problems, e.g. partial differential equations (PDEs).
The toolkit being considered here is simple and rather incomplete with regard to its capability to solve complicated physical problems. For educational purposes it is meant to solve PDEs on Cartesian meshes. It has a mesh component (that takes care of the spatial discretization), a data object (that stores the dependent variables of a PDE on the space discretized by the mesh), a time-integrator, various components that model the physics and other components that enable data writing to disk and visualization. The algorithms and models being encoded in the components are simple, well known, easily understood and instructive in how a mathematical problem is decomposed and rendered in component software. Thoughtful design of the software architecture - component functionality and their level of granularity - is critical when designing toolkits. Design decisions about interfaces or ports are fundamental, and can be very hard change later without requiring wide-spread changes throughout the toolkit.
This simple toolkit is, however, quite complete from the software point of view. It contains a set of interfaces that are sufficient for the simple PDE example it solves. However, these interfaces can also serve quite well for the solution of nonlinearly coupled sets of PDEs and the numerical algorithms that are usually associated with them. The methodology and the infrastructure that you will learn, namely the interface design, the setup of a component using Bocca , the makefiles, the SIDL files are theoretically and practically industrial strength; you will not need anything more for research and publication-quality code.
In Section 4.2, we describe a PDE and its functional decomposition along numerical and physical-model lines. The ``work flow'', as relating to the algorithmic steps, is sketched out. In Section 4.3, the functional pieces are rendered into components which are thereafter connected into a ``code'' (defined as a set of components, properly configured and connected, that can solve a given PDE). In Section 4.4 we outline a few exercises with components that we have created. In Section 4.5 we dig deeper into two components and suggest modifications; these can then become additions to the toolkit. In Section 4.6, we draw some conclusions.