The field of scientific computing often utilizes highly complex formulae with a variety of topological elements. Many applications, such as the discretization of partial differential equations (PDE), as well as interpolation mechanisms, strongly depend on the base traversal mechanisms the environment provides. A set of base traversal, incidence and orientation operations is a sufficient foundation on which all applications can be built. This approach results in a rigorous implementation of topological structures which covers all types of topological elements, such as vertices, cells, and general inter-dimensional elements called faces. The expressiveness of the code is increased, because traversal algorithms do not have to be written explicitly for each of the elements, such as edge-cell traversal, but the information can be derived by a subset of highly optimized operations. Using the generic programming paradigm in combination with parametric polymorphism in C++, one has the opportunity to formulate a concept for a topological base structure. It provides an interface for the construction, traversal, and handle generation for different topological structures. Based on the topological structure, it is possible to formulate discrete problems independently of the actual underlying topology; e.g., a finite volume discretization scheme can be described independently from the topology and the dimension.
As an example, the discretization of the Maxwell equations using the Yee formulation is done using either staggered grids or one consistent topology with facets and edges. While in the standard formulation the specification consists of six equations (two for each direction in space), the formulation using topological traversal can be reduced to two equations. Even though the numerical effort for the solution is the same, the amount of manual specification can be reduced enormously.
|