  Generically, a fully measured elasticity tensor has no material symmetry. For
single crystals with a cubic lattice, or for the aeronautics turbine blades
superalloys such as Nickelbased CMSX-4, cubic symmetry is nevertheless
expected. It is in practice necessary to compute the nearest cubic elasticity
tensor to a given raw one. Mathematically formulated, the problem consists in
finding the distance between a given tensor and the cubic symmetry stratum. It
is known that closed symmetry strata (for any tensorial representation of the
rotation group) are semialgebraic sets, defined by polynomial equations and
inequalities. It has been recently shown that the closed cubic elasticity
stratum is moreover algebraic, which means that it can be defined by polynomial
equations only (without requirement to polynomial inequalities). We propose to
make use of this mathematical property to formulate the distance to cubic
symmetry problem as a polynomial (in fact quadratic) optimization problem, and
to derive its quasi-analytical solution using the technique of Gr{\"o}bner
bases. The proposed methodology also applies to cubic Hill elasto-plasticity
(where two fourth-order constitutive tensors are involved).
