morphogen.homogenization.tensors

Small dense algebra of the integration kernels (numba): 3 x 3 tensors, their Voigt components, the eigen-decomposition of symmetric tensors and the divided differences of the logarithm (functions of symmetric tensors, Daleckii-Krein), and Gaussian elimination.

Voigt order (11, 22, 33, 23, 31, 12): strains with engineering shears, stresses with their tensor components. Second-order tensors of 9 components (deformation gradients, first Piola-Kirchhoff stresses) are stored row by row: iJ -> 3 i + J.

morphogen.homogenization.tensors.matmul3(a, b, out)[source]

out = a b.

morphogen.homogenization.tensors.tmatmul3(a, b, out)[source]

out = a^T b.

morphogen.homogenization.tensors.matmult3(a, b, out)[source]

out = a b^T.

morphogen.homogenization.tensors.strain_voigt(t, out)[source]

Engineering Voigt components of a symmetric tensor (a strain).

morphogen.homogenization.tensors.stress_tensor(v, out)[source]

Symmetric tensor of Voigt stress components.

morphogen.homogenization.tensors.elastic_stress(d, strain, out, e6, s6)[source]

out = D : strain (tensors) for the elasticity matrix d (Voigt).

morphogen.homogenization.tensors.project(lv, nv, t)[source]

l . t . n.

morphogen.homogenization.tensors.symmetrize(a)[source]

A square matrix replaced by its symmetric part, in place (the consistent tangents of the points for the conjugate gradients).

morphogen.homogenization.tensors.inverse3(a, out)[source]

Inverse of a 3 x 3 matrix; returns its determinant.

morphogen.homogenization.tensors.gauss_solve(a, b, n, m)[source]

Solve a[:n, :n] x = b[:n, :m] in place by Gaussian elimination with partial pivoting: b receives x, a is overwritten. Returns 1 if a is singular.

morphogen.homogenization.tensors.eigh3(a, w, v)[source]

Eigenvalues w and orthonormal eigenvectors (columns of v) of a symmetric 3 x 3 matrix, by Jacobi’s method (accurate for close eigenvalues); a is overwritten.

morphogen.homogenization.tensors.half_log(mu)[source]

f(1 + mu) = 1/2 ln(1 + mu).

morphogen.homogenization.tensors.log_divided(x, y)[source]

First divided difference f[1 + x, 1 + y] of f = 1/2 ln (x, y > -1: the eigenvalues of C - I), exact for close and equal arguments.

morphogen.homogenization.tensors.log_divided2(x, y, z)[source]

Second divided difference f[1 + x, 1 + y, 1 + z] of f = 1/2 ln, symmetric in its arguments; a Taylor series about their mean when they are close.