Skip to content

Projection onto a symmetry class ​

<!– crosslinks: written by .github/scripts/crosslinks.py from docs/crosslinks.toml; do not edit –>

<!– /crosslinks –>

Given an arbitrary tensor, find the closest one having a prescribed material symmetry — and, if the orientation is unknown, find that too. This page states the problem, derives the closed forms TensND uses at fixed orientation, and describes the optimizer used when the orientation is free.

Implementation: src/tens_projection.jl and, for the orientation search, src/orientation_search.jl. The formulation follows the one of the Echoes C++ library; the general theory of closest tensors of prescribed symmetry is due to Moakher and Norris (2006), and the harmonic-decomposition alternative to Browaeys and Chevrot (2004).

The problem ​

Let be a symmetry class — a linear subspace once the orientation is fixed. With the Frobenius scalar product of Tensor algebra,

so is the orthogonal projection of onto . project returns the triple

ReturnedMeaning
the projected tensor, in the storage type of the class
absolute distance  
relative distance

Because the Kelvin–Mandel map is an isometry (Kelvin–Mandel representation), the whole computation is done on   matrices.

Fixed orientation: the normal equations ​

Write a basis of and  . Stationarity of   gives the normal equations

In general this is an   linear solve. The reason TensND never performs one is that in the bases it uses, the Gram matrix is diagonal.

Transverse isotropy ​

The major-symmetric TI subspace is spanned by the symmetrized Walpole basis ``\mathbb{W}^s=(\mathbb{W}_1,\ \mathbb{W}_2,\ \mathbb{W}_3+\mathbb{W}_4, MarkdownAST.LineBreak()

\mathbb{W}_5,\ \mathbb{W}_6)``, whose Gram matrix is (The Walpole basis)

Each coefficient is therefore an independent quotient,  . Expanding the scalar products on the   matrix   in the frame where  , and writing

gives the closed forms implemented in _project_TI_KM:

Every one of them is a plain average of the entries the corresponding selects — which is what an orthogonal projection onto an orthogonal basis must look like.

Orthotropy ​

Same argument with the nine orthotropic generators, which are likewise mutually orthogonal. The projection at fixed frame simply keeps the block-diagonal part and symmetrizes (_project_ORTHO_KM):

everything outside the two blocks being discarded. For an order-2 tensor the same reasoning reduces to keep the diagonal in the material frame.

Cubic symmetry ​

The cleanest case of all, because the three generators are not merely mutually orthogonal but are projectors summing to the identity. The normal equations degenerate into three traces (_project_CUBIC_KM):

the divisors being the traces of the projectors themselves. Concretely, is the mean of the whole upper   block, the mean of its diagonal minus its off-diagonal, the mean of the shear diagonal — so the projection averages rather than discards, and a non-major-symmetric input is symmetrized implicitly by the same traces.

At order 2 there is nothing to do: the octahedral group leaves no second-order tensor invariant but a multiple of the identity, so the cubic projection is the isotropic one. See Cubic symmetry.

With a free orientation the treatment is the orthotropic one unchanged: the cube orientation is an ordinary rotation, so the objective is smooth and the same optimizer applies, started from the same eigenstructure candidate. The discreteness of shows up only as a 24-fold degenerate minimum.

Isotropy ​

The two-dimensional case, already given in Isotropic tensors:       . No orientation is involved, so this case is complete on its own.

Free orientation ​

When the axis or frame is unknown, is no longer a subspace: the admissible set is the union of the rotated subspaces

with the orthogonal Kelvin–Mandel rotation of Rotations. The problem becomes

Condensing out the linear part ​

For a given the inner minimization over is the linear problem already solved. Substituting its solution, and using that is the orthogonal projection of the rotated tensor — so that     by Pythagoras — the objective collapses to a function of the orientation alone:

This is literally what _obj_TI4 and _obj_ORTHO4 compute: rotate, project, compare norms. Maximizing the norm of the projection is minimizing the distance, and only two or three angles remain — for transverse isotropy, for orthotropy.

Differentiating the normal equations shows that the gradient needs no derivative of :

In practice TensND obtains this gradient by automatic differentiation (ForwardDiff through the objective), which is exact to machine precision and removes any risk of the analytic expression drifting from the code.

When the orientation is free, project searches it, with no dependency beyond ForwardDiff:

  1. the objective is screened on a fixed, quasi-uniform set of orientations: 200 axes spread over a hemisphere along a golden-angle spiral for the TI axis; 100 such axes, each with four turns about it, for an orthotropic or a cubic frame — a quarter turn about an axis of the frame maps it onto an equivalent one. An evaluation costs about a third of a microsecond;

  2. Newton's method on the angles refines the three (TI) or four (frames) best screened orientations, the eigenstructure candidate (_candidate_TI_axis, _candidate_ORTHO_frame — exact whenever the tensor genuinely has the symmetry sought; there is none for the cubic class, every second-order contraction of a cubic tensor being isotropic) and the canonical orientation. The Hessian is exact (ForwardDiff, a   or   matrix), so the refinement converges quadratically near a minimum; away from one, each eigen-direction is scaled by the absolute value of its curvature and a backtracking line search keeps the objective decreasing;

  3. the best objective over every refined orientation is kept.

Three properties follow:

  • reproducibility — no random step, so repeated calls return bit-identical angles;

  • no regression — the result is never worse than the projection about any refined orientation, the eigenstructure candidate and the canonical one included;

  • globality, as measured — on 150 random anisotropic stiffnesses, the minimum found matched, to rounding, that of a dense search (3,000 axes; 7,200 frames, the best of each refined), which a multi-start from a dozen fixed points missed for about one TI tensor in twenty. The test suite repeats the comparison on random tensors.

At order 2 no search is needed. In the frame of the eigenvectors of the symmetric part of , the orthotropic projection keeps all of that part, the most any frame can keep, so that frame is the optimum. About an axis , the transversely isotropic projection is        with      and   ; its squared norm    is convex in , which ranges over the eigenvalues of the symmetric part, so the optimum is at the smallest or the largest one, and the axis is the corresponding eigenvector.

Detecting the symmetry: the cascade ​

best_sym_tens tries the classes from the most restrictive to the least and returns the first whose relative error falls below a tolerance :

The chain is ordered by number of constants — 2, 3, 5, 9 — and not by inclusion, because it cannot be: and are incomparable, their intersection being and neither containing the other. A tensor satisfying both is reported cubic, having the fewer constants; one satisfying neither falls through to , which contains them both.

The relative criterion is what makes the tolerance dimensionless and independent of the units of the moduli. Two modes:

optimize_anglesTI axis / ORTHO frame / CUBIC frame
false (default)taken from the tensor if it is a structured container, otherwise from the Kelvin–Mandel eigenstructure
truefound by the search above

The value-level predicates isisotropic, istransverselyisotropic, isorthotropic, iscubic are the same computation with a boolean answer.

Projection is not averaging ​

Two different operations are easily confused, and only one of them is on this page.

Projection (this page)Group average
definitionclosest element of the subspace    
resultbest fit in the classexact invariant part
target spacemajor-symmetric subspace (5 or 9 parameters)full commutant (8 parameters for TI)
discardseverything orthogonal to the subspacenothing invariant

For a major-symmetric input the two coincide. For an input that is not major-symmetric — a strain-concentration tensor, typically — they differ: the average preserves the   split and the couplings , of The extended Walpole algebra, whereas the best fit forces   and drops . Reporting one where the other is meant silently deletes physical content.

The choice of distance ​

Everything above minimizes the Euclidean (Frobenius) distance. That choice is not neutral: it is not invariant under inversion, so projecting a stiffness and projecting its compliance give different materials (Isotropic tensors). Distances that repair this — log-Euclidean, power-Euclidean, arctan-Euclidean — are constructed by Morin et al. (2020). TensND implements the Euclidean one only, so a reported projection should always state which of or was projected.