Add space coordinate checking in Domain class

During computation, the space coordinate may exceed the domain axis
ranges. When the axis boundary condition is periodic, we should put the
space coordinate back into the domain.