[common] fixes multiple definition fail
[grid] adds per-entity Dimensions + automatic reference elements retrieval