A simpler and more flexible method for getting DOF numbers would be to not number DOFs themselves, but to number nodes themselves, and whenever the number of dof i on a particular node is needed, to calculated it as nodenum*numdofpernode + i. This has two principle advantages: 1) it reduces memory bandwidth usage and 2) every node now has a unique, unit-stride number assigned to it, which would make some of the bookkeeping associated with sub-triangulation easier.
A simpler and more flexible method for getting DOF numbers would be to not number DOFs themselves, but to number nodes themselves, and whenever the number of dof
i
on a particular node is needed, to calculated it asnodenum*numdofpernode + i
. This has two principle advantages: 1) it reduces memory bandwidth usage and 2) every node now has a unique, unit-stride number assigned to it, which would make some of the bookkeeping associated with sub-triangulation easier.