14#include <unsupported/Eigen/MatrixFunctions>
33template <StrainTags tag,
typename Derived>
35 const auto& e = eMB.derived();
37 static_assert(Concepts::EigenMatrix33<Derived> or Concepts::EigenMatrix22<Derived>);
41 return 0.5 * (e.transpose() * e - Derived::Identity());
43 return 0.5 * (e + e.transpose() + e.transpose() * e);
45 return 0.5 * (e - Derived::Identity());
58template <StrainTags tag,
typename Derived>
60 const auto& e = eMB.derived();
62 static_assert(Concepts::EigenMatrix33<Derived> or Concepts::EigenMatrix22<Derived>);
68 return (2 * e + Derived::Identity()).sqrt();
72 return e + Derived::Identity();
88template <StrainTags tag,
typename Derived>
90 const auto& e = eMB.derived();
92 static_assert(Concepts::EigenMatrix33<Derived> or Concepts::EigenMatrix22<Derived>);
97 return 2 * e + Derived::Identity();
99 return e.transpose() * e;
101 const auto F = e + Derived::Identity();
102 return F.transpose() * F;
118template <StrainTags from, StrainTags to,
typename Derived>
121 "No useful transformation available for linear strains.");
122 const auto e = Impl::maybeFromVoigt(eRaw.derived(),
true);
123 if constexpr (from == to)
126 return createGreenLagrangianStrains<from>(e);
128 return createDeformationGradient<from>(e);
130 return createRightCauchyGreen<from>(e);
Helper for the Eigen::Tensor types.
Definition of several material related enums.
helper functions used by material model implementations.
Definition: assemblermanipulatorbuildingblocks.hh:22
Derived createDeformationGradient(const Eigen::MatrixBase< Derived > &eMB)
Create the deformation gradient based on the input.
Definition: strainconversions.hh:59
Derived createRightCauchyGreen(const Eigen::MatrixBase< Derived > &eMB)
Create right Cauchy-Green tensor based on the input.
Definition: strainconversions.hh:89
Derived createGreenLagrangianStrains(const Eigen::MatrixBase< Derived > &eMB)
Create Green-Lagrangian strain based on the input.
Definition: strainconversions.hh:34
auto transformStrain(const Eigen::MatrixBase< Derived > &eRaw)
Transform strain from one type to another.
Definition: strainconversions.hh:119