You need to call buildDmesh() before you define your local fespace named SpaceVector.
buildDmesh()
fespace
SpaceVector