Connectivity Representations#
While meshes are primarily defined as a collection of elements, with each element being defined
by referencing the nodes that comprise it, a variety of data structures can be constructed to
represent connections between different mesh entities, such as nodes, elements, edges, and faces
which may be useful for performing different mesh operations or analysis. Each connectivity type
is represented as a 2D data structure, with each row corresponding one entity and containing
indices associated with another (e.g. each row of NodeConn
corresponds to an element and
contains indices associated with the list of nodes). Most of these data structures are
non-rectangular (or “ragged”) as the number of connections per entity may vary. The
connectivities listed in the following table can all be obtained from the the node connectivity
list (NodeConn
) using either the mesh
class (see Working with the mesh class) or the
converter
module.
Connectivity Type |
Row Correspondence |
Index Association |
---|---|---|
Node Connectivity ( |
Element |
Node |
Node Neighbors ( |
Node |
Node |
Element Connectivity ( |
Node |
Element |
Element Neighbors ( |
Element |
Element |
Edge |
Node |
|
Edge Connectivity ( |
Element |
Edge |
Edge-Element ( |
Edge |
Element |
Face |
Node |
|
Face Connectivity ( |
Element |
Face |
Face-Element ( |
Face |
Element |
2D Example#
The below example shows several connectivity representations of the same mesh consisting, of three triangular elements. In each case, the entity corresponding to the first row is indicated in blue and the associated connections are indicated in red.
NodeCoords = [[0,0,0], [1,.1,0], [.9,.9,0], [-.1,1,0], [-.5,.5,0]]
NodeConn = [[0, 1, 3], [1, 2, 3], [0, 3, 4]]
![graph tris {
node [shape=point, fontname="source code pro"];
edge [style=solid];
0 [pos="0,0!", color="cornflowerblue"];
1 [pos="1,0.1!", color="firebrick"];
2 [pos="0.9,0.9!"];
3 [pos="-0.1,1.0!", color="firebrick"];
4 [pos="-.5,.2!", color="firebrick"]
0 -- 1;
1 -- 2;
1 -- 3;
2 -- 3;
3 -- 0;
3 -- 4;
4 -- 0;
node0 [label="0", pos="0,-0.15!", shape=none, fontname="source code pro", fontcolor="cornflowerblue"]
node1 [label="1", pos="1,-0.05!", shape=none, fontname="source code pro", fontcolor="firebrick"]
node2 [label="2", pos="1.0,1.0!", shape=none, fontname="source code pro"]
node3 [label="3", pos="-0.1,1.1!", shape=none, fontname="source code pro", fontcolor="firebrick"]
node4 [label="4", pos="-0.6,.2!", shape=none, fontname="source code pro", fontcolor="firebrick"]
// elem0 [label="0", pos=".3,.3!", shape=none, fontname="source code pro"]
// elem1 [label="1", pos=".6,.7!", shape=none, fontname="source code pro"]
// elem2 [label="2", pos="-.2,.5!", shape=none, fontname="source code pro"]
}](../_images/graphviz-79be3c94c92cbea122f64bc72f76b29e0aac0f7c.png)
NodeNeighbors = [[3, 4, 1],
[0, 2, 3],
[1, 3],
[1, 2, 0, 4],
[3, 0]]
![graph tris {
node [shape=point, fontname="source code pro"];
edge [style=solid];
0 [pos="0,0!"];
1 [pos="1,0.1!"];
2 [pos="0.9,0.9!"];
3 [pos="-0.1,1.0!"];
4 [pos="-.5,.2!"]
0 -- 1;
1 -- 2;
1 -- 3;
2 -- 3;
3 -- 0;
3 -- 4;
4 -- 0;
node0 [label=" ", pos="0,-0.15!", shape=none, fontname="source code pro"]
node1 [label=" ", pos="1,-0.05!", shape=none, fontname="source code pro"]
node2 [label=" ", pos="1.0,1.0!", shape=none, fontname="source code pro"]
node3 [label=" ", pos="-0.1,1.1!", shape=none, fontname="source code pro"]
node4 [label=" ", pos="-0.6,.2!", shape=none, fontname="source code pro"]
elem0 [label="0", pos=".3,.3!", shape=none, fontname="source code pro", fontcolor="cornflowerblue"]
elem1 [label="1", pos=".6,.7!", shape=none, fontname="source code pro", fontcolor="firebrick"]
elem2 [label="2", pos="-.2,.2!", shape=none, fontname="source code pro", fontcolor="firebrick"]
}](../_images/graphviz-01c3cfe3ee86a1a058f0c48fb9b47e7070c9a274.png)
ElemNeighbors = [[1, 2],
[0],
[0]]
![graph tris {
node [shape=point, fontname="source code pro"];
edge [style=solid];
0 [pos="0,0!", color="cornflowerblue"];
1 [pos="1,0.1!"];
2 [pos="0.9,0.9!"];
3 [pos="-0.1,1.0!"];
4 [pos="-.5,.2!"]
0 -- 1;
1 -- 2;
1 -- 3;
2 -- 3;
3 -- 0;
3 -- 4;
4 -- 0;
node0 [label="0", pos="0,-0.15!", shape=none, fontname="source code pro", fontcolor="cornflowerblue"]
node1 [label="1", pos="1,-0.05!", shape=none, fontname="source code pro"]
node2 [label="2", pos="1.0,1.0!", shape=none, fontname="source code pro"]
node3 [label="3", pos="-0.1,1.1!", shape=none, fontname="source code pro"]
node4 [label="4", pos="-0.6,.2!", shape=none, fontname="source code pro"]
elem0 [label="0", pos=".3,.3!", shape=none, fontname="source code pro", fontcolor="firebrick"]
elem1 [label="1", pos=".6,.7!", shape=none, fontname="source code pro"]
elem2 [label="2", pos="-.2,.2!", shape=none, fontname="source code pro", fontcolor="firebrick"]
}](../_images/graphviz-e1f5e967e4d77ed83fcef25bb7fa8bbf667cc1e5.png)
ElemConn = [[0, 2],
[0, 1],
[1],
[0, 1, 2],
[2]]
![graph tris {
node [shape=point, fontname="source code pro"];
edge [style=solid];
0 [pos="0,0!", color="firebrick"];
1 [pos="1,0.1!", color="firebrick"];
2 [pos="0.9,0.9!"];
3 [pos="-0.1,1.0!"];
4 [pos="-.5,.2!"]
0 -- 1 [color="cornflowerblue"];
1 -- 2;
1 -- 3;
2 -- 3;
3 -- 0;
3 -- 4;
4 -- 0;
node0 [label="0", pos="0,-0.15!", shape=none, fontname="source code pro", fontcolor="firebrick"]
node1 [label="1", pos="1,-0.05!", shape=none, fontname="source code pro", fontcolor="firebrick"]
node2 [label="2", pos="1.0,1.0!", shape=none, fontname="source code pro"]
node3 [label="3", pos="-0.1,1.1!", shape=none, fontname="source code pro"]
node4 [label="4", pos="-0.6,.2!", shape=none, fontname="source code pro"]
elem0 [label=" ", pos=".3,.3!", shape=none, fontname="source code pro"]
elem1 [label=" ", pos=".6,.7!", shape=none, fontname="source code pro"]
elem2 [label=" ", pos="-.2,.2!", shape=none, fontname="source code pro"]
}](../_images/graphviz-1ab8e8f7ea1b075ef0bccf0c715a4948598ab209.png)
Edges = [[0, 1],
[3, 0],
[4, 0],
[1, 2],
[1, 3],
[2, 3],
[3, 4]]
![graph tris {
node [shape=point, fontname="source code pro"];
edge [style=solid];
0 [pos="0,0!"];
1 [pos="1,0.1!"];
2 [pos="0.9,0.9!"];
3 [pos="-0.1,1.0!"];
4 [pos="-.5,.2!"]
0 -- 1 [color="firebrick"];
1 -- 2;
1 -- 3 [color="firebrick"];
2 -- 3;
3 -- 0 [color="firebrick"];
3 -- 4;
4 -- 0;
node0 [label=" ", pos="0,-0.15!", shape=none, fontname="source code pro"]
node1 [label=" ", pos="1,-0.05!", shape=none, fontname="source code pro"]
node2 [label=" ", pos="1.0,1.0!", shape=none, fontname="source code pro"]
node3 [label=" ", pos="-0.1,1.1!", shape=none, fontname="source code pro"]
node4 [label=" ", pos="-0.6,.2!", shape=none, fontname="source code pro"]
elem0 [label="0", pos=".3,.3!", shape=none, fontname="source code pro", fontcolor="cornflowerblue"]
elem1 [label="1", pos=".6,.7!", shape=none, fontname="source code pro"]
elem2 [label="2", pos="-.2,.2!", shape=none, fontname="source code pro"]
}](../_images/graphviz-bacd8507136512c180baf3c255ad9abc7bd4a56d.png)
EdgeConn = [[0, 4, 1],
[3, 5, 4],
[1, 6, 2]]
![graph tris {
node [shape=point, fontname="source code pro"];
edge [style=solid];
0 [pos="0,0!"];
1 [pos="1,0.1!"];
2 [pos="0.9,0.9!"];
3 [pos="-0.1,1.0!"];
4 [pos="-.5,.2!"]
0 -- 1 [color="cornflowerblue"];
1 -- 2;
1 -- 3;
2 -- 3;
3 -- 0;
3 -- 4;
4 -- 0;
node0 [label=" ", pos="0,-0.15!", shape=none, fontname="source code pro"]
node1 [label=" ", pos="1,-0.05!", shape=none, fontname="source code pro"]
node2 [label=" ", pos="1.0,1.0!", shape=none, fontname="source code pro"]
node3 [label=" ", pos="-0.1,1.1!", shape=none, fontname="source code pro"]
node4 [label=" ", pos="-0.6,.2!", shape=none, fontname="source code pro"]
elem0 [label="0", pos=".3,.3!", shape=none, fontname="source code pro", fontcolor="firebrick"]
elem1 [label="1", pos=".6,.7!", shape=none, fontname="source code pro"]
elem2 [label="2", pos="-.2,.2!", shape=none, fontname="source code pro"]
}](../_images/graphviz-bb7a8b849d1a61b83da3c0895ce1a8e9158af8c6.png)
EdgeElemConn = [[0],
[0, 2],
[2],
[1],
[0, 1],
[1],
[2]]