morpho
morpho copied to clipboard
CauchyGreenStrain
Makes the Cauchy Green strain tensor:
C = (F G - 1)/2
where:
- F is the gram matrix in the deformed frame.
- G is the INVERSE of the gram matrix in the reference frame.
C vanishes if the deformed and reference frames coincide.
You must supply a reference mesh to your Integral constructor; you can then call cgtensor() within an integrand:
fn integrand(x, f) {
var cg = cgtensor()
return cg.trace()
}
var a = AreaIntegral(integrand, phi, reference=mref)