37template <TangentModuliTags tag,
typename Derived,
typename ST>
39 const Eigen::TensorFixedSize<ST, Eigen::Sizes<3, 3, 3, 3>>& C,
const Eigen::MatrixBase<Derived>& sPK2,
40 const Eigen::MatrixBase<Derived>& F) {
41 static_assert(Concepts::EigenMatrix33<Derived>);
43 const auto& S = sPK2.derived();
44 const Eigen::Matrix<ST, 3, 3> Id = Eigen::Matrix<ST, 3, 3>::Identity();
45 constexpr int dim = 3;
46 Eigen::TensorFixedSize<ST, Eigen::Sizes<dim, dim, dim, dim>> A;
48 for (
const auto i : Dune::range(dim))
49 for (
const auto J : Dune::range(dim))
50 for (
const auto k : Dune::range(dim))
51 for (
const auto L : Dune::range(dim)) {
52 A(i, J, k, L) += Id(i, k) * S(J, L);
53 for (
const auto I : Dune::range(dim))
54 for (
const auto K : Dune::range(dim))
55 A(i, J, k, L) += C(I, J, K, L) * F(i, I) * F(k, K);
61 static_assert(Dune::AlwaysFalse<ST>::value,
62 "Transformation from spatial to two-point material tensor is not implemented.");
80template <TangentModuliTags from, TangentModuliTags to,
typename DerivedS,
typename DerivedF,
typename ST>
82 const Eigen::MatrixBase<DerivedS>& sRaw,
const Eigen::MatrixBase<DerivedF>& F) {
83 static_assert(Concepts::EigenMatrix33<DerivedF>);
85 const auto S = Impl::maybeFromVoigt(sRaw.derived(),
false);
87 if constexpr (from == to)
90 return createTwoPointMaterialTensor<from>(C, S, F);
92 static_assert(Dune::AlwaysFalse<ST>::value,
"Transformation only to two-point material tensor is implemented.");
Helper for the Eigen::Tensor types.
helper functions used by material model implementations.
Definition of several material related enums.
Definition: assemblermanipulatorbuildingblocks.hh:22
Eigen::TensorFixedSize< ST, Eigen::Sizes< 3, 3, 3, 3 > > createTwoPointMaterialTensor(const Eigen::TensorFixedSize< ST, Eigen::Sizes< 3, 3, 3, 3 > > &C, const Eigen::MatrixBase< Derived > &sPK2, const Eigen::MatrixBase< Derived > &F)
Create two-point material tensor based on the input.
Definition: materialconversions.hh:38
auto transformTangentModuli(const Eigen::TensorFixedSize< ST, Eigen::Sizes< 3, 3, 3, 3 > > &C, const Eigen::MatrixBase< DerivedS > &sRaw, const Eigen::MatrixBase< DerivedF > &F)
Transform tangent moduli measures from one type to another.
Definition: materialconversions.hh:81