Tensor invariants in numerical geometric integration of ODEs