23 #include "libmesh/utility.h" 24 #include "libmesh/tensor_value.h" 25 #include "libmesh/vector_value.h" 46 return MooseEnum(
"antisymmetric symmetric9 symmetric21 general_isotropic symmetric_isotropic " 47 "symmetric_isotropic_E_nu antisymmetric_isotropic axisymmetric_rz general " 48 "principal orthotropic");
54 mooseAssert(
N == 3,
"RankFourTensorTempl<T> is currently only tested for 3 dimensions.");
63 unsigned int index = 0;
72 (*this)(i, i, i, i) = 1.0;
75 case initIdentityFour:
80 _vals[index++] =
Real(i == k && j == l);
83 case initIdentitySymmetricFour:
88 _vals[index++] = 0.5 *
Real(i == k && j == l) + 0.5 *
Real(i == l && j == k);
91 case initIdentityDeviatoric:
92 for (
unsigned int i = 0; i <
N; ++i)
93 for (
unsigned int j = 0; j <
N; ++j)
94 for (
unsigned int k = 0; k <
N; ++k)
95 for (
unsigned int l = 0; l <
N; ++l)
97 _vals[index] =
Real(i == k && j == l);
98 if ((i == j) && (k == l))
99 _vals[index] -= 1.0 / 3.0;
105 mooseError(
"Unknown RankFourTensorTempl<T> initialization pattern.");
109 template <
typename T>
112 fillFromInputVector(input, fill_method);
115 template <
typename T>
123 template <
typename T>
124 template <
template <
typename>
class Tensor,
typename T2>
127 typename std::enable_if<TwoTensorMultTraits<Tensor, T2>::value,
130 typedef decltype(T() * T2()) ValueType;
133 unsigned int index = 0;
134 for (
unsigned int ij = 0; ij < N2; ++ij)
137 for (
unsigned int kl = 0; kl < N2; ++kl)
138 tmp += _vals[index++] * b(kl / LIBMESH_DIM, kl % LIBMESH_DIM);
145 template <
typename T>
154 template <
typename T>
163 template <
typename T>
168 _vals[i] += a.
_vals[i];
172 template <
typename T>
173 template <
typename T2>
180 result.
_vals[i] = _vals[i] + b._vals[i];
184 template <
typename T>
189 _vals[i] -= a.
_vals[i];
193 template <
typename T>
194 template <
typename T2>
201 result.
_vals[i] = _vals[i] - b._vals[i];
205 template <
typename T>
211 result.
_vals[i] = -_vals[i];
215 template <
typename T>
216 template <
typename T2>
221 typedef decltype(T() * T2()) ValueType;
230 result(i, j, k, l) += (*this)(i, j, p, q) * b(p, q, k, l);
235 template <
typename T>
247 template <
typename T>
251 mooseError(
"The invSymm operation calls to LAPACK and only supports plain Real type tensors.");
258 unsigned int ntens =
N * (
N + 1) / 2;
262 std::vector<PetscScalar> mat;
263 mat.assign(ntens * ntens, 0);
334 unsigned int index = 0;
341 mat[k == l ? i * ntens + k : i * ntens + k + nskip + l] += _vals[index];
344 mat[k == l ? (nskip + i + j) * ntens + k : (nskip + i + j) * ntens + k + nskip + l] +=
350 for (
unsigned int i = 3; i < ntens; ++i)
352 mat[i * ntens + j] /= 2.0;
366 result.
_vals[index] =
367 k == l ? mat[i * ntens + k] : mat[i * ntens + k + nskip + l] / 2.0;
370 result.
_vals[index] = k == l ? mat[(nskip + i + j) * ntens + k]
371 : mat[(nskip + i + j) * ntens + k + nskip + l] / 2.0;
378 template <
typename T>
384 unsigned int index = 0;
390 unsigned int index2 = 0;
394 const T & a = R(i, m);
397 const T & ab = a * R(j, n);
400 const T & abc = ab * R(k, o);
402 sum += abc * R(l, p) * old.
_vals[index2++];
406 _vals[index++] = sum;
410 template <
typename T>
417 stm <<
"i = " << i <<
" j = " << j <<
'\n';
421 stm << std::setw(15) << (*this)(i, j, k, l) <<
" ";
430 template <
typename T>
434 for (
unsigned int i = 0; i <
N; ++i)
435 for (
unsigned int j = 0; j <
N; ++j)
437 stm <<
"i = " << i <<
" j = " << j <<
'\n';
438 for (
unsigned int k = 0; k <
N; ++k)
440 for (
unsigned int l = 0; l <
N; ++l)
450 template <
typename T>
456 unsigned int index = 0;
461 result.
_vals[index++] = _vals[k * N3 + i *
N + j + l * N2];
466 template <
typename T>
476 result(i, j, k, l) = (*this)(j, i, k, l);
481 template <
typename T>
491 result(i, j, k, l) = (*this)(i, j, l, k);
496 template <
typename T>
502 if (input.size() == 9)
505 (*this)(0, 0, 0, 0) = input[0];
506 (*this)(0, 0, 0, 1) = input[1];
507 (*this)(0, 0, 1, 1) = input[2];
508 (*this)(0, 1, 0, 1) = input[3];
509 (*this)(0, 1, 1, 1) = input[4];
510 (*this)(0, 1, 0, 0) = input[5];
511 (*this)(1, 1, 0, 0) = input[6];
512 (*this)(1, 1, 0, 1) = input[7];
513 (*this)(1, 1, 1, 1) = input[8];
516 (*this)(0, 0, 1, 0) = (*
this)(0, 0, 0, 1);
517 (*this)(0, 1, 1, 0) = (*
this)(0, 1, 0, 1);
518 (*this)(1, 0, 0, 0) = (*
this)(0, 1, 0, 0);
519 (*this)(1, 0, 0, 1) = (*
this)(0, 1, 0, 1);
520 (*this)(1, 0, 1, 1) = (*
this)(0, 1, 1, 1);
521 (*this)(1, 0, 0, 0) = (*
this)(0, 1, 0, 0);
522 (*this)(1, 1, 1, 0) = (*
this)(1, 1, 0, 1);
524 else if (input.size() == 2)
527 (*this)(0, 0, 0, 0) = input[0];
528 (*this)(0, 0, 1, 1) = input[1];
530 (*this)(1, 1, 1, 1) = (*
this)(0, 0, 0, 0);
531 (*this)(1, 1, 0, 0) = (*
this)(0, 0, 1, 1);
532 (*this)(0, 1, 0, 1) = 0.5 * ((*
this)(0, 0, 0, 0) - (*
this)(0, 0, 1, 1));
533 (*this)(1, 0, 0, 1) = (*
this)(0, 1, 0, 1);
534 (*this)(0, 1, 1, 0) = (*
this)(0, 1, 0, 1);
535 (*this)(1, 0, 1, 0) = (*
this)(0, 1, 0, 1);
538 mooseError(
"Please provide correct number of inputs for surface RankFourTensorTempl<T> " 542 template <
typename T>
550 fillAntisymmetricFromInputVector(input);
553 fillSymmetric9FromInputVector(input);
556 fillSymmetric21FromInputVector(input);
558 case general_isotropic:
559 fillGeneralIsotropicFromInputVector(input);
561 case symmetric_isotropic:
562 fillSymmetricIsotropicFromInputVector(input);
564 case symmetric_isotropic_E_nu:
565 fillSymmetricIsotropicEandNuFromInputVector(input);
567 case antisymmetric_isotropic:
568 fillAntisymmetricIsotropicFromInputVector(input);
570 case axisymmetric_rz:
571 fillAxisymmetricRZFromInputVector(input);
574 fillGeneralFromInputVector(input);
577 fillPrincipalFromInputVector(input);
580 fillGeneralOrthotropicFromInputVector(input);
583 mooseError(
"fillFromInputVector called with unknown fill_method of ", fill_method);
587 template <
typename T>
591 if (input.size() != 6)
593 "To use fillAntisymmetricFromInputVector, your input must have size 6. Yours has size ",
598 (*this)(0, 1, 0, 1) = input[0];
599 (*this)(0, 1, 0, 2) = input[1];
600 (*this)(0, 1, 1, 2) = input[2];
602 (*this)(0, 2, 0, 2) = input[3];
603 (*this)(0, 2, 1, 2) = input[4];
605 (*this)(1, 2, 1, 2) = input[5];
608 (*this)(0, 2, 0, 1) = (*
this)(0, 1, 0, 2);
609 (*this)(1, 2, 0, 1) = (*
this)(0, 1, 1, 2);
610 (*this)(1, 2, 0, 2) = (*
this)(0, 2, 1, 2);
617 (*this)(0, 1, j, i) = -(*
this)(0, 1, i, j);
618 (*this)(0, 2, j, i) = -(*
this)(0, 2, i, j);
619 (*this)(1, 2, j, i) = -(*
this)(1, 2, i, j);
627 (*this)(1, 0, i, j) = -(*
this)(0, 1, i, j);
628 (*this)(2, 0, i, j) = -(*
this)(0, 2, i, j);
629 (*this)(2, 1, i, j) = -(*
this)(1, 2, i, j);
633 template <
typename T>
637 if (input.size() != 3)
638 mooseError(
"To use fillGeneralIsotropicFromInputVector, your input must have size 3. Yours " 642 fillGeneralIsotropic(input[0], input[1], input[2]);
645 template <
typename T>
654 (*this)(i, j, k, l) = i0 *
Real(i == j) *
Real(k == l) +
657 (*this)(i, j, k, l) +=
662 template <
typename T>
666 if (input.size() != 1)
667 mooseError(
"To use fillAntisymmetricIsotropicFromInputVector, your input must have size 1. " 671 fillGeneralIsotropic(0.0, 0.0, input[0]);
674 template <
typename T>
678 fillGeneralIsotropic(0.0, 0.0, i0);
681 template <
typename T>
685 mooseAssert(input.size() == 2,
686 "To use fillSymmetricIsotropicFromInputVector, your input must have size 2.");
687 fillSymmetricIsotropic(input[0], input[1]);
690 template <
typename T>
695 fillSymmetric21FromInputVector(std::array<T,21>
696 {{lambda + 2.0 * G, lambda, lambda, 0.0, 0.0, 0.0,
697 lambda + 2.0 * G, lambda, 0.0, 0.0, 0.0,
698 lambda + 2.0 * G, 0.0, 0.0, 0.0,
705 template <
typename T>
709 if (input.size() != 2)
711 "To use fillSymmetricIsotropicEandNuFromInputVector, your input must have size 2. Yours " 715 fillSymmetricIsotropicEandNu(input[0], input[1]);
718 template <
typename T>
723 const T & lambda = E * nu / ((1.0 + nu) * (1.0 - 2.0 * nu));
724 const T & G = E / (2.0 * (1.0 + nu));
726 fillSymmetricIsotropic(lambda, G);
729 template <
typename T>
733 mooseAssert(input.size() == 5,
734 "To use fillAxisymmetricRZFromInputVector, your input must have size 5.");
743 fillSymmetric21FromInputVector(std::array<T,21>
744 {{input[0],input[1],input[2], 0.0, 0.0, 0.0,
745 input[0],input[2], 0.0, 0.0, 0.0,
746 input[3], 0.0, 0.0, 0.0,
749 (input[0] - input[1]) * 0.5}});
753 template <
typename T>
757 if (input.size() != 81)
758 mooseError(
"To use fillGeneralFromInputVector, your input must have size 81. Yours has size ",
765 template <
typename T>
769 if (input.size() != 9)
770 mooseError(
"To use fillPrincipalFromInputVector, your input must have size 9. Yours has size ",
775 (*this)(0, 0, 0, 0) = input[0];
776 (*this)(0, 0, 1, 1) = input[1];
777 (*this)(0, 0, 2, 2) = input[2];
778 (*this)(1, 1, 0, 0) = input[3];
779 (*this)(1, 1, 1, 1) = input[4];
780 (*this)(1, 1, 2, 2) = input[5];
781 (*this)(2, 2, 0, 0) = input[6];
782 (*this)(2, 2, 1, 1) = input[7];
783 (*this)(2, 2, 2, 2) = input[8];
786 template <
typename T>
790 if (input.size() != 12)
791 mooseError(
"To use fillGeneralOrhotropicFromInputVector, your input must have size 12. Yours " 795 const T & Ea = input[0];
796 const T & Eb = input[1];
797 const T & Ec = input[2];
798 const T & Gab = input[3];
799 const T & Gbc = input[4];
800 const T & Gca = input[5];
801 const T & nuba = input[6];
802 const T & nuca = input[7];
803 const T & nucb = input[8];
804 const T & nuab = input[9];
805 const T & nuac = input[10];
806 const T & nubc = input[11];
813 if (!preserve_symmetry)
814 mooseError(
"Orthotropic elasticity tensor input is not consistent with symmetry requirements. " 815 "Check input for accuracy");
817 unsigned int ntens =
N * (
N + 1) / 2;
820 mat.assign(ntens * ntens, 0);
822 T k = 1 - nuab * nuba - nubc * nucb - nuca * nuac - nuab * nubc * nuca - nuba * nucb * nuac;
824 bool is_positive_definite =
825 (k > 0) && (1 - nubc * nucb) > 0 && (1 - nuac * nuca) > 0 && (1 - nuab * nuba) > 0;
826 if (!is_positive_definite)
827 mooseError(
"Orthotropic elasticity tensor input is not positive definite. Check input for " 830 mat[0] = Ea * (1 - nubc * nucb) / k;
831 mat[1] = Ea * (nubc * nuca + nuba) / k;
832 mat[2] = Ea * (nuba * nucb + nuca) / k;
834 mat[6] = Eb * (nuac * nucb + nuab) / k;
835 mat[7] = Eb * (1 - nuac * nuca) / k;
836 mat[8] = Eb * (nuab * nuca + nucb) / k;
838 mat[12] = Ec * (nuab * nubc + nuac) / k;
839 mat[13] = Ec * (nuac * nuba + nubc) / k;
840 mat[14] = Ec * (1 - nuab * nuba) / k;
850 unsigned int index = 0;
857 (*this)._vals[index] =
858 k == l ? mat[i * ntens + k] : mat[i * ntens + k + nskip + l] / 2.0;
860 (*this)._vals[index] = k == l ? mat[(nskip + i + j) * ntens + k]
861 : mat[(nskip + i + j) * ntens + k + nskip + l] / 2.0;
866 template <
typename T>
872 unsigned int index = 0;
873 for (
unsigned int ij = 0; ij < N2; ++ij)
876 for (
unsigned int kl = 0; kl < N2; ++kl)
877 result.
_coords[kl] += _vals[index++] * bb;
883 template <
typename T>
890 for (
unsigned int k = 0; k <
N; k++)
891 for (
unsigned int l = 0; l <
N; l++)
892 val += (*
this)(i, j, k, l) * M(k, l);
897 template <
typename T>
904 for (
unsigned int i = 0; i <
N; i++)
905 for (
unsigned int j = 0; j <
N; j++)
906 val += (*
this)(i, j, k, l) * M(i, j);
911 template <
typename T>
919 sum += (*this)(i, i, j, j);
923 template <
typename T>
929 a(0) = (*this)(0, 0, 0, 0) + (*
this)(0, 0, 1, 1) + (*
this)(0, 0, 2, 2);
930 a(1) = (*this)(1, 1, 0, 0) + (*
this)(1, 1, 1, 1) + (*
this)(1, 1, 2, 2);
931 a(2) = (*this)(2, 2, 0, 0) + (*
this)(2, 2, 1, 1) + (*
this)(2, 2, 2, 2);
935 template <
typename T>
942 for (
unsigned int i = 0; i <
N; i++)
943 for (
unsigned int j = 0; j <
N; j++)
944 for (
unsigned int k = 0; k <
N; k++)
945 for (
unsigned int l = 0; l <
N; l++)
946 for (
unsigned int m = 0; m <
N; m++)
947 for (
unsigned int n = 0; n <
N; n++)
948 for (
unsigned int t = 0; t <
N; t++)
949 R(i, j, k, l) += (*this)(i, m, n, t) * A(j, m) *
B(k, n) * C(l, t);
954 template <
typename T>
961 for (
unsigned int i = 0; i <
N; i++)
962 for (
unsigned int j = 0; j <
N; j++)
963 for (
unsigned int k = 0; k <
N; k++)
964 for (
unsigned int l = 0; l <
N; l++)
965 for (
unsigned int m = 0; m <
N; m++)
966 for (
unsigned int n = 0; n <
N; n++)
967 for (
unsigned int t = 0; t <
N; t++)
968 R(i, j, k, l) += (*this)(m, j, n, t) * A(i, m) *
B(k, n) * C(l, t);
973 template <
typename T>
980 for (
unsigned int i = 0; i <
N; i++)
981 for (
unsigned int j = 0; j <
N; j++)
982 for (
unsigned int k = 0; k <
N; k++)
983 for (
unsigned int l = 0; l <
N; l++)
984 for (
unsigned int m = 0; m <
N; m++)
985 for (
unsigned int n = 0; n <
N; n++)
986 for (
unsigned int t = 0; t <
N; t++)
987 R(i, j, k, l) += (*this)(m, n, k, t) * A(i, m) *
B(j, n) * C(l, t);
992 template <
typename T>
999 for (
unsigned int i = 0; i <
N; i++)
1000 for (
unsigned int j = 0; j <
N; j++)
1001 for (
unsigned int k = 0; k <
N; k++)
1002 for (
unsigned int l = 0; l <
N; l++)
1003 for (
unsigned int m = 0; m <
N; m++)
1004 for (
unsigned int n = 0; n <
N; n++)
1005 for (
unsigned int t = 0; t <
N; t++)
1006 R(i, j, k, l) += (*this)(m, n, t, l) * A(i, m) *
B(j, n) * C(k, t);
1011 template <
typename T>
1017 for (
unsigned int i = 0; i <
N; i++)
1018 for (
unsigned int j = 0; j <
N; j++)
1019 for (
unsigned int k = 0; k <
N; k++)
1020 for (
unsigned int l = 0; l <
N; l++)
1021 for (
unsigned int m = 0; m <
N; m++)
1022 R(i, j, k, l) += (*this)(m, j, k, l) * A(i, m);
1027 template <
typename T>
1033 for (
unsigned int i = 0; i <
N; i++)
1034 for (
unsigned int j = 0; j <
N; j++)
1035 for (
unsigned int k = 0; k <
N; k++)
1036 for (
unsigned int l = 0; l <
N; l++)
1037 for (
unsigned int m = 0; m <
N; m++)
1038 R(i, j, k, l) += (*this)(i, m, k, l) * A(j, m);
1043 template <
typename T>
1049 for (
unsigned int i = 0; i <
N; i++)
1050 for (
unsigned int j = 0; j <
N; j++)
1051 for (
unsigned int k = 0; k <
N; k++)
1052 for (
unsigned int l = 0; l <
N; l++)
1053 for (
unsigned int m = 0; m <
N; m++)
1054 R(i, j, k, l) += (*this)(i, j, m, l) * A(k, m);
1059 template <
typename T>
1065 for (
unsigned int i = 0; i <
N; i++)
1066 for (
unsigned int j = 0; j <
N; j++)
1067 for (
unsigned int k = 0; k <
N; k++)
1068 for (
unsigned int l = 0; l <
N; l++)
1069 for (
unsigned int m = 0; m <
N; m++)
1070 R(i, j, k, l) += (*this)(i, j, k, m) * A(l, m);
1075 template <
typename T>
1085 if ((*
this)(i, j, k, l) != (*
this)(j, i, k, l) ||
1086 (*
this)(i, j, k, l) != (*
this)(i, j, l, k))
1090 if ((*
this)(i, j, k, l) != (*
this)(k, l, i, j))
1096 template <
typename T>
1105 const T & mu = (*this)(0, 1, 0, 1);
1107 if ((*
this)(1, 2, 1, 2) != mu || (*
this)(2, 0, 2, 0) != mu)
1110 if ((*
this)(2, 0, 1, 2) != 0.0 || (*
this)(0, 1, 1, 2) != 0.0 || (*
this)(0, 1, 2, 0) != 0.0)
1116 if (_vals[i * (N3 + N2) + ((j + 1) %
N) *
N + (j + 2) %
N] != 0.0)
1120 const T & K1 = (*this)(0, 0, 0, 0);
1121 const T & K2 = (*this)(0, 0, 1, 1);
1124 if ((*
this)(1, 1, 1, 1) != K1 || (*
this)(2, 2, 2, 2) != K1)
1128 if ((*
this)(i, i, j, j) != K2)
RankFourTensorTempl is designed to handle any N-dimensional fourth order tensor, C.
RankFourTensorTempl< T > singleProductJ(const RankTwoTensorTempl< T > &) const
Calculates C_imkl A_jm.
int eps(unsigned int i, unsigned int j)
2D version
void fillGeneralFromInputVector(const std::vector< T > &input)
fillGeneralFromInputVector takes 81 inputs to fill the Rank-4 tensor No symmetries are explicitly mai...
bool absoluteFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Function to check whether two variables are equal within an absolute tolerance.
void fillGeneralOrthotropicFromInputVector(const std::vector< T > &input)
fillGeneralOrhotropicFromInputVector takes 10 inputs to fill the Rank-4 tensor It defines a general o...
void fillAntisymmetricFromInputVector(const std::vector< T > &input)
fillAntisymmetricFromInputVector takes 6 inputs to fill the the antisymmetric Rank-4 tensor with the ...
RankFourTensorTempl< T > singleProductL(const RankTwoTensorTempl< T > &) const
Calculates C_ijkm A_lm.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
RankFourTensorTempl< T > tripleProductIjl(const RankTwoTensorTempl< T > &, const RankTwoTensorTempl< T > &, const RankTwoTensorTempl< T > &) const
Calculates C_mnkt A_im B_jn C_lt.
RankFourTensorTempl< T > & operator*=(const T &a)
C_ijkl *= a.
RankTwoTensorTempl< T > innerProductTranspose(const RankTwoTensorTempl< T > &) const
Inner product of the major transposed tensor with a rank two tensor.
void fillPrincipalFromInputVector(const std::vector< T > &input)
fillPrincipalFromInputVector takes 9 inputs to fill a Rank-4 tensor C1111 = input0 C1122 = input1 C11...
void fillFromInputVector(const std::vector< T > &input, FillMethod fill_method)
fillFromInputVector takes some number of inputs to fill the Rank-4 tensor.
T _coords[LIBMESH_DIM *LIBMESH_DIM]
void surfaceFillFromInputVector(const std::vector< T > &input)
Fills the tensor entries ignoring the last dimension (ie, C_ijkl=0 if any of i, j, k, or l = 3).
T contractionIj(unsigned int, unsigned int, const RankTwoTensorTempl< T > &) const
Sum C_ijkl M_kl for a given i,j.
void print(std::ostream &stm=Moose::out) const
Print the rank four tensor.
RankFourTensorTempl< T > & operator/=(const T &a)
C_ijkl /= a for all i, j, k, l.
auto operator*(const Tensor< T2 > &a) const -> typename std::enable_if< TwoTensorMultTraits< Tensor, T2 >::value, RankTwoTensorTempl< decltype(T() *T2())>>::type
C_ijkl*a_kl.
RankFourTensorTempl< T > tripleProductJkl(const RankTwoTensorTempl< T > &, const RankTwoTensorTempl< T > &, const RankTwoTensorTempl< T > &) const
Calculates C_imnt A_jm B_kn C_lt.
RankFourTensorTempl< T > tripleProductIjk(const RankTwoTensorTempl< T > &, const RankTwoTensorTempl< T > &, const RankTwoTensorTempl< T > &) const
Calculates C_mntl A_im B_jn C_kt.
void fillSymmetricIsotropic(const T &i0, const T &i1)
auto operator+(const RankFourTensorTempl< T2 > &a) const -> RankFourTensorTempl< decltype(T()+T2())>
C_ijkl + a_ijkl.
void fillGeneralIsotropicFromInputVector(const std::vector< T > &input)
fillGeneralIsotropicFromInputVector takes 3 inputs to fill the Rank-4 tensor with symmetries C_ijkl =...
void zero()
Zeros out the tensor.
FillMethod
To fill up the 81 entries in the 4th-order tensor, fillFromInputVector is called with one of the foll...
T L2norm() const
sqrt(C_ijkl*C_ijkl)
void fillSymmetricIsotropicEandNu(const T &E, const T &nu)
bool isSymmetric() const
checks if the tensor is symmetric
void fillGeneralIsotropic(const T &i0, const T &i1, const T &i2)
Vector-less fill API functions. See docs of the corresponding ...FromInputVector methods.
RankFourTensorTempl()
Default constructor; fills to zero.
void init(triangulateio &t)
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
void printReal(std::ostream &stm=Moose::out) const
Print the values of the rank four tensor.
T sum3x3() const
Calculates the sum of Ciijj for i and j varying from 0 to 2.
RankFourTensorTempl< T > transposeMajor() const
Transpose the tensor by swapping the first pair with the second pair of indices.
bool isIsotropic() const
checks if the tensor is isotropic
T _vals[N4]
The values of the rank-four tensor stored by index=(((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) * LIBME...
void fillAxisymmetricRZFromInputVector(const std::vector< T > &input)
fillAxisymmetricRZFromInputVector takes 5 inputs to fill the axisymmetric Rank-4 tensor with the appr...
void rotate(const TypeTensor< T > &R)
Rotate the tensor using C_ijkl = R_im R_jn R_ko R_lp C_mnop.
void fillSymmetricIsotropicEandNuFromInputVector(const std::vector< T > &input)
fillSymmetricIsotropicEandNuFromInputVector is a variation of the fillSymmetricIsotropicFromInputVect...
libMesh::VectorValue< T > sum3x1() const
Calculates the vector a[i] = sum over j Ciijj for i and j varying from 0 to 2.
T contractionKl(unsigned int, unsigned int, const RankTwoTensorTempl< T > &) const
Sum M_ij C_ijkl for a given k,l.
RankFourTensorTempl< T > transposeIj() const
Transpose the tensor by swapping the first two indeces.
void fillSymmetricIsotropicFromInputVector(const std::vector< T > &input)
fillSymmetricIsotropicFromInputVector takes 2 inputs to fill the the symmetric Rank-4 tensor with the...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
RankFourTensorTempl< T > singleProductI(const RankTwoTensorTempl< T > &) const
Calculates C_mjkl A_im.
RankTwoTensorTempl is designed to handle the Stress or Strain Tensor for a fully anisotropic material...
bool relativeFuzzyEqual(const T &var1, const T2 &var2, const T3 &tol=libMesh::TOLERANCE *libMesh::TOLERANCE)
Function to check whether two variables are equal within a relative tolerance.
InitMethod
Initialization method.
RankFourTensorTempl< T > operator-() const
-C_ijkl
IntRange< T > make_range(T beg, T end)
void fillAntisymmetricIsotropicFromInputVector(const std::vector< T > &input)
fillAntisymmetricIsotropicFromInputVector takes 1 input to fill the the antisymmetric Rank-4 tensor w...
static MooseEnum fillMethodEnum()
Static method for use in validParams for getting the "fill_method".
RankFourTensorTempl< T > singleProductK(const RankTwoTensorTempl< T > &) const
Calculates C_ijml A_km.
RankFourTensorTempl< T > & operator+=(const RankFourTensorTempl< T > &a)
C_ijkl += a_ijkl for all i, j, k, l.
void fillAntisymmetricIsotropic(const T &i0)
RankFourTensorTempl< T > tripleProductIkl(const RankTwoTensorTempl< T > &, const RankTwoTensorTempl< T > &, const RankTwoTensorTempl< T > &) const
Calculates C_mjnt A_im B_kn C_lt.
RankFourTensorTempl< T > transposeKl() const
Transpose the tensor by swapping the last two indeces.
RankFourTensorTempl< T > invSymm() const
This returns A_ijkl such that C_ijkl*A_klmn = 0.5*(de_im de_jn + de_in de_jm) This routine assumes th...
RankFourTensorTempl< T > & operator-=(const RankFourTensorTempl< T > &a)
C_ijkl -= a_ijkl.
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template pow< 2 >(tan(_arg))+1.0) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(sqrt