23 #include "libmesh/libmesh.h"    24 #include "libmesh/tensor_value.h"    25 #include "libmesh/vector_value.h"    26 #include "libmesh/utility.h"    29 #include <petscblaslapack.h>    39 #include <Eigen/Eigenvalues>    68   return MooseEnum(
"autodetect=0 isotropic1=1 diagonal3=3 symmetric6=6 general=9", 
"autodetect");
    74   mooseAssert(
N == 3, 
"RankTwoTensorTempl is currently only tested for 3 dimensions.");
    76   for (
unsigned int i = 0; i < N2; i++)
    95       mooseError(
"Unknown RankTwoTensorTempl initialization pattern.");
   105       "This constructor is deprecated in favor of RankTwoTensorTempl<T>::initializeFromRows");
   109     _coords[i] = row1(i);
   112     _coords[
N + i] = row2(i);
   115     _coords[2 * 
N + i] = row3(i);
   118 template <
typename T>
   125                                (v1(0) + v0(1)) / 2.0,
   126                                (v2(0) + v0(2)) / 2.0,
   127                                (v1(0) + v0(1)) / 2.0,
   129                                (v2(1) + v1(2)) / 2.0,
   130                                (v2(0) + v0(2)) / 2.0,
   131                                (v2(1) + v1(2)) / 2.0,
   135 template <
typename T>
   142       row0(0), row1(0), row2(0), row0(1), row1(1), row2(1), row0(2), row1(2), row2(2));
   145 template <
typename T>
   152       col0(0), col0(1), col0(2), col1(0), col1(1), col1(2), col2(0), col2(1), col2(2));
   155 template <
typename T>
   157     const T & S11, 
const T & S22, 
const T & S33, 
const T & S23, 
const T & S13, 
const T & S12)
   162   (*this)(1, 2) = (*
this)(2, 1) = S23;
   163   (*this)(0, 2) = (*
this)(2, 0) = S13;
   164   (*this)(0, 1) = (*
this)(1, 0) = S12;
   167 template <
typename T>
   189 template <
typename T>
   193   if (fill_method != autodetect && fill_method != input.size())
   194     mooseError(
"Expected an input vector size of ", fill_method, 
" to fill the RankTwoTensorTempl");
   196   switch (input.size())
   200       (*this)(0, 0) = input[0]; 
   201       (*this)(1, 1) = input[0]; 
   202       (*this)(2, 2) = input[0]; 
   207       (*this)(0, 0) = input[0]; 
   208       (*this)(1, 1) = input[1]; 
   209       (*this)(2, 2) = input[2]; 
   213       (*this)(0, 0) = input[0];                 
   214       (*this)(1, 1) = input[1];                 
   215       (*this)(2, 2) = input[2];                 
   216       (*this)(1, 2) = (*
this)(2, 1) = input[3]; 
   217       (*this)(0, 2) = (*
this)(2, 0) = input[4]; 
   218       (*this)(0, 1) = (*
this)(1, 0) = input[5]; 
   222       (*this)(0, 0) = input[0]; 
   223       (*this)(1, 0) = input[1]; 
   224       (*this)(2, 0) = input[2]; 
   225       (*this)(0, 1) = input[3]; 
   226       (*this)(1, 1) = input[4]; 
   227       (*this)(2, 1) = input[5]; 
   228       (*this)(0, 2) = input[6]; 
   229       (*this)(1, 2) = input[7]; 
   230       (*this)(2, 2) = input[8]; 
   234       mooseError(
"Please check the number of entries in the input vector for building "   235                  "a RankTwoTensorTempl. It must be 1, 3, 6, or 9");
   239 template <
typename T>
   243   switch (scalar_variable.size())
   247       (*this)(0, 0) = scalar_variable[0]; 
   252       (*this)(0, 0) = scalar_variable[0];                 
   253       (*this)(1, 1) = scalar_variable[1];                 
   254       (*this)(0, 1) = (*
this)(1, 0) = scalar_variable[2]; 
   258       (*this)(0, 0) = scalar_variable[0];                 
   259       (*this)(1, 1) = scalar_variable[1];                 
   260       (*this)(2, 2) = scalar_variable[2];                 
   261       (*this)(1, 2) = (*
this)(2, 1) = scalar_variable[3]; 
   262       (*this)(0, 2) = (*
this)(2, 0) = scalar_variable[4]; 
   263       (*this)(0, 1) = (*
this)(1, 0) = scalar_variable[5]; 
   267       mooseError(
"Only FIRST, THIRD, or SIXTH order scalar variable can be used to build "   268                  "a RankTwoTensorTempl.");
   272 template <
typename T>
   279 template <
typename T>
   286 template <
typename T>
   293 template <
typename T>
   300 template <
typename T>
   304   return *
this * *
this;
   307 template <
typename T>
   316 template <
typename T>
   323     const auto i1 = i * 
N;
   328       const auto j1 = j * 
N;
   342   for (
unsigned int i = 0; i < N2; i++)
   346 template <
typename T>
   352   T x = (*this)(0, 0) * c * c + (*
this)(1, 1) * s * s + 2.0 * (*
this)(0, 1) * c * s;
   353   T y = (*this)(0, 0) * s * s + (*
this)(1, 1) * c * c - 2.0 * (*
this)(0, 1) * c * s;
   354   T xy = ((*this)(1, 1) - (*
this)(0, 0)) * c * s + (*this)(0, 1) * (c * c - s * s);
   360   b(1, 0) = b(0, 1) = xy;
   365 template <
typename T>
   372 template <
typename T>
   380 template <
typename T>
   388 template <
typename T>
   395 template <
typename T>
   403 template <
typename T>
   411 template <
typename T>
   419 template <
typename T>
   431 template <
typename T>
   439 template <
typename T>
   443   if (a.
n() != 
N || a.
m() != 
N)
   444     mooseError(
"Dimensions of ColumnMajorMatrixTempl<T> are incompatible with RankTwoTensorTempl");
   446   const T * cmm_rawdata = a.
rawData();
   449       _coords[i * 
N + j] = cmm_rawdata[i + j * 
N];
   454 template <
typename T>
   462 template <
typename T>
   472           result(i, k, l) += (*this)(i, j) * b(j, k, l);
   477 template <
typename T>
   486         result(i, j, k) += (*this)(j, k) * b(i);
   491 template <
typename T>
   497   deviatoric.
addIa(-1.0 / 3.0 * this->tr());
   501 template <
typename T>
   505   return (*
this)(0, 0) * (*
this)(1, 1) + (*
this)(0, 0) * (*
this)(2, 2) +
   506          (*
this)(1, 1) * (*
this)(2, 2) - (*
this)(0, 1) * (*
this)(1, 0) -
   507          (*
this)(0, 2) * (*
this)(2, 0) - (*
this)(1, 2) * (*
this)(2, 1);
   510 template <
typename T>
   529 template <
typename T>
   536 template <
typename T>
   545           result(i, j, k, l) = 0.5 * (i == k) * (j == l) + 0.5 * (i == l) * (j == k) -
   546                                (1.0 / 3.0) * (i == j) * (k == l);
   550 template <
typename T>
   558 template <
typename T>
   565 template <
typename T>
   572 template <
typename T>
   577   return s(0, 0) * (s(1, 1) * s(2, 2) - s(2, 1) * s(1, 2)) -
   578          s(1, 0) * (s(0, 1) * s(2, 2) - s(2, 1) * s(0, 2)) +
   579          s(2, 0) * (s(0, 1) * s(1, 2) - s(1, 1) * s(0, 2));
   582 template <
typename T>
   587   const T s3 = secondInvariant() / 3.0;
   590   d(0, 0) = s(1, 1) * s(2, 2) - s(2, 1) * s(1, 2) + s3;
   591   d(0, 1) = s(2, 0) * s(1, 2) - s(1, 0) * s(2, 2);
   592   d(0, 2) = s(1, 0) * s(2, 1) - s(2, 0) * s(1, 1);
   593   d(1, 0) = s(2, 1) * s(0, 2) - s(0, 1) * s(2, 2);
   594   d(1, 1) = s(0, 0) * s(2, 2) - s(2, 0) * s(0, 2) + s3;
   595   d(1, 2) = s(2, 0) * s(0, 1) - s(0, 0) * s(2, 1);
   596   d(2, 0) = s(0, 1) * s(1, 2) - s(1, 1) * s(0, 2);
   597   d(2, 1) = s(1, 0) * s(0, 2) - s(0, 0) * s(1, 2);
   598   d(2, 2) = s(0, 0) * s(1, 1) - s(1, 0) * s(0, 1) + s3;
   602 template <
typename T>
   614           d2(i, j, k, l) = 
Real(i == j) * s(k, l) / 3.0 + 
Real(k == l) * s(i, j) / 3.0;
   626   d2(0, 0, 1, 1) += s(2, 2);
   627   d2(0, 0, 1, 2) -= s(2, 1);
   628   d2(0, 0, 2, 1) -= s(1, 2);
   629   d2(0, 0, 2, 2) += s(1, 1);
   631   d2(0, 1, 0, 1) -= s(2, 2) / 2.0;
   632   d2(0, 1, 1, 0) -= s(2, 2) / 2.0;
   633   d2(0, 1, 0, 2) += s(1, 2) / 2.0;
   634   d2(0, 1, 2, 0) += s(1, 2) / 2.0;
   635   d2(0, 1, 1, 2) += s(2, 0) / 2.0;
   636   d2(0, 1, 2, 1) += s(2, 0) / 2.0;
   637   d2(0, 1, 2, 2) -= s(1, 0);
   639   d2(0, 2, 0, 1) += s(2, 1) / 2.0;
   640   d2(0, 2, 1, 0) += s(2, 1) / 2.0;
   641   d2(0, 2, 0, 2) -= s(1, 1) / 2.0;
   642   d2(0, 2, 2, 0) -= s(1, 1) / 2.0;
   643   d2(0, 2, 1, 1) -= s(2, 0);
   644   d2(0, 2, 1, 2) += s(1, 0) / 2.0;
   645   d2(0, 2, 2, 1) += s(1, 0) / 2.0;
   647   d2(1, 0, 0, 1) -= s(2, 2) / 2.0;
   648   d2(1, 0, 1, 0) -= s(2, 2) / 2.0;
   649   d2(1, 0, 0, 2) += s(1, 2) / 2.0;
   650   d2(1, 0, 2, 0) += s(1, 2) / 2.0;
   651   d2(1, 0, 1, 2) += s(2, 0) / 2.0;
   652   d2(1, 0, 2, 1) += s(2, 0) / 2.0;
   653   d2(1, 0, 2, 2) -= s(1, 0);
   655   d2(1, 1, 0, 0) += s(2, 2);
   656   d2(1, 1, 0, 2) -= s(2, 0);
   657   d2(1, 1, 2, 0) -= s(2, 0);
   658   d2(1, 1, 2, 2) += s(0, 0);
   660   d2(1, 2, 0, 0) -= s(2, 1);
   661   d2(1, 2, 0, 1) += s(2, 0) / 2.0;
   662   d2(1, 2, 1, 0) += s(2, 0) / 2.0;
   663   d2(1, 2, 0, 2) += s(0, 1) / 2.0;
   664   d2(1, 2, 2, 0) += s(0, 1) / 2.0;
   665   d2(1, 2, 1, 2) -= s(0, 0) / 2.0;
   666   d2(1, 2, 2, 1) -= s(0, 0) / 2.0;
   668   d2(2, 0, 0, 1) += s(2, 1) / 2.0;
   669   d2(2, 0, 1, 0) += s(2, 1) / 2.0;
   670   d2(2, 0, 0, 2) -= s(1, 1) / 2.0;
   671   d2(2, 0, 2, 0) -= s(1, 1) / 2.0;
   672   d2(2, 0, 1, 1) -= s(2, 0);
   673   d2(2, 0, 1, 2) += s(1, 0) / 2.0;
   674   d2(2, 0, 2, 1) += s(1, 0) / 2.0;
   676   d2(2, 1, 0, 0) -= s(2, 1);
   677   d2(2, 1, 0, 1) += s(2, 0) / 2.0;
   678   d2(2, 1, 1, 0) += s(2, 0) / 2.0;
   679   d2(2, 1, 0, 2) += s(0, 1) / 2.0;
   680   d2(2, 1, 2, 0) += s(0, 1) / 2.0;
   681   d2(2, 1, 1, 2) -= s(0, 0) / 2.0;
   682   d2(2, 1, 2, 1) -= s(0, 0) / 2.0;
   684   d2(2, 2, 0, 0) += s(1, 1);
   685   d2(2, 2, 0, 1) -= s(1, 0);
   686   d2(2, 2, 1, 0) -= s(1, 0);
   687   d2(2, 2, 1, 1) += s(0, 0);
   692 template <
typename T>
   698   d(0, 0) = (*this)(1, 1) * (*
this)(2, 2) - (*
this)(2, 1) * (*
this)(1, 2);
   699   d(0, 1) = (*this)(2, 0) * (*
this)(1, 2) - (*
this)(1, 0) * (*
this)(2, 2);
   700   d(0, 2) = (*this)(1, 0) * (*
this)(2, 1) - (*
this)(2, 0) * (*
this)(1, 1);
   701   d(1, 0) = (*this)(2, 1) * (*
this)(0, 2) - (*
this)(0, 1) * (*
this)(2, 2);
   702   d(1, 1) = (*this)(0, 0) * (*
this)(2, 2) - (*
this)(2, 0) * (*
this)(0, 2);
   703   d(1, 2) = (*this)(2, 0) * (*
this)(0, 1) - (*
this)(0, 0) * (*
this)(2, 1);
   704   d(2, 0) = (*this)(0, 1) * (*
this)(1, 2) - (*
this)(1, 1) * (*
this)(0, 2);
   705   d(2, 1) = (*this)(1, 0) * (*
this)(0, 2) - (*
this)(0, 0) * (*
this)(1, 2);
   706   d(2, 2) = (*this)(0, 0) * (*
this)(1, 1) - (*
this)(1, 0) * (*
this)(0, 1);
   711 template <
typename T>
   719       stm << std::setw(15) << a(i, j) << 
' ';
   733 template <
typename T>
   741 template <
typename T>
   754 template <
typename T>
   758   if (input.size() == 4)
   762     (*this)(0, 0) = input[0];
   763     (*this)(0, 1) = input[1];
   764     (*this)(1, 0) = input[2];
   765     (*this)(1, 1) = input[3];
   768     mooseError(
"please provide correct number of values for surface RankTwoTensorTempl<T> "   772 template <
typename T>
   776   mooseError(
"The syev method is only supported for Real valued tensors");
   781                          std::vector<Real> & eigvals,
   782                          std::vector<Real> & a) 
const;
   784 template <
typename T>
   789   symmetricEigenvaluesEigenvectors(eigvals, a);
   795 template <
typename T>
   801       "symmetricEigenvaluesEigenvectors is only available for ordered tensor component types");
   812 template <
typename T>
   820   syev(
"V", eigvals, a);
   824   std::vector<T> eig_vec;
   830       eig_vec[j] = a[i * 
N + j];
   833         deigvals[i](j, k) = eig_vec[j] * eig_vec[k];
   841   if (eigvals[0] == eigvals[1] && eigvals[0] == eigvals[2])
   842     deigvals[0] = deigvals[1] = deigvals[2] = (deigvals[0] + deigvals[1] + deigvals[2]) / 3.0;
   843   else if (eigvals[0] == eigvals[1])
   844     deigvals[0] = deigvals[1] = (deigvals[0] + deigvals[1]) / 2.0;
   845   else if (eigvals[0] == eigvals[2])
   846     deigvals[0] = deigvals[2] = (deigvals[0] + deigvals[2]) / 2.0;
   847   else if (eigvals[1] == eigvals[2])
   848     deigvals[1] = deigvals[2] = (deigvals[1] + deigvals[2]) / 2.0;
   851 template <
typename T>
   855   std::vector<T> eigvec;
   856   std::vector<T> eigvals;
   863   syev(
"V", eigvals, eigvec);
   867       ev[i][j] = eigvec[i * 
N + j];
   869   for (
unsigned int alpha = 0; alpha < 
N; ++alpha)
   870     for (
unsigned int beta = 0; beta < 
N; ++beta)
   872       if (eigvals[alpha] == eigvals[beta])
   880               deriv[alpha](i, j, k, l) +=
   881                   0.5 * (ev[beta][i] * ev[alpha][j] + ev[alpha][i] * ev[beta][j]) *
   882                   (ev[beta][k] * ev[alpha][l] + ev[beta][l] * ev[alpha][k]) /
   883                   (eigvals[alpha] - eigvals[beta]);
   888 template <
typename T>
   892   mooseError(
"getRUDecompositionRotation is only supported for Real valued tensors");
   898 template <
typename T>
   905 template <
typename T>
   916 template <
typename T>
   924 template <
typename T>
   932       a(i, j) = v1(i) * v2(j);
   935 template <
typename T>
   943       result(i, j) = v1(i) * v2(j);
   947 template <
typename T>
   952   for (
unsigned int i = 0; i < 
N; ++i)
   953     for (
unsigned int j = 0; j < 
N; ++j)
   954       result(i, j) = v(i) * v(j);
   958 template <
typename T>
   964       tensor(i, j) = (*this)(i, j);
   967 template <
typename T>
   972     (*this)(r, i) = v(i);
   975 template <
typename T>
   980     (*this)(i, c) = v(i);
   983 template <
typename T>
   992           result(k, l) += (*this)(i, j) * b(i, j, k, l);
   996 template <
typename T>
  1000   mooseAssert(N2 == 9, 
"RankTwoTensorTempl is currently only tested for 3 dimensions.");
  1002     _coords[i] = identityCoords[i];
 RankFourTensorTempl is designed to handle any N-dimensional fourth order tensor, C. 
void fillRow(unsigned int r, const libMesh::TypeVector< T > &v)
Assign values to a specific row of the second order tensor. 
RankTwoTensorTempl< T > dsecondInvariant() const
Return the derivative of the main second invariant w.r.t. 
RankTwoTensorTempl< T > inverse() const
Return the inverse of this second order tensor. 
RankFourTensorTempl< T > d2secondInvariant() const
Return the second derivative of the main second invariant w.r.t. 
RankTwoTensorTempl()
Empty constructor; fills to zero. 
bool operator==(const RankTwoTensorTempl< T > &a) const
Defines logical equality with another RankTwoTensorTempl<T> 
void printADReal(unsigned int nDual, std::ostream &stm=Moose::out) const
Print the Real part of the RankTwoTensorTempl<ADReal> along with its first nDual dual numbers...
T generalSecondInvariant() const
Return the principal second invariant of this second order tensor. 
const TypeTensor< T > & operator/=(const T &)
static RankTwoTensorTempl initializeSymmetric(const libMesh::TypeVector< T > &v0, const libMesh::TypeVector< T > &v1, const libMesh::TypeVector< T > &v2)
Named constructor for initializing symmetrically. 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sin(_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tan
static void initRandom(unsigned int)
Initialize the random seed based on an unsigned integer. 
void symmetricEigenvalues(std::vector< T > &eigvals) const
computes eigenvalues, assuming tens is symmetric, and places them in ascending order in eigvals ...
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. 
This class defines a Tensor that can change its shape. 
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
void dsymmetricEigenvalues(std::vector< T > &eigvals, std::vector< RankTwoTensorTempl< T >> &deigvals) const
computes eigenvalues, and their symmetric derivatives wrt vals, assuming tens is symmetric ...
static RankTwoTensorTempl< T > genRandomTensor(T stddev, T mean)
Generate a random second order tensor with all 9 components treated as independent random variables f...
void print(std::ostream &stm=Moose::out) const
Print the rank two tensor. 
RankTwoTensorTempl< T > & operator-=(const RankTwoTensorTempl< T > &a)
Subtract another second order tensor from this one. 
static RankTwoTensorTempl< T > plusTranspose(const RankTwoTensorTempl< T > &)
Initialize a second order tensor with expression . 
RankThreeTensorTempl< T > contraction(const RankThreeTensorTempl< T > &b) const
Return the single contraction of this second order tensor with a third order tensor ...
TypeTensor< T > transpose() const
void surfaceFillFromInputVector(const std::vector< T > &input)
sets _coords[0][0], _coords[0][1], _coords[1][0], _coords[1][1] to input, and the remainder to zero ...
void mooseSetToZero< ADRankTwoTensor >(ADRankTwoTensor &v)
Helper function template specialization to set an object to zero. 
RankTwoTensorTempl< T > & operator+=(const RankTwoTensorTempl< T > &a)
Add another second order tensor to this one. 
T secondInvariant() const
Return the main second invariant of this second order tensor. 
RankTwoTensorTempl< T > dtrace() const
Return the derivative of the trace w.r.t. 
static int run(const ADReal &x)
T _coords[LIBMESH_DIM *LIBMESH_DIM]
DualNumber< Real, DNDerivativeType, true > ADReal
RankTwoTensorTempl< T > dthirdInvariant() const
Denote the _coords[i][j] by A_ij, then this returns d(thirdInvariant()/dA_ij. 
void rotate(const RankTwoTensorTempl< T > &R)
Rotate the tensor in-place given a rotation tensor . 
RankThreeTensor is designed to handle any N-dimensional third order tensor, r. 
void fillColumn(unsigned int c, const libMesh::TypeVector< T > &v)
Assign values to a specific column of the second order tensor. 
T trace() const
A wrapper for tr() 
static RankTwoTensorTempl< T > selfOuterProduct(const libMesh::TypeVector< T > &)
Initialize a second order tensor as the outer product of a vector with itself, i.e. 
static RankTwoTensorTempl initializeFromRows(const libMesh::TypeVector< T > &row0, const libMesh::TypeVector< T > &row1, const libMesh::TypeVector< T > &row2)
Named constructor for initializing from row vectors. 
RankTwoTensorTempl< T > deviatoric() const
Return the deviatoric part of this tensor . 
static MooseEnum fillMethodEnum()
Get the available FillMethod options. 
T L2norm() const
Sqrt(_coords[i][j]*_coords[i][j]) 
T * rawData()
Returns a reference to the raw data pointer. 
void fillFromInputVector(const std::vector< T > &input, FillMethod fill_method=autodetect)
The smart mutator that determines how to fill the second order tensor based on the size of the input ...
void setToIdentity()
Set the tensor to identity. 
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template cos(_arg) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(cos
TypeTensor< T > operator-() const
RankTwoTensorTempl< T > & operator/=(const T &a)
Divide this tensor by a scalar (component-wise) 
Real deriv(unsigned n, unsigned alpha, unsigned beta, Real x)
RankFourTensorTempl< T > d2thirdInvariant() const
Denote the _coords[i][j] by A_ij, then this returns d^2(thirdInvariant)/dA_ij/dA_kl. 
void addIa(const T &a)
Add identity times a to _coords. 
unsigned int m() const
Returns the number of columns. 
RankTwoTensorTempl< T > rotateXyPlane(T a)
Rotate the tensor about the z-axis. 
libMesh::VectorValue< T > column(const unsigned int i) const
Get the i-th column of the second order tensor. 
void d2symmetricEigenvalues(std::vector< RankFourTensorTempl< T >> &deriv) const
Computes second derivatives of Eigenvalues of a rank two tensor. 
static RankTwoTensorTempl< T > genRandomSymmTensor(T stddev, T mean)
Generate a random symmetric second order tensor with the 6 upper-triangular components treated as ind...
void init(triangulateio &t)
RankTwoTensorTempl< T > rotated(const RankTwoTensorTempl< T > &R) const
Return the rotated tensor given a rotation tensor . 
T doubleContraction(const RankTwoTensorTempl< T > &a) const
Return the double contraction with another second order tensor . 
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
RankTwoTensorTempl< T > square() const
Return . 
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args. 
RankTwoTensorTempl< T > & operator*=(const T &a)
Multiply this tensor by a scalar (component-wise) 
T thirdInvariant() const
Denote the _coords[i][j] by A_ij, then S_ij = A_ij - de_ij*tr(A)/3 Then this returns det(S + S...
CompareTypes< T, T2 >::supertype contract(const TypeTensor< T2 > &) const
void printReal(std::ostream &stm=Moose::out) const
Print the Real part of the RankTwoTensorTempl<ADReal> 
static RankTwoTensorTempl< T > timesTranspose(const RankTwoTensorTempl< T > &)
Initialize a second order tensor with expression . 
OutputTools< Real >::VariableValue VariableValue
static RankTwoTensorTempl< T > transposeTimes(const RankTwoTensorTempl< T > &)
Initialize a second order tensor with expression . 
RankTwoTensorTempl< T > transpose() const
Return the tensor transposed. 
void vectorOuterProduct(const libMesh::TypeVector< T > &, const libMesh::TypeVector< T > &)
Set the values of the second order tensor to be the outer product of two vectors, i...
void fillRealTensor(libMesh::TensorValue< T > &)
Fill a libMesh::TensorValue<T> from this second order tensor. 
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
bool isSymmetric() const
Test for symmetry. 
void symmetricEigenvaluesEigenvectors(std::vector< T > &eigvals, RankTwoTensorTempl< T > &eigvecs) const
computes eigenvalues and eigenvectors, assuming tens is symmetric, and places them in ascending order...
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
RankTwoTensorTempl< T > operator-() const
Return the negation of this tensor. 
RankTwoTensorTempl is designed to handle the Stress or Strain Tensor for a fully anisotropic material...
static void seed(unsigned int seed)
The method seeds the random number generator. 
RankThreeTensorTempl< T > mixedProductJkI(const libMesh::VectorValue< T > &b) const
Return the tensor product of this second order tensor with a vector . 
TypeTensor< T > inverse() const
void syev(const char *calculation_type, std::vector< T > &eigvals, std::vector< T > &a) const
Uses the petscblaslapack.h LAPACKsyev_ routine to find, for symmetric _coords: (1) the eigenvalues (i...
static RankTwoTensorTempl< T > outerProduct(const libMesh::TypeVector< T > &, const libMesh::TypeVector< T > &)
Initialize a second order tensor as the outer product of two vectors, i.e. 
IntRange< T > make_range(T beg, T end)
void getRUDecompositionRotation(RankTwoTensorTempl< T > &rot) const
Uses the petscblaslapack.h LAPACKsyev_ routine to perform RU decomposition and obtain the rotation te...
static Real rand()
This method returns the next random number (Real format) from the generator. 
RankTwoTensorTempl< T > ddet() const
Denote the _coords[i][j] by A_ij, then this returns d(det)/dA_ij. 
FillMethod
To fill up the 9 entries in the 2nd-order tensor, fillFromInputVector is called with one of the follo...
const TypeTensor< T > & operator-=(const TypeTensor< T2 > &)
const TypeTensor< T > & operator+=(const TypeTensor< T2 > &)
unsigned int n() const
Returns the number of rows. 
static RankTwoTensorTempl initializeFromColumns(const libMesh::TypeVector< T > &col0, const libMesh::TypeVector< T > &col1, const libMesh::TypeVector< T > &col2)
Named constructor for initializing from row vectors. 
RankTwoTensorTempl< T > initialContraction(const RankFourTensorTempl< T > &b) const
returns this_ij * b_ijkl 
void mooseSetToZero< RankTwoTensor >(RankTwoTensor &v)
Helper function template specialization to set an object to zero. 
InitMethod
The initialization method. 
const TypeTensor< T > & operator*=(const Scalar &factor)
RankTwoTensorTempl< T > & operator=(const RankTwoTensorTempl< T > &a)=default
Assignment operator. 
void fillFromScalarVariable(const VariableValue &scalar_variable)
 The smart mutator that determines how to fill the second order tensor based on the order of the scal...
void ErrorVector unsigned int
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