15#ifndef dealii_transformations_h
16#define dealii_transformations_h
28 namespace Transformations
56 template <
typename Number>
89 template <
typename Number>
98 template <
typename Number>
122 namespace Contravariant
142 template <
int dim,
typename Number>
161 template <
int dim,
typename Number>
181 template <
int dim,
typename Number>
200 template <
int dim,
typename Number>
220 template <
int dim,
typename Number>
245 template <
int dim,
typename Number>
264 template <
int dim,
typename Number>
283 template <
int dim,
typename Number>
302 template <
int dim,
typename Number>
321 template <
int dim,
typename Number>
367 template <
int dim,
typename Number>
386 template <
int dim,
typename Number>
406 template <
int dim,
typename Number>
425 template <
int dim,
typename Number>
445 template <
int dim,
typename Number>
470 template <
int dim,
typename Number>
489 template <
int dim,
typename Number>
508 template <
int dim,
typename Number>
527 template <
int dim,
typename Number>
546 template <
int dim,
typename Number>
581 template <
int dim,
typename Number>
601 template <
int dim,
typename Number>
622 template <
int dim,
typename Number>
643 template <
int dim,
typename Number>
665 template <
int dim,
typename Number>
692 template <
int dim,
typename Number>
712 template <
int dim,
typename Number>
732 template <
int dim,
typename Number>
753 template <
int dim,
typename Number>
774 template <
int dim,
typename Number>
809 template <
int dim,
typename Number>
831 template <
int dim,
typename Number>
847 template <
int dim,
typename Number>
863 template <
int dim,
typename Number>
878 template <
int dim,
typename Number>
894 template <
int dim,
typename Number>
910template <
typename Number>
918 const Number rotation[2][2] = {{cos(angle), -sin(angle)},
919 {
sin(angle),
cos(angle)}};
925template <
typename Number>
937 ExcMessage(
"The supplied axial vector is not a unit vector."));
938 const Number c =
cos(angle);
939 const Number s =
sin(angle);
940 const Number t = 1. - c;
941 const Number rotation[3][3] = {{t * axis[0] * axis[0] + c,
942 t * axis[0] * axis[1] - s * axis[2],
943 t * axis[0] * axis[2] + s * axis[1]},
944 {t * axis[0] * axis[1] + s * axis[2],
945 t * axis[1] * axis[1] + c,
946 t * axis[1] * axis[2] - s * axis[0]},
947 {t * axis[0] * axis[2] - s * axis[1],
948 t * axis[1] * axis[2] + s * axis[0],
949 t * axis[2] * axis[2] + c}};
955template <
typename Number>
966template <
int dim,
typename Number>
977template <
int dim,
typename Number>
988template <
int dim,
typename Number>
999template <
int dim,
typename Number>
1010template <
int dim,
typename Number>
1021template <
int dim,
typename Number>
1032template <
int dim,
typename Number>
1043template <
int dim,
typename Number>
1054template <
int dim,
typename Number>
1065template <
int dim,
typename Number>
1076template <
int dim,
typename Number>
1088template <
int dim,
typename Number>
1100template <
int dim,
typename Number>
1112template <
int dim,
typename Number>
1124template <
int dim,
typename Number>
1136template <
int dim,
typename Number>
1146template <
int dim,
typename Number>
1156template <
int dim,
typename Number>
1167template <
int dim,
typename Number>
1177template <
int dim,
typename Number>
1188template <
int dim,
typename Number>
1193 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(V, F);
1198template <
int dim,
typename Number>
1203 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(T, F);
1208template <
int dim,
typename Number>
1214 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(T, F);
1219template <
int dim,
typename Number>
1224 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(H, F);
1229template <
int dim,
typename Number>
1235 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(H, F);
1240template <
int dim,
typename Number>
1245 return Number(
determinant(F)) * Contravariant::pull_back(v, F);
1250template <
int dim,
typename Number>
1255 return Number(
determinant(F)) * Contravariant::pull_back(t, F);
1260template <
int dim,
typename Number>
1266 return Number(
determinant(F)) * Contravariant::pull_back(t, F);
1271template <
int dim,
typename Number>
1276 return Number(
determinant(F)) * Contravariant::pull_back(h, F);
1281template <
int dim,
typename Number>
1287 return Number(
determinant(F)) * Contravariant::pull_back(h, F);
1292template <
int dim,
typename Number>
1297 return cofactor(F) * N;
1301template <
int dim,
typename Number>
1306 return contract<1, 0>(B, V);
1311template <
int dim,
typename Number>
1316 return contract<1, 0>(B, contract<1, 1>(T, B));
1321template <
int dim,
typename Number>
1328 for (
unsigned int i = 0; i < dim; ++i)
1329 for (
unsigned int J = 0; J < dim; ++J)
1331 for (
unsigned int I_ = 0; I_ < dim; ++I_)
1332 tmp_1[i][J] += B[i][I_] * T[I_][J];
1335 for (
unsigned int i = 0; i < dim; ++i)
1336 for (
unsigned int j = i; j < dim; ++j)
1337 for (
unsigned int J = 0; J < dim; ++J)
1338 out[i][j] += B[j][J] * tmp_1[i][J];
1345template <
int dim,
typename Number>
1369 return contract<1, 1>(
1370 B, contract<1, 1>(B, contract<2, 1>(contract<2, 1>(H, B), B)));
1375template <
int dim,
typename Number>
1399 for (
unsigned int I_ = 0; I_ < dim; ++I_)
1400 for (
unsigned int j = 0; j < dim; ++j)
1401 for (
unsigned int K = 0;
K < dim; ++
K)
1402 for (
unsigned int L = 0; L < dim; ++L)
1403 for (
unsigned int J = 0; J < dim; ++J)
1404 tmp[I_][j][K][L] += B[j][J] * H[I_][J][K][L];
1407 tmp = contract<1, 0>(B, contract<3, 1>(tmp, B));
1411 for (
unsigned int i = 0; i < dim; ++i)
1412 for (
unsigned int j = i; j < dim; ++j)
1413 for (
unsigned int k = 0; k < dim; ++k)
1414 for (
unsigned int l = k;
l < dim; ++
l)
1415 for (
unsigned int K = 0;
K < dim; ++
K)
1416 out[i][j][k][l] += B[k][K] * tmp[i][j][K][l];
numbers::NumberTraits< Number >::real_type norm() const
#define DEAL_II_DEPRECATED
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcMessage(std::string arg1)
CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt K
Tensor< 2, dim, Number > l(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
::VectorizedArray< Number, width > cos(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sin(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
DEAL_II_HOST constexpr Number determinant(const SymmetricTensor< 2, dim, Number > &)
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)