Applying periodic boundary conditions in computational homogenization method

I want to apply this type of boundary on a cube : T= G*x +t
where the fluctuation t is periodic. It takes the same values at two homologous points on opposite faces of the boundaries of the elementary volume V, and G is a constant vector independent of the vector position x.
can you help me please ?