6.4 Fibers

As has been indicated in the introduction to this chapter, fiber bundles (Definition 40) are inherently used in digital computers. In the same manner as the crude structures are assembled to construct increasingly complex topologies (Definition 28), these topologies can then be used to further provide fiber bundle structures beyond the bare basics. A very simple data structure available in the STL library, which illustrates the use of a fiber bundle, is:


: std::map is an explicit fiber bundle.
  std::map<Key, Data, Compare, Allocator>

The Key type represents the base space, while the Data type specifies the data type of the fibers. This implementation also relies on a relation for comparison of elements to be available and also allows for control of the allocation of memory.

Modelled after this run time example, there is also a compile time container available:


: mpl::map is the compile time equivalent to std::map.
  mpl::map<p1, p2, ..., pn>

Here, the types such as p1 are expected to be models of compile time pairs (mpl::pair), which link the data types of the fibers to the base space data types.

Where these two examples are each completely contained within its particular realm of run time and compile time respectively, it is also possible to bridge these two worlds. Such an implementation is provided as part of the Boost Fusion [103] library in the form of fusion::map which links a compile time data type to a run time value:


: Boost Fusion allows to mix run time and compile time.
  fusion::map<T1, T2, ..., Tn>

This illustration is not to be interpreted that the other containers are not also fiber bundles, however, a std::vector for example corresponds to an implicit base space, thus masking the underlying structure.

The availability of a topological base spaces along with fiber bundles allows to easily construct further topological structures, even more exotic varieties such as M¨obius strips [110][75]. The interplay of these two very basic concepts is thusly essential to the construction of highly complex topologies, as presented in the following code snippet. The topological base space is modelled by an explicit (sparse) container structure, where integers are used to address each element. The fiber space is also modelled by an explicit (sparse) container structure, but the fiber bundle sections are accessed by strings. The final mapping to a double concludes the necessary concepts from Definition 61.


: Example explicit 0D cell fiber bundle.
typedef gsse::map< 
        gsse::pair<tag_dimension, mpl::int_<0> > 
      , gsse::pair<tag_storage,   double > 
      , gsse::pair<tag_index_bs,  long> 
      , gsse::pair<tag_index_fs,  std::string> 
    > fb_scalar_field_t;

From this vantage point, the standard containers found in the libraries (STL, MPL and Fusion) appear as special cases compared to more complex topologies. The need for more complex topologies arises from applications requiring the modelling of manifolds (Definition 35) as arise from topics elaborated in Chapter 5 for instance.

The ability to model manifolds in a convenient and powerful manner together with the fiber bundle concept also provides a clear strategy of how to realize fields such as given by Definition 61, Definition 62 or most generally Definition 65. Since each of these fields is in essence the section of a fiber bundle (Definition 41), it is only required to associate a single entity of the type corresponding to the field to every element of the base space, as given in the code snippet by gsse::vector_ct<>.


: Example vector field example.
typedef gsse::map< 
        gsse::pair<tag_dimension, mpl::int_<0> > 
      , gsse::pair<tag_storage,   gsse::vector_ct<double
                                                  double
                                                  double> > 
      , gsse::pair<tag_index_bs,  long> 
      , gsse::pair<tag_index_fs,  std::string> 
    > vector_field_t;

The existence of any kind of quantity which is to be distributed over all of the topological base space can also serve as a gauge to further qualify how the collection of topological cells subdividing the whole topological space should be shaped. The collection of subdivisions is usually called a mesh and the task of the generation of meshes is called meshing [111][112]. The estimation and judgement of the quality of the mesh not only depends on the quantity being resolved but also the application the mesh is intended for [113].