16#ifndef dealii_transformations_h
17#define dealii_transformations_h
29 namespace Transformations
57 template <
typename Number>
90 template <
typename Number>
99 template <
typename Number>
123 namespace Contravariant
143 template <
int dim,
typename Number>
162 template <
int dim,
typename Number>
182 template <
int dim,
typename Number>
201 template <
int dim,
typename Number>
221 template <
int dim,
typename Number>
246 template <
int dim,
typename Number>
265 template <
int dim,
typename Number>
284 template <
int dim,
typename Number>
303 template <
int dim,
typename Number>
322 template <
int dim,
typename Number>
368 template <
int dim,
typename Number>
387 template <
int dim,
typename Number>
407 template <
int dim,
typename Number>
426 template <
int dim,
typename Number>
446 template <
int dim,
typename Number>
471 template <
int dim,
typename Number>
490 template <
int dim,
typename Number>
509 template <
int dim,
typename Number>
528 template <
int dim,
typename Number>
547 template <
int dim,
typename Number>
582 template <
int dim,
typename Number>
602 template <
int dim,
typename Number>
623 template <
int dim,
typename Number>
644 template <
int dim,
typename Number>
666 template <
int dim,
typename Number>
693 template <
int dim,
typename Number>
713 template <
int dim,
typename Number>
733 template <
int dim,
typename Number>
754 template <
int dim,
typename Number>
775 template <
int dim,
typename Number>
810 template <
int dim,
typename Number>
832 template <
int dim,
typename Number>
848 template <
int dim,
typename Number>
864 template <
int dim,
typename Number>
879 template <
int dim,
typename Number>
895 template <
int dim,
typename Number>
911template <
typename Number>
919 const Number rotation[2][2] = {{cos(angle), -sin(angle)},
920 {
sin(angle),
cos(angle)}};
926template <
typename Number>
930 const Number & angle)
938 ExcMessage(
"The supplied axial vector is not a unit vector."));
939 const Number c =
cos(angle);
940 const Number s =
sin(angle);
941 const Number t = 1. - c;
942 const Number rotation[3][3] = {{t * axis[0] * axis[0] + c,
943 t * axis[0] * axis[1] - s * axis[2],
944 t * axis[0] * axis[2] + s * axis[1]},
945 {t * axis[0] * axis[1] + s * axis[2],
946 t * axis[1] * axis[1] + c,
947 t * axis[1] * axis[2] - s * axis[0]},
948 {t * axis[0] * axis[2] - s * axis[1],
949 t * axis[1] * axis[2] + s * axis[0],
950 t * axis[2] * axis[2] + c}};
956template <
typename Number>
960 const Number & angle)
967template <
int dim,
typename Number>
978template <
int dim,
typename Number>
989template <
int dim,
typename Number>
1000template <
int dim,
typename Number>
1011template <
int dim,
typename Number>
1022template <
int dim,
typename Number>
1033template <
int dim,
typename Number>
1044template <
int dim,
typename Number>
1055template <
int dim,
typename Number>
1066template <
int dim,
typename Number>
1077template <
int dim,
typename Number>
1089template <
int dim,
typename Number>
1101template <
int dim,
typename Number>
1113template <
int dim,
typename Number>
1125template <
int dim,
typename Number>
1137template <
int dim,
typename Number>
1147template <
int dim,
typename Number>
1157template <
int dim,
typename Number>
1168template <
int dim,
typename Number>
1178template <
int dim,
typename Number>
1189template <
int dim,
typename Number>
1194 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(V, F);
1199template <
int dim,
typename Number>
1204 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(T, F);
1209template <
int dim,
typename Number>
1215 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(T, F);
1220template <
int dim,
typename Number>
1225 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(H, F);
1230template <
int dim,
typename Number>
1236 return Number(1.0 /
determinant(F)) * Contravariant::push_forward(H, F);
1241template <
int dim,
typename Number>
1246 return Number(
determinant(F)) * Contravariant::pull_back(v, F);
1251template <
int dim,
typename Number>
1256 return Number(
determinant(F)) * Contravariant::pull_back(t, F);
1261template <
int dim,
typename Number>
1267 return Number(
determinant(F)) * Contravariant::pull_back(t, F);
1272template <
int dim,
typename Number>
1277 return Number(
determinant(F)) * Contravariant::pull_back(h, F);
1282template <
int dim,
typename Number>
1288 return Number(
determinant(F)) * Contravariant::pull_back(h, F);
1293template <
int dim,
typename Number>
1298 return cofactor(F) * N;
1302template <
int dim,
typename Number>
1307 return contract<1, 0>(B, V);
1312template <
int dim,
typename Number>
1317 return contract<1, 0>(B, contract<1, 1>(T, B));
1322template <
int dim,
typename Number>
1329 for (
unsigned int i = 0; i < dim; ++i)
1330 for (
unsigned int J = 0; J < dim; ++J)
1332 for (
unsigned int I_ = 0; I_ < dim; ++I_)
1333 tmp_1[i][J] += B[i][I_] * T[I_][J];
1336 for (
unsigned int i = 0; i < dim; ++i)
1337 for (
unsigned int j = i; j < dim; ++j)
1338 for (
unsigned int J = 0; J < dim; ++J)
1339 out[i][j] += B[j][J] * tmp_1[i][J];
1346template <
int dim,
typename Number>
1370 return contract<1, 1>(
1371 B, contract<1, 1>(B, contract<2, 1>(contract<2, 1>(H, B), B)));
1376template <
int dim,
typename Number>
1400 for (
unsigned int I_ = 0; I_ < dim; ++I_)
1401 for (
unsigned int j = 0; j < dim; ++j)
1402 for (
unsigned int K = 0;
K < dim; ++
K)
1403 for (
unsigned int L = 0; L < dim; ++L)
1404 for (
unsigned int J = 0; J < dim; ++J)
1405 tmp[I_][j][K][L] += B[j][J] * H[I_][J][K][L];
1408 tmp = contract<1, 0>(B, contract<3, 1>(tmp, B));
1412 for (
unsigned int i = 0; i < dim; ++i)
1413 for (
unsigned int j = i; j < dim; ++j)
1414 for (
unsigned int k = 0; k < dim; ++k)
1415 for (
unsigned int l = k;
l < dim; ++
l)
1416 for (
unsigned int K = 0;
K < dim; ++
K)
1417 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 > &)