This work is based on the implementation of the Generic Scientific Simulation Environment [40,51,22], which contains methods for handling the underlying topological data structures as well as storing quantities with respect to these structures. Furthermore, a functional layer is provided with which one is allowed to formulate functional expressions based on the quantities associated with the topological elements as will be shown in Section 2.4.
The implementation of the topology handling is shown in detail in  and forms the base of the considerations of Section 2.4. The main advantages of this library over other libraries is that arbitrary topological elements can be used and quantities can be associated with any topological element. Such a framework is necessary in order to provide a functional calculus as will be shown in Section 2.5.
The second major part is a functional programming layer as discussed in Chapter 5. The main idea behind this layer is to provide a mathematical description language to formulate expressions, especially for discretization schemes. Furthermore, an additional indirection allows to formulate residual expressions and to implicitly obtain all derivatives necessary in order to assembly the required system matrix.