The purpose of Shards is to provide a suite of common tools for numerical and topological data that facilitate interoperability between typical software modules used to solve Partial Differential Equations (PDEs) by finite element, finite volume and finite difference methods. Shards comprises of two categories of tools: methods to manage and access information about cell topologies used in mesh-based methods for PDEs, and methods to work with multi-dimensional arrays used to store numerical data in corresponding computer codes. The basic cell topology functionality of Shards includes methods to query adjacencies of subcells, find subcell permutation with respect to a global cell and create user-defined custom cell topologies. Multi-dimensional array part of the package provides specialized compile-time dimension tags, multi-index access methods, rank and dimension queries.

Shards design is based on a domain model for cell topology data motivated by algebraic topology. In this approach the mesh is viewed as a chain complex consisting of 0,1,2 and 3-dimensional cells representing the nodes, edges, faces and elements in the mesh. Cell topologies are explicitly defined by a composition of subcells of dimension less or equal to that of the parent cell.

Overview

Cells and cell topology

In Shards cell refers to a d-dimensional polytope, d=1,2,3. A polytope is defined by a set of its vertices_{V0,V1,…,Vv}_ and a base topology BT that defines how these verices are connected into k-dimensional, k < d facets (k-subcells) of that polytope. The base topology of any polytope can be extended by augmenting the set of its vertices by an additional set of points {P0,P1,…,Pp}. The extended topology ET is defined by specifying the connectivity of the set {V0,V1,…,Vv} + {P0,P1,…,Pp} relative to the subcells specified by its base topology BT. The vertices and the extra points are collectively referred to as nodes. Thus, a polytope with extended topology ET is defined by a set of nodes {N0,N1,…,Nn} where n = v + p, and a connectivity rule for these nodes.

Shards provides definitions for a standard set of base and extended cell topologies plus tools to construct custom, user defined cell topologies, such as arbitrary polyhedral cells. The nodes in all Shards topologies are ordered by listing the cell vertices first. For example, the nodes of Triangle<6>are ordered as {N0,N1,N2,N3,N4,N5} where {N0,N1,N2} are the three vertices and {N3,N4,N5} are the three edge midpoints. Every cell with an extended topology also has a base topology. The base topology of Triangle<6> is Triangle<3>, defined by its 3 vertices {V0,V1,V2}.

Remark. Shards provides only cell topologies, i.e., the connectivity rules for a cell and its lower-dimensional subcells. Shards does not specify what are the coordinates of the nodes forming a cell.

A list of all Shards cell topologies follows. Bold face numerals indicate the vertices of each cell topology.

0- and 1-dimensional cell topologies
Name nodes Description
Node<> {0} A single node topology
Line<2> {0,1} Base line topology, equivalent to Line<>
Line<3> {0,1,2} Extended line topology with 1 edge node.
2-dimensional cell topologies
Name nodes Description
Triangle<3> {0,1,2} Base triangle (2-simplex), same as Triangle<>
Triangle<4> {0,1,2,3} Extended triangle with 1 interior node
Triangle<6> {0,1,2,3,4,5} Extended triangle with 3 edge nodes
Quadrilateral<4> {0,1,2,3} Base quadrilateral (2-cube), same as Quadrilateral<>
Quadrilateral<8> {0,1,2,3,4,5,6,7} Extended quadrilateral with 4 edge nodes
Quadrilateral<9> {0,1,2,3,4,5,6,7,8} Extended quadrilateral with 4 edge and 1 interior nodes
ShellLine<2> {0,1} Base shell line, same as ShellLine<>
ShellLine<3> {0,1,2} Extended shell line with 1 edge node
Beam<2> {0,1} Base beam, same as Beam<>
Beam<3> {0,1,2} Extended beam with 1 edge node
Pentagon<5> {0,1,2,3,4} Base pentagon, same as Pentagon<>
Hexagon<6> {0,1,2,3,4,5} Base hexagon, same as Hexagon<>
3-dimensional cell topologies
Name nodes Description
Tetrahedron<4> {0,1,2,3} Base tetrahedron (3-simplex), same as Tetrahedron<>
Tetrahedron<8> {0,1,2,3,4,5,6,7} Extended tetrahedron with 4 face nodes
Tetrahedron<10> {0,1,2,3,4,5,6,7,8,9} Extended tetrahedron with 6 edge nodes
Hexahedron<8> {0,1,2,3,4,5,6,7} Base hexahedron, same as Hexahedron<>
Hexahedron<20> {0,1,2,3,4,5,6,7,…,20} Extended hexahedron with 12 edge nodes
Hexahedron<27> {0,1,2,3,4,5,6,7,…,27} Extended hexahedron with 12 edge, 6 face & 1 interior nodes
Pyramid<5> {0,1,2,3,4} Base pyramid, same as Pyramid<>
Pyramid<13> {0,1,2,3,4,5,…,12} Extended pyramid with 8 edge nodes
Pyramid<14> {0,1,2,3,4,5,…,13} Extended pyramid with 8 edge and 1 quad face nodes
Wedge<6> {0,1,2,3,4,5} Base wedge, same as Wedge<>
Wedge<15> {0,1,2,3,4,5,6,…,14} Extended wedge with 9 edge nodes
Wedge<18> {0,1,2,3,4,5,6,…,17} Extended wedge with 9 edge and 3 quad face nodes