I will be implementing nodal discontinuous Galerkin method soon, and having done this before I know the basic indexing arrays I will need to compute, given a mesh and polynomial data.
The problem I ran into in previous code were subtle mistakes I made in computing things like interior/exterior trace indexing. Problems which didn't arise on simpler test cases would arise on larger meshes, and usually this yields an unstable scheme since boundary conditions are not properly imposed (so no chance of just watching the simulation every 10 steps or so and seeing a localized problem).
I'm hoping some more experienced folks here know good tests to run on the index arrays to get some confidence that they are right. Quadratures, derivatives and the like are very easy to test, but other things I can't figure out.
Some tests I have done in the past is adding interior normals to exterior normals, which should yield 0 or +-2. Being able to quickly see the result of some code change is helpful, but I can't think of a meaningful way to do this with indexing.
I should also mention that these are going in for quads and hexes, with the potential for curvilinear elements. Not much existing code is there to compare against a working library already.
Bonus points if there are good unit tests that I can write which wouldn't rely on an existing correct answer to compare against. I'll settle for a lot of good heuristics.