Creating a Node-Node Connectivity Array

So for ALE/SALE, we need a connectivity array linking nodes together. Let's look again at part of our mesh: This time, I have labelled both the cells and the nodes. Let's consider node 114 - we need to create a node-node connectivity, nodnodconn, such that: nodnodconn[1, 114] = 113 nodnodconn[2, 114] = 118 nodnodconn[3, 114] = 56 nodnodconn[4, 114] = 57 We currently have two pieces of information which we can use to construct this connectivity: The identities of the nodes surrounding any given cell (nodelist) The orthogonal neighbours of any given cell (elelconn) Let's look at how we might map our nodnodconn array onto a simple 4 cell/9 node stencil: Here, we would be looping over cells rather than nodes, and our aim is to create the nodnodconn entries for N0. I.e: nodnodconn[1, N0] = N1 nodnodconn[2, N0] = N2 nodnodconn[3, N0 ] = N3 nodnodconn[4, N0 ] = N4 The positions of the node labels in the diagram shows the easiest way to access them given ...