How are the nodes / elements in the vectors are related to the mesh? Maybe it is sufficient to store ids?