I am trying to develop a library for finite element methods in C++ and for that I am looking at the data structures for meshes. Based on what I've read up on fenics and deal.ii, the general understanding seems to be that a basic mesh class should have the following members:
- Cells, Faces, vertices.
- Connectivity relationships (What are the neighbors of a given cell, common faces between cells, vertices of a given cell, boundary indicators for cells, faces and vertices)
- Cell iterators
These are my questions:
- What is the best way to store cells of a mesh. I think an STL vector would suffice. Is this the popular option? I have also read that linked lists have been used for cells but I cannot see the advantage of linked lists over vectors in this case.
- Again, for the connectivity relationships, STL maps seem to be the best method for me. Any comments on this?
- Does the same data structure work for both triangular and quadrilateral meshes. I think it should but I am not sure if I am missing anything basic here?
- Are there any more connectivity relationships to be kept in mind?
- Are there any good references for programming a finite element library?