Topic: FloatArray incorrect documentation; Memory initialization or not
The resize() function in floatarray currently works as sort of "resizeWithValues". It will keep the old stuff, and set zero values on the new portion. This code is a bit convoluted, since we also allow for "allocChunk" (which is actually ignroed if the old size is enough for the new size (excluding extra allocation).
Now, the documentation says the memory has to be zeroed first, which isn't true (well, if you increase the size, the old values are preserved). Most of the times, code in OOFEM doesn't (and often it can't) rely on the fact that the vector is zeroed, so it calls zero() again.
Nearly no code wants to actually keep the old vector values after a resize.
Short version: I want to make FloatArray::resize() not zero values, and not copy old values.
Alternative option, always zero memory when resizing, and not copy the old values (possible introduce "resizeWithValues()" is this is really needed.
I would have the DEBUG code will initialize everything to NaN so it's easy to spot whenever you forgot to zero() the vector.