16#ifndef dealii_transformations_h
17#define dealii_transformations_h
30 namespace Transformations
58 template <
typename Number>
91 template <
typename Number>
115 namespace Contravariant
135 template <
int dim,
typename Number>
154 template <
int dim,
typename Number>
174 template <
int dim,
typename Number>
193 template <
int dim,
typename Number>
213 template <
int dim,
typename Number>
238 template <
int dim,
typename Number>
257 template <
int dim,
typename Number>
276 template <
int dim,
typename Number>
295 template <
int dim,
typename Number>
314 template <
int dim,
typename Number>
360 template <
int dim,
typename Number>
379 template <
int dim,
typename Number>
399 template <
int dim,
typename Number>
418 template <
int dim,
typename Number>
438 template <
int dim,
typename Number>
463 template <
int dim,
typename Number>
482 template <
int dim,
typename Number>
501 template <
int dim,
typename Number>
520 template <
int dim,
typename Number>
539 template <
int dim,
typename Number>
574 template <
int dim,
typename Number>
594 template <
int dim,
typename Number>
615 template <
int dim,
typename Number>
636 template <
int dim,
typename Number>
658 template <
int dim,
typename Number>
685 template <
int dim,
typename Number>
705 template <
int dim,
typename Number>
725 template <
int dim,
typename Number>
746 template <
int dim,
typename Number>
767 template <
int dim,
typename Number>
802 template <
int dim,
typename Number>
824 template <
int dim,
typename Number>
840 template <
int dim,
typename Number>
856 template <
int dim,
typename Number>
871 template <
int dim,
typename Number>
887 template <
int dim,
typename Number>
903template <
typename Number>
914template <
typename Number>
918 const Number &
angle)
921 ExcMessage(
"The supplied axial vector is not a unit vector."));
924 const Number t = 1. - c;
925 const Number rotation[3][3] = {{t * axis[0] * axis[0] + c,
926 t * axis[0] * axis[1] - s * axis[2],
927 t * axis[0] * axis[2] + s * axis[1]},
928 {t * axis[0] * axis[1] + s * axis[2],
929 t * axis[1] * axis[1] + c,
930 t * axis[1] * axis[2] - s * axis[0]},
931 {t * axis[0] * axis[2] - s * axis[1],
932 t * axis[1] * axis[2] + s * axis[0],
933 t * axis[2] * axis[2] + c}};
939template <
int dim,
typename Number>
950template <
int dim,
typename Number>
961template <
int dim,
typename Number>
972template <
int dim,
typename Number>
983template <
int dim,
typename Number>
994template <
int dim,
typename Number>
1005template <
int dim,
typename Number>
1016template <
int dim,
typename Number>
1027template <
int dim,
typename Number>
1038template <
int dim,
typename Number>
1049template <
int dim,
typename Number>
1061template <
int dim,
typename Number>
1073template <
int dim,
typename Number>
1085template <
int dim,
typename Number>
1097template <
int dim,
typename Number>
1109template <
int dim,
typename Number>
1119template <
int dim,
typename Number>
1129template <
int dim,
typename Number>
1140template <
int dim,
typename Number>
1150template <
int dim,
typename Number>
1161template <
int dim,
typename Number>
1171template <
int dim,
typename Number>
1181template <
int dim,
typename Number>
1192template <
int dim,
typename Number>
1202template <
int dim,
typename Number>
1213template <
int dim,
typename Number>
1223template <
int dim,
typename Number>
1233template <
int dim,
typename Number>
1244template <
int dim,
typename Number>
1254template <
int dim,
typename Number>
1265template <
int dim,
typename Number>
1274template <
int dim,
typename Number>
1279 return contract<1, 0>(B,
V);
1284template <
int dim,
typename Number>
1289 return contract<1, 0>(B, contract<1, 1>(
T, B));
1294template <
int dim,
typename Number>
1301 for (
unsigned int i = 0; i < dim; ++i)
1302 for (
unsigned int J = 0; J < dim; ++J)
1304 for (
unsigned int I_ = 0; I_ < dim; ++I_)
1305 tmp_1[i][J] += B[i][I_] *
T[I_][J];
1308 for (
unsigned int i = 0; i < dim; ++i)
1309 for (
unsigned int j = i; j < dim; ++j)
1310 for (
unsigned int J = 0; J < dim; ++J)
1311 out[i][j] += B[j][J] * tmp_1[i][J];
1318template <
int dim,
typename Number>
1342 return contract<1, 1>(
1343 B, contract<1, 1>(B, contract<2, 1>(contract<2, 1>(H, B), B)));
1348template <
int dim,
typename Number>
1372 for (
unsigned int I_ = 0; I_ < dim; ++I_)
1373 for (
unsigned int j = 0; j < dim; ++j)
1374 for (
unsigned int K = 0; K < dim; ++K)
1375 for (
unsigned int L = 0;
L < dim; ++
L)
1376 for (
unsigned int J = 0; J < dim; ++J)
1377 tmp[I_][j][K][
L] += B[j][J] * H[I_][J][K][
L];
1380 tmp = contract<1, 0>(B, contract<3, 1>(tmp, B));
1384 for (
unsigned int i = 0; i < dim; ++i)
1385 for (
unsigned int j = i; j < dim; ++j)
1386 for (
unsigned int k = 0; k < dim; ++k)
1387 for (
unsigned int l = k;
l < dim; ++
l)
1388 for (
unsigned int K = 0; K < dim; ++K)
1389 out[i][j][k][
l] += B[k][K] * tmp[i][j][K][
l];
constexpr SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &t)
constexpr Number determinant(const SymmetricTensor< 2, dim, Number > &t)
constexpr Tensor< 2, dim, Number > cofactor(const Tensor< 2, dim, Number > &t)
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)
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
Tensor< 2, dim, Number > l(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
Tensor< 2, dim, Number > F(const Tensor< 2, dim, Number > &Grad_u)
::VectorizedArray< Number, width > cos(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sin(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)