Morpho-lang / morpho

The Morpho language 🦋. Morpho is a small embeddable language for scientific computing applications.
MIT License
30 stars 10 forks source link

CauchyGreenStrain #270

Open softmattertheory opened 2 months ago

softmattertheory commented 2 months ago

Makes the Cauchy Green strain tensor:

C = (F G - 1)/2

where:

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)