Topic: Element's local copy of the location array
Looking to add an DOF id array to Element::giveLocationArray, i noticed that the local variable Element::locationArray, isn't ever set.
All the code surrounding it, like invalidateLocationArray, and giveLocationArray are coded as if it was used, but it's not.
In fact, looking back as far as possible (5 years);
https://github.com/Micket/oofem/blob/dd … /element.C
it wasn't used back there either. this->locationArray will always be NULL (no "new IntArray" anywhere)
I've done a bit of benchmarking on a couple of problems, and I've never noticed giveLocationArray taking up any significant time whatsoever, so this is another thing where we can safely value simplicity instead of needlessly cache'ing variables.