Given a strain tensor $\boldsymbol{\varepsilon}$, the objective is to calculate the displacement field $\boldsymbol{u}$ with respect to some fixed reference coordinate system.
Within the infinitesimal strain theory, the strain tensor is calculate from the displacement field from
\[\varepsilon_{ij} = \frac{1}{2}\left(\frac{\partial u_i}{\partial x_j} + \frac{\partial u_j}{\partial x_i}\right),\]and contains 6 independent components:
\[\boldsymbol{\varepsilon} = \begin{bmatrix} \varepsilon_{xx} & \varepsilon_{xy} & \varepsilon_{xz} \\ *& \varepsilon_{yy} & \varepsilon_{yz} \\ * & * & \varepsilon_{zz} \\ \end{bmatrix}.\]The displacement field under constant strain $\varepsilon_{ij}^a$ can be then calculated
\[\begin{split} u & = \varepsilon_{xx}^a x + f1(y) + f2(z)\\ v & = \varepsilon_{yy}^a y + g1(x) + g2(z)\\ w & = \varepsilon_{zz}^a z + h1(y) + h2(x)\\ \frac{\partial f1}{\partial y} + \frac{\partial g1}{\partial x} &= \varepsilon_{xy}^a \rightarrow B + D = \varepsilon_{xy}^a\\ \frac{\partial g2}{\partial z} + \frac{\partial h1}{\partial y} &= \varepsilon_{yz}^a \rightarrow F + H = \varepsilon_{yz}^a\\ \frac{\partial h2}{\partial x} + \frac{\partial f2}{\partial z} &= \varepsilon_{zx}^a \rightarrow J + L = \varepsilon_{zx}^a\\ \end{split},\]from which it is obtained
\[\begin{split} u & = \varepsilon_{xx}^a x + A + By + K + Lz = \varepsilon_{xx}^a x + A' + By + Lz \\ v & = \varepsilon_{yy}^a y + C + Dx + E + Fz = \varepsilon_{yy}^a y + C' + Dx + Fz \\ w & = \varepsilon_{zz}^a z + G + Hy + I + Jx = \varepsilon_{zz}^a z + G' + Hy + Jx \\ \end{split}.\]Fixing a $a\times a\times a$ cube in space with the following boundar condtions: $u(0,0,0) = 0$, $v(0,0,0) = 0$, $w(0,0,0) = 0$, $v(a,0,0) = 0$, $w(a,0,0) = 0$, $w(a,a,0) = 0$, six equations of the six unknown constants are solved:
\[\begin{split} A' & = 0\\ B & = \varepsilon_{xy}^a\\ C' & = 0\\ D & = 0\\ F & = \varepsilon_{yz}^a\\ G' & = 0\\ H & = 0\\ J & = 0\\ L & = \varepsilon_{zx}^a\\ \end{split},\]which gives:
\[\begin{split} u & = \varepsilon_{xx}^a x + \varepsilon_{xy}^a y + \varepsilon_{xz}^a z\\ v & = \varepsilon_{yy}^a y + \varepsilon_{yz}^a z\\ w & = \varepsilon_{zz}^a z\\ \end{split}.\]