15#ifndef dealii_transformations_h
16#define dealii_transformations_h
28 namespace Transformations
56 template <
typename Number>
89 template <
typename Number>
113 namespace Contravariant
133 template <
int dim,
typename Number>
152 template <
int dim,
typename Number>
172 template <
int dim,
typename Number>
191 template <
int dim,
typename Number>
211 template <
int dim,
typename Number>
236 template <
int dim,
typename Number>
255 template <
int dim,
typename Number>
274 template <
int dim,
typename Number>
293 template <
int dim,
typename Number>
312 template <
int dim,
typename Number>
358 template <
int dim,
typename Number>
377 template <
int dim,
typename Number>
397 template <
int dim,
typename Number>
416 template <
int dim,
typename Number>
436 template <
int dim,
typename Number>
461 template <
int dim,
typename Number>
480 template <
int dim,
typename Number>
499 template <
int dim,
typename Number>
518 template <
int dim,
typename Number>
537 template <
int dim,
typename Number>
572 template <
int dim,
typename Number>
592 template <
int dim,
typename Number>
613 template <
int dim,
typename Number>
634 template <
int dim,
typename Number>
656 template <
int dim,
typename Number>
683 template <
int dim,
typename Number>
703 template <
int dim,
typename Number>
723 template <
int dim,
typename Number>
744 template <
int dim,
typename Number>
765 template <
int dim,
typename Number>
800 template <
int dim,
typename Number>
822 template <
int dim,
typename Number>
838 template <
int dim,
typename Number>
854 template <
int dim,
typename Number>
869 template <
int dim,
typename Number>
885 template <
int dim,
typename Number>
901template <
typename Number>
909 const Number rotation[2][2] = {{cos(angle), -sin(angle)},
910 {
sin(angle),
cos(angle)}};
916template <
typename Number>
928 ExcMessage(
"The supplied axial vector is not a unit vector."));
929 const Number c =
cos(angle);
930 const Number s =
sin(angle);
931 const Number t = 1. - c;
932 const Number rotation[3][3] = {{t * axis[0] * axis[0] + c,
933 t * axis[0] * axis[1] - s * axis[2],
934 t * axis[0] * axis[2] + s * axis[1]},
935 {t * axis[0] * axis[1] + s * axis[2],
936 t * axis[1] * axis[1] + c,
937 t * axis[1] * axis[2] - s * axis[0]},
938 {t * axis[0] * axis[2] - s * axis[1],
939 t * axis[1] * axis[2] + s * axis[0],
940 t * axis[2] * axis[2] + c}};
946template <
int dim,
typename Number>
957template <
int dim,
typename Number>
968template <
int dim,
typename Number>
979template <
int dim,
typename Number>
990template <
int dim,
typename Number>
1001template <
int dim,
typename Number>
1012template <
int dim,
typename Number>
1023template <
int dim,
typename Number>
1034template <
int dim,
typename Number>
1045template <
int dim,
typename Number>
1056template <
int dim,
typename Number>
1068template <
int dim,
typename Number>
1080template <
int dim,
typename Number>
1092template <
int dim,
typename Number>
1104template <
int dim,
typename Number>
1116template <
int dim,
typename Number>
1126template <
int dim,
typename Number>
1136template <
int dim,
typename Number>
1147template <
int dim,
typename Number>
1157template <
int dim,
typename Number>
1168template <
int dim,
typename Number>
1173 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(V, F);
1178template <
int dim,
typename Number>
1183 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(T, F);
1188template <
int dim,
typename Number>
1194 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(T, F);
1199template <
int dim,
typename Number>
1204 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(H, F);
1209template <
int dim,
typename Number>
1215 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(H, F);
1220template <
int dim,
typename Number>
1225 return Number(
determinant(F)) * Contravariant::pull_back(v, F);
1230template <
int dim,
typename Number>
1235 return Number(
determinant(F)) * Contravariant::pull_back(t, F);
1240template <
int dim,
typename Number>
1246 return Number(
determinant(F)) * Contravariant::pull_back(t, F);
1251template <
int dim,
typename Number>
1256 return Number(
determinant(F)) * Contravariant::pull_back(h, F);
1261template <
int dim,
typename Number>
1267 return Number(
determinant(F)) * Contravariant::pull_back(h, F);
1272template <
int dim,
typename Number>
1277 return cofactor(F) * N;
1281template <
int dim,
typename Number>
1286 return contract<1, 0>(B, V);
1291template <
int dim,
typename Number>
1296 return contract<1, 0>(B, contract<1, 1>(T, B));
1301template <
int dim,
typename Number>
1308 for (
unsigned int i = 0; i < dim; ++i)
1309 for (
unsigned int J = 0; J < dim; ++J)
1311 for (
unsigned int I_ = 0; I_ < dim; ++I_)
1312 tmp_1[i][J] += B[i][I_] * T[I_][J];
1315 for (
unsigned int i = 0; i < dim; ++i)
1316 for (
unsigned int j = i; j < dim; ++j)
1317 for (
unsigned int J = 0; J < dim; ++J)
1318 out[i][j] += B[j][J] * tmp_1[i][J];
1325template <
int dim,
typename Number>
1349 return contract<1, 1>(
1350 B, contract<1, 1>(B, contract<2, 1>(contract<2, 1>(H, B), B)));
1355template <
int dim,
typename Number>
1379 for (
unsigned int I_ = 0; I_ < dim; ++I_)
1380 for (
unsigned int j = 0; j < dim; ++j)
1381 for (
unsigned int K = 0;
K < dim; ++
K)
1382 for (
unsigned int L = 0; L < dim; ++L)
1383 for (
unsigned int J = 0; J < dim; ++J)
1384 tmp[I_][j][K][L] += B[j][J] * H[I_][J][K][L];
1387 tmp = contract<1, 0>(B, contract<3, 1>(tmp, B));
1391 for (
unsigned int i = 0; i < dim; ++i)
1392 for (
unsigned int j = i; j < dim; ++j)
1393 for (
unsigned int k = 0; k < dim; ++k)
1394 for (
unsigned int l = k;
l < dim; ++
l)
1395 for (
unsigned int K = 0;
K < dim; ++
K)
1396 out[i][j][k][l] += B[k][K] * tmp[i][j][K][l];
numbers::NumberTraits< Number >::real_type norm() const
#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 > &)