SymmetricRankTwoTensorTempl is designed to handle the Stress or Strain Tensor for an anisotropic material. More...
#include <SymmetricRankTwoTensor.h>
Public Types | |
enum | InitMethod { initNone, initIdentity } |
enum | FillMethod { autodetect = 0, isotropic1 = 1, diagonal3 = 3, symmetric6 = 6 } |
To fill up the 6 entries in the 2nd-order tensor, fillFromInputVector is called with one of the following fill_methods. More... | |
typedef T | value_type |
For generic programming. More... | |
Public Member Functions | |
SymmetricRankTwoTensorTempl () | |
Default constructor; fills to zero. More... | |
SymmetricRankTwoTensorTempl (const InitMethod) | |
Select specific initialization pattern. More... | |
SymmetricRankTwoTensorTempl (const std::vector< T > &input) | |
Constructor that proxies the fillFromInputVector method. More... | |
SymmetricRankTwoTensorTempl (const T &S11, const T &S22, const T &S33, const T &S23, const T &S13, const T &S12) | |
Initialization list replacement constructors, 6 arguments. More... | |
operator RankTwoTensorTempl< T > () | |
SymmetricRankTwoTensorTempl (const TensorValue< T > &a) | |
Copy constructor from TensorValue<T> More... | |
SymmetricRankTwoTensorTempl (const TypeTensor< T > &a) | |
Copy constructor from TypeTensor<T> More... | |
template<typename T2 > | |
SymmetricRankTwoTensorTempl (const SymmetricRankTwoTensorTempl< T2 > &a) | |
Construct from other template. More... | |
void | fillFromInputVector (const std::vector< T > &input, FillMethod fill_method=autodetect) |
fillFromInputVector takes 1, 3, or 6 inputs to fill in the symmmetric Rank-2 tensor. More... | |
void | fillFromScalarVariable (const VariableValue &scalar_variable) |
fillFromScalarVariable takes FIRST/THIRD/SIXTH order scalar variable to fill in the Rank-2 tensor. More... | |
T & | operator() (unsigned int i) |
Gets the raw value for the index specified. Takes index = 0,1,2,3,4,5. More... | |
T | operator() (unsigned int i) const |
Gets the raw value for the index specified. More... | |
T | operator() (unsigned int i, unsigned int j) const |
Gets the value for the index specified. More... | |
libMesh::VectorValue< T > | row (const unsigned int n) const |
get the specified row of the tensor More... | |
libMesh::VectorValue< T > | column (const unsigned int n) const |
get the specified column of the tensor More... | |
SymmetricRankTwoTensorTempl< T > | square () const |
Returns the matrix squared. More... | |
T | tr () const |
Returns the trace. More... | |
void | zero () |
Set all components to zero. More... | |
void | rotate (const TypeTensor< T > &R) |
rotates the tensor data given a rank two tensor rotation tensor _vals[i][j] = R_ij * R_jl * _vals[k][l] More... | |
SymmetricRankTwoTensorTempl< T > | transpose () const |
Returns a matrix that is the transpose of the matrix this was called on. More... | |
template<typename T2 > | |
SymmetricRankTwoTensorTempl< T > & | operator= (const SymmetricRankTwoTensorTempl< T2 > &a) |
sets _vals to a, and returns _vals More... | |
template<typename Scalar > | |
boostcopy::enable_if_c< libMesh::ScalarTraits< Scalar >::value, SymmetricRankTwoTensorTempl & >::type | operator= (const Scalar &libmesh_dbg_var(p)) |
Assignment-from-scalar operator. More... | |
SymmetricRankTwoTensorTempl< T > & | operator+= (const SymmetricRankTwoTensorTempl< T > &a) |
adds a to _vals More... | |
template<typename T2 > | |
SymmetricRankTwoTensorTempl< typename libMesh::CompareTypes< T, T2 >::supertype > | operator+ (const SymmetricRankTwoTensorTempl< T2 > &a) const |
returns _vals + a More... | |
SymmetricRankTwoTensorTempl< T > & | operator-= (const SymmetricRankTwoTensorTempl< T > &a) |
sets _vals -= a and returns vals More... | |
template<typename T2 > | |
SymmetricRankTwoTensorTempl< typename libMesh::CompareTypes< T, T2 >::supertype > | operator- (const SymmetricRankTwoTensorTempl< T2 > &a) const |
returns _vals - a More... | |
SymmetricRankTwoTensorTempl< T > | operator- () const |
returns -_vals More... | |
SymmetricRankTwoTensorTempl< T > & | operator*= (const T &a) |
performs _vals *= a More... | |
template<typename T2 > | |
auto | operator* (const T2 &a) const -> typename std::enable_if< libMesh::ScalarTraits< T2 >::value, SymmetricRankTwoTensorTempl< decltype(T() *T2())>>::type |
returns _vals*a More... | |
SymmetricRankTwoTensorTempl< T > & | operator/= (const T &a) |
performs _vals /= a More... | |
template<typename T2 > | |
auto | operator/ (const T2 &a) const -> typename std::enable_if< libMesh::ScalarTraits< T2 >::value, SymmetricRankTwoTensorTempl< decltype(T()/T2())>>::type |
returns _vals/a More... | |
template<typename T2 > | |
TypeVector< typename libMesh::CompareTypes< T, T2 >::supertype > | operator* (const TypeVector< T2 > &a) const |
Defines multiplication with a vector to get a vector. More... | |
template<typename T2 > | |
bool | operator== (const SymmetricRankTwoTensorTempl< T2 > &a) const |
Defines logical equality with another SymmetricRankTwoTensorTempl<T2> More... | |
bool | isSymmetric () const |
Test for symmetry. Surprisingly this is always true. More... | |
template<typename T2 > | |
bool | operator!= (const SymmetricRankTwoTensorTempl< T2 > &a) const |
Defines logical inequality with another SymmetricRankTwoTensorTempl<T2> More... | |
SymmetricRankTwoTensorTempl< T > & | operator= (const ColumnMajorMatrixTempl< T > &a) |
Sets _vals to the values in a ColumnMajorMatrix (must be 3x3) More... | |
T | doubleContraction (const SymmetricRankTwoTensorTempl< T > &a) const |
returns _vals_ij * a_ij (sum on i, j) More... | |
SymmetricRankFourTensorTempl< T > | outerProduct (const SymmetricRankTwoTensorTempl< T > &a) const |
returns C_ijkl = a_ij * b_kl More... | |
SymmetricRankFourTensorTempl< T > | positiveProjectionEigenDecomposition (std::vector< T > &, RankTwoTensorTempl< T > &) const |
return positive projection tensor of eigen-decomposition More... | |
SymmetricRankTwoTensorTempl< T > | deviatoric () const |
returns A_ij - de_ij*tr(A)/3, where A are the _vals More... | |
T | trace () const |
returns the trace of the tensor, ie _vals[i][i] (sum i = 0, 1, 2) More... | |
SymmetricRankTwoTensorTempl< T > | inverse () const |
retuns the inverse of the tensor More... | |
SymmetricRankTwoTensorTempl< T > | dtrace () const |
Denote the _vals[i][j] by A_ij, then this returns d(trace)/dA_ij. More... | |
T | generalSecondInvariant () const |
Calculates the second invariant (I2) of a tensor. More... | |
T | secondInvariant () const |
Denote the _vals[i][j] by A_ij, then S_ij = A_ij - de_ij*tr(A)/3 Then this returns (S_ij + S_ji)*(S_ij + S_ji)/8 Note the explicit symmeterisation. More... | |
SymmetricRankTwoTensorTempl< T > | dsecondInvariant () const |
Denote the _vals[i][j] by A_ij, then this returns d(secondInvariant)/dA_ij. More... | |
SymmetricRankFourTensorTempl< T > | d2secondInvariant () const |
Denote the _vals[i][j] by A_ij, then this returns d^2(secondInvariant)/dA_ij/dA_kl. More... | |
T | sin3Lode (const T &r0, const T &r0_value) const |
Sin(3*Lode_angle) If secondInvariant() <= r0 then return r0_value This is to gaurd against precision-loss errors. More... | |
SymmetricRankTwoTensorTempl< T > | dsin3Lode (const T &r0) const |
d(sin3Lode)/dA_ij If secondInvariant() <= r0 then return zero This is to gaurd against precision-loss errors. More... | |
T | thirdInvariant () const |
Denote the _vals[i][j] by A_ij, then S_ij = A_ij - de_ij*tr(A)/3 Then this returns det(S + S.transpose())/2 Note the explicit symmeterisation. More... | |
SymmetricRankTwoTensorTempl< T > | dthirdInvariant () const |
Denote the _vals[i][j] by A_ij, then this returns d(thirdInvariant()/dA_ij. More... | |
SymmetricRankFourTensorTempl< T > | d2thirdInvariant () const |
Denote the _vals[i][j] by A_ij, then this returns d^2(thirdInvariant)/dA_ij/dA_kl. More... | |
T | det () const |
SymmetricRankTwoTensorTempl< T > | ddet () const |
Denote the _vals[i][j] by A_ij, then this returns d(det)/dA_ij. More... | |
void | print (std::ostream &stm=Moose::out) const |
Print the rank two tensor. More... | |
void | printReal (std::ostream &stm=Moose::out) const |
Print the Real part of the ADReal rank two tensor. More... | |
void | printADReal (unsigned int nDual, std::ostream &stm=Moose::out) const |
Print the Real part of the ADReal rank two tensor along with its first nDual dual numbers. More... | |
void | addIa (const T &a) |
Add identity times a to _vals. More... | |
T | L2norm () const |
Sqrt(_vals[i][j]*_vals[i][j]) More... | |
void | surfaceFillFromInputVector (const std::vector< T > &input) |
sets _vals[0][0], _vals[0][1], _vals[1][0], _vals[1][1] to input, and the remainder to zero More... | |
void | symmetricEigenvalues (std::vector< T > &eigvals) const |
computes eigenvalues, assuming tens is symmetric, and places them in ascending order in eigvals More... | |
void | symmetricEigenvaluesEigenvectors (std::vector< T > &eigvals, RankTwoTensorTempl< T > &eigvecs) const |
computes eigenvalues and eigenvectors, assuming tens is symmetric, and places them in ascending order in eigvals. More... | |
SymmetricRankTwoTensorTempl< T > | initialContraction (const SymmetricRankFourTensorTempl< T > &b) const |
returns this_ij * b_ijkl More... | |
void | setToIdentity () |
set the tensor to the identity matrix More... | |
Static Public Member Functions | |
static constexpr Real | mandelFactor (unsigned int i) |
returns the 1 or sqrt(2) prefactor in the Mandel notation for the index i ranging from 0-5. More... | |
static SymmetricRankTwoTensorTempl | identity () |
static SymmetricRankTwoTensorTempl | initializeSymmetric (const TypeVector< T > &v0, const TypeVector< T > &v1, const TypeVector< T > &v2) |
named constructor for initializing symmetrically More... | |
static MooseEnum | fillMethodEnum () |
Static method for use in validParams for getting the "fill_method". More... | |
static SymmetricRankTwoTensorTempl< T > | timesTranspose (const RankTwoTensorTempl< T > &) |
return the matrix multiplied with its transpose A*A^T (guaranteed symmetric) More... | |
static SymmetricRankTwoTensorTempl< T > | timesTranspose (const SymmetricRankTwoTensorTempl< T > &) |
static SymmetricRankTwoTensorTempl< T > | transposeTimes (const RankTwoTensorTempl< T > &) |
return the matrix multiplied with its transpose A^T*A (guaranteed symmetric) More... | |
static SymmetricRankTwoTensorTempl< T > | transposeTimes (const SymmetricRankTwoTensorTempl< T > &) |
static SymmetricRankTwoTensorTempl< T > | plusTranspose (const RankTwoTensorTempl< T > &) |
return the matrix plus its transpose A-A^T (guaranteed symmetric) More... | |
static SymmetricRankTwoTensorTempl< T > | plusTranspose (const SymmetricRankTwoTensorTempl< T > &) |
static void | initRandom (unsigned int) |
This function initializes random seed based on a user-defined number. More... | |
static SymmetricRankTwoTensorTempl< T > | genRandomSymmTensor (T, T) |
This function generates a random symmetric rank two tensor. More... | |
static SymmetricRankTwoTensorTempl< T > | selfOuterProduct (const TypeVector< T > &) |
SymmetricRankTwoTensorTempl<T> from outer product of a vector with itself. More... | |
Static Public Attributes | |
static constexpr unsigned int | full_index [6][2] = {{0, 0}, {1, 1}, {2, 2}, {1, 2}, {0, 2}, {0, 1}} |
static constexpr unsigned int | reverse_index [3][3] = {{0, 5, 4}, {5, 1, 3}, {4, 3, 2}} |
static constexpr unsigned int | Ndim = Moose::dim |
tensor dimension and Mandel vector length More... | |
static constexpr unsigned int | N = Ndim + (Ndim * (Ndim - 1)) / 2 |
Protected Member Functions | |
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 _vals: (1) the eigenvalues (if calculation_type == "N") (2) the eigenvalues and eigenvectors (if calculation_type == "V") More... | |
Private Member Functions | |
SymmetricRankTwoTensorTempl (const T &S11, const T &S21, const T &S31, const T &S12, const T &S22, const T &S32, const T &S13, const T &S23, const T &S33) | |
Initialization list replacement constructors, 9 arguments (for internal use only) More... | |
Static Private Member Functions | |
static SymmetricRankTwoTensorTempl | fromRawComponents (const T &S11, const T &S22, const T &S33, const T &S23, const T &S13, const T &S12) |
Private Attributes | |
std::array< T, N > | _vals |
Static Private Attributes | |
static constexpr std::array< Real, N > | identityCoords = {{1, 1, 1, 0, 0, 0}} |
Friends | |
template<class T2 > | |
class | SymmetricRankFourTensorTempl |
std::ostream & | operator<< (std::ostream &os, const SymmetricRankTwoTensorTempl< T > &t) |
template<class T2 > | |
void | dataStore (std::ostream &, SymmetricRankTwoTensorTempl< T2 > &, void *) |
template<class T2 > | |
void | dataLoad (std::istream &, SymmetricRankTwoTensorTempl< T2 > &, void *) |
SymmetricRankTwoTensorTempl is designed to handle the Stress or Strain Tensor for an anisotropic material.
It is designed to reduce the redundancies of the Complete tensor classes for regular mechanics problems and to enable use of the Mandel notation.
Definition at line 75 of file SymmetricRankTwoTensor.h.
typedef T SymmetricRankTwoTensorTempl< T >::value_type |
For generic programming.
Definition at line 79 of file SymmetricRankTwoTensor.h.
enum SymmetricRankTwoTensorTempl::FillMethod |
To fill up the 6 entries in the 2nd-order tensor, fillFromInputVector is called with one of the following fill_methods.
See the fill*FromInputVector functions for more details
Enumerator | |
---|---|
autodetect | |
isotropic1 | |
diagonal3 | |
symmetric6 |
Definition at line 113 of file SymmetricRankTwoTensor.h.
enum SymmetricRankTwoTensorTempl::InitMethod |
SymmetricRankTwoTensorTempl< T >::SymmetricRankTwoTensorTempl | ( | ) |
Default constructor; fills to zero.
Definition at line 56 of file SymmetricRankTwoTensorImplementation.h.
Referenced by SymmetricRankTwoTensorTempl< Real >::identity().
SymmetricRankTwoTensorTempl< T >::SymmetricRankTwoTensorTempl | ( | const InitMethod | init | ) |
Select specific initialization pattern.
Definition at line 62 of file SymmetricRankTwoTensorImplementation.h.
|
inline |
Constructor that proxies the fillFromInputVector method.
Definition at line 122 of file SymmetricRankTwoTensor.h.
SymmetricRankTwoTensorTempl< T >::SymmetricRankTwoTensorTempl | ( | const T & | S11, |
const T & | S22, | ||
const T & | S33, | ||
const T & | S23, | ||
const T & | S13, | ||
const T & | S12 | ||
) |
Initialization list replacement constructors, 6 arguments.
Definition at line 79 of file SymmetricRankTwoTensorImplementation.h.
|
private |
Initialization list replacement constructors, 9 arguments (for internal use only)
Definition at line 105 of file SymmetricRankTwoTensorImplementation.h.
|
explicit |
Copy constructor from TensorValue<T>
Definition at line 139 of file SymmetricRankTwoTensorImplementation.h.
|
explicit |
Copy constructor from TypeTensor<T>
Definition at line 150 of file SymmetricRankTwoTensorImplementation.h.
|
inline |
Construct from other template.
Definition at line 156 of file SymmetricRankTwoTensor.h.
void SymmetricRankTwoTensorTempl< T >::addIa | ( | const T & | a | ) |
Add identity times a to _vals.
Definition at line 657 of file SymmetricRankTwoTensorImplementation.h.
Referenced by SymmetricRankTwoTensorTempl< Real >::deviatoric().
|
inline |
get the specified column of the tensor
Definition at line 206 of file SymmetricRankTwoTensor.h.
SymmetricRankFourTensorTempl< T > SymmetricRankTwoTensorTempl< T >::d2secondInvariant | ( | ) | const |
Denote the _vals[i][j] by A_ij, then this returns d^2(secondInvariant)/dA_ij/dA_kl.
Definition at line 501 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankFourTensorTempl< T > SymmetricRankTwoTensorTempl< T >::d2thirdInvariant | ( | ) | const |
Denote the _vals[i][j] by A_ij, then this returns d^2(thirdInvariant)/dA_ij/dA_kl.
Definition at line 571 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankTwoTensorTempl< T > SymmetricRankTwoTensorTempl< T >::ddet | ( | ) | const |
Denote the _vals[i][j] by A_ij, then this returns d(det)/dA_ij.
Definition at line 628 of file SymmetricRankTwoTensorImplementation.h.
T SymmetricRankTwoTensorTempl< T >::det | ( | ) | const |
Definition at line 617 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankTwoTensorTempl< T > SymmetricRankTwoTensorTempl< T >::deviatoric | ( | ) | const |
returns A_ij - de_ij*tr(A)/3, where A are the _vals
Definition at line 463 of file SymmetricRankTwoTensorImplementation.h.
T SymmetricRankTwoTensorTempl< T >::doubleContraction | ( | const SymmetricRankTwoTensorTempl< T > & | a | ) | const |
returns _vals_ij * a_ij (sum on i, j)
Definition at line 438 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankTwoTensorTempl< T > SymmetricRankTwoTensorTempl< T >::dsecondInvariant | ( | ) | const |
Denote the _vals[i][j] by A_ij, then this returns d(secondInvariant)/dA_ij.
Definition at line 494 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankTwoTensorTempl< T > SymmetricRankTwoTensorTempl< T >::dsin3Lode | ( | const T & | r0 | ) | const |
d(sin3Lode)/dA_ij If secondInvariant() <= r0 then return zero This is to gaurd against precision-loss errors.
Note that sin(3*Lode_angle) is not defined for secondInvariant() = 0
Definition at line 668 of file SymmetricRankTwoTensor.h.
SymmetricRankTwoTensorTempl< T > SymmetricRankTwoTensorTempl< T >::dthirdInvariant | ( | ) | const |
Denote the _vals[i][j] by A_ij, then this returns d(thirdInvariant()/dA_ij.
Definition at line 557 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankTwoTensorTempl< T > SymmetricRankTwoTensorTempl< T >::dtrace | ( | ) | const |
Denote the _vals[i][j] by A_ij, then this returns d(trace)/dA_ij.
Definition at line 538 of file SymmetricRankTwoTensorImplementation.h.
void SymmetricRankTwoTensorTempl< T >::fillFromInputVector | ( | const std::vector< T > & | input, |
FillMethod | fill_method = autodetect |
||
) |
fillFromInputVector takes 1, 3, or 6 inputs to fill in the symmmetric Rank-2 tensor.
Definition at line 173 of file SymmetricRankTwoTensorImplementation.h.
Referenced by GenericConstantSymmetricRankTwoTensorTempl< is_ad >::GenericConstantSymmetricRankTwoTensorTempl(), and SymmetricRankTwoTensorTempl< Real >::SymmetricRankTwoTensorTempl().
void SymmetricRankTwoTensorTempl< T >::fillFromScalarVariable | ( | const VariableValue & | scalar_variable | ) |
fillFromScalarVariable takes FIRST/THIRD/SIXTH order scalar variable to fill in the Rank-2 tensor.
Definition at line 218 of file SymmetricRankTwoTensorImplementation.h.
|
static |
Static method for use in validParams for getting the "fill_method".
Definition at line 50 of file SymmetricRankTwoTensorImplementation.h.
|
staticprivate |
Definition at line 125 of file SymmetricRankTwoTensorImplementation.h.
Referenced by SymmetricRankTwoTensorTempl< Real >::timesTranspose().
T SymmetricRankTwoTensorTempl< T >::generalSecondInvariant | ( | ) | const |
Calculates the second invariant (I2) of a tensor.
Definition at line 472 of file SymmetricRankTwoTensorImplementation.h.
|
static |
This function generates a random symmetric rank two tensor.
The first real scales the random number. The second real offsets the uniform random number
Definition at line 718 of file SymmetricRankTwoTensorImplementation.h.
|
inlinestatic |
Definition at line 163 of file SymmetricRankTwoTensor.h.
SymmetricRankTwoTensorTempl< T > SymmetricRankTwoTensorTempl< T >::initialContraction | ( | const SymmetricRankFourTensorTempl< T > & | b | ) | const |
returns this_ij * b_ijkl
Definition at line 734 of file SymmetricRankTwoTensorImplementation.h.
|
static |
named constructor for initializing symmetrically
Definition at line 163 of file SymmetricRankTwoTensorImplementation.h.
|
static |
This function initializes random seed based on a user-defined number.
Definition at line 711 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankTwoTensorTempl< T > SymmetricRankTwoTensorTempl< T >::inverse | ( | ) | const |
retuns the inverse of the tensor
Definition at line 521 of file SymmetricRankTwoTensorImplementation.h.
|
inline |
Test for symmetry. Surprisingly this is always true.
Definition at line 309 of file SymmetricRankTwoTensor.h.
T SymmetricRankTwoTensorTempl< T >::L2norm | ( | ) | const |
Sqrt(_vals[i][j]*_vals[i][j])
Definition at line 665 of file SymmetricRankTwoTensorImplementation.h.
|
inlinestatic |
returns the 1 or sqrt(2) prefactor in the Mandel notation for the index i ranging from 0-5.
Definition at line 93 of file SymmetricRankTwoTensor.h.
Referenced by SymmetricRankFourTensorTempl< T >::mandelFactor(), and SymmetricRankTwoTensorTempl< Real >::operator()().
|
explicit |
Definition at line 91 of file SymmetricRankTwoTensorImplementation.h.
bool SymmetricRankTwoTensorTempl< T >::operator!= | ( | const SymmetricRankTwoTensorTempl< T2 > & | a | ) | const |
Defines logical inequality with another SymmetricRankTwoTensorTempl<T2>
Definition at line 573 of file SymmetricRankTwoTensor.h.
|
inline |
Gets the raw value for the index specified. Takes index = 0,1,2,3,4,5.
Definition at line 185 of file SymmetricRankTwoTensor.h.
|
inline |
Gets the raw value for the index specified.
Takes index = 0,1,2 used for const
Definition at line 191 of file SymmetricRankTwoTensor.h.
|
inline |
Gets the value for the index specified.
Takes index = 0,1,2
Definition at line 196 of file SymmetricRankTwoTensor.h.
auto SymmetricRankTwoTensorTempl< T >::operator* | ( | const T2 & | a | ) | const -> typename std::enable_if<libMesh::ScalarTraits<T2>::value, SymmetricRankTwoTensorTempl<decltype(T() * T2())>>::type |
returns _vals*a
Definition at line 524 of file SymmetricRankTwoTensor.h.
TypeVector< typename libMesh::CompareTypes< T, T2 >::supertype > SymmetricRankTwoTensorTempl< T >::operator* | ( | const TypeVector< T2 > & | a | ) | const |
Defines multiplication with a vector to get a vector.
Definition at line 551 of file SymmetricRankTwoTensor.h.
SymmetricRankTwoTensorTempl< T > & SymmetricRankTwoTensorTempl< T >::operator*= | ( | const T & | a | ) |
performs _vals *= a
Definition at line 420 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankTwoTensorTempl< typename libMesh::CompareTypes< T, T2 >::supertype > SymmetricRankTwoTensorTempl< T >::operator+ | ( | const SymmetricRankTwoTensorTempl< T2 > & | a | ) | const |
returns _vals + a
Definition at line 390 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankTwoTensorTempl< T > & SymmetricRankTwoTensorTempl< T >::operator+= | ( | const SymmetricRankTwoTensorTempl< T > & | a | ) |
adds a to _vals
Definition at line 371 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankTwoTensorTempl< typename libMesh::CompareTypes< T, T2 >::supertype > SymmetricRankTwoTensorTempl< T >::operator- | ( | const SymmetricRankTwoTensorTempl< T2 > & | a | ) | const |
returns _vals - a
Definition at line 401 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankTwoTensorTempl< T > SymmetricRankTwoTensorTempl< T >::operator- | ( | ) | const |
returns -_vals
Definition at line 413 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankTwoTensorTempl< T > & SymmetricRankTwoTensorTempl< T >::operator-= | ( | const SymmetricRankTwoTensorTempl< T > & | a | ) |
sets _vals -= a and returns vals
Definition at line 380 of file SymmetricRankTwoTensorImplementation.h.
auto SymmetricRankTwoTensorTempl< T >::operator/ | ( | const T2 & | a | ) | const -> typename std::enable_if<libMesh::ScalarTraits<T2>::value, SymmetricRankTwoTensorTempl<decltype(T() / T2())>>::type |
returns _vals/a
Definition at line 537 of file SymmetricRankTwoTensor.h.
SymmetricRankTwoTensorTempl< T > & SymmetricRankTwoTensorTempl< T >::operator/= | ( | const T & | a | ) |
performs _vals /= a
Definition at line 429 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankTwoTensorTempl< T > & SymmetricRankTwoTensorTempl< T >::operator= | ( | const SymmetricRankTwoTensorTempl< T2 > & | a | ) |
sets _vals to a, and returns _vals
Definition at line 687 of file SymmetricRankTwoTensor.h.
|
inline |
Assignment-from-scalar operator.
Used only to zero out vectors.
Definition at line 255 of file SymmetricRankTwoTensor.h.
SymmetricRankTwoTensorTempl<T>& SymmetricRankTwoTensorTempl< T >::operator= | ( | const ColumnMajorMatrixTempl< T > & | a | ) |
Sets _vals to the values in a ColumnMajorMatrix (must be 3x3)
bool SymmetricRankTwoTensorTempl< T >::operator== | ( | const SymmetricRankTwoTensorTempl< T2 > & | a | ) | const |
Defines logical equality with another SymmetricRankTwoTensorTempl<T2>
Definition at line 562 of file SymmetricRankTwoTensor.h.
SymmetricRankFourTensorTempl< T > SymmetricRankTwoTensorTempl< T >::outerProduct | ( | const SymmetricRankTwoTensorTempl< T > & | a | ) | const |
returns C_ijkl = a_ij * b_kl
Definition at line 448 of file SymmetricRankTwoTensorImplementation.h.
|
static |
return the matrix plus its transpose A-A^T (guaranteed symmetric)
Definition at line 340 of file SymmetricRankTwoTensorImplementation.h.
Referenced by SymmetricRankTwoTensorTempl< Real >::d2thirdInvariant(), SymmetricRankTwoTensorTempl< Real >::dsecondInvariant(), SymmetricRankTwoTensorTempl< Real >::dthirdInvariant(), and SymmetricRankTwoTensorTempl< Real >::thirdInvariant().
|
static |
Definition at line 349 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankFourTensorTempl< T > SymmetricRankTwoTensorTempl< T >::positiveProjectionEigenDecomposition | ( | std::vector< T > & | eigval, |
RankTwoTensorTempl< T > & | eigvec | ||
) | const |
return positive projection tensor of eigen-decomposition
Definition at line 583 of file SymmetricRankTwoTensor.h.
void SymmetricRankTwoTensorTempl< T >::print | ( | std::ostream & | stm = Moose::out | ) | const |
Print the rank two tensor.
Definition at line 641 of file SymmetricRankTwoTensorImplementation.h.
void SymmetricRankTwoTensorTempl< T >::printADReal | ( | unsigned int | nDual, |
std::ostream & | stm = Moose::out |
||
) | const |
Print the Real part of the ADReal rank two tensor along with its first nDual dual numbers.
void SymmetricRankTwoTensorTempl< T >::printReal | ( | std::ostream & | stm = Moose::out | ) | const |
Print the Real part of the ADReal rank two tensor.
Definition at line 649 of file SymmetricRankTwoTensorImplementation.h.
void SymmetricRankTwoTensorTempl< T >::rotate | ( | const TypeTensor< T > & | R | ) |
rotates the tensor data given a rank two tensor rotation tensor _vals[i][j] = R_ij * R_jl * _vals[k][l]
R | rotation matrix as a TypeTensor |
Definition at line 257 of file SymmetricRankTwoTensorImplementation.h.
libMesh::VectorValue< T > SymmetricRankTwoTensorTempl< T >::row | ( | const unsigned int | n | ) | const |
get the specified row of the tensor
multiply vector v with row n of this tensor
Definition at line 273 of file SymmetricRankTwoTensorImplementation.h.
Referenced by SymmetricRankTwoTensorTempl< Real >::column().
T SymmetricRankTwoTensorTempl< T >::secondInvariant | ( | ) | const |
Denote the _vals[i][j] by A_ij, then S_ij = A_ij - de_ij*tr(A)/3 Then this returns (S_ij + S_ji)*(S_ij + S_ji)/8 Note the explicit symmeterisation.
Definition at line 480 of file SymmetricRankTwoTensorImplementation.h.
|
static |
SymmetricRankTwoTensorTempl<T> from outer product of a vector with itself.
Definition at line 726 of file SymmetricRankTwoTensorImplementation.h.
Referenced by SymmetricRankTwoTensorTempl< Real >::positiveProjectionEigenDecomposition().
void SymmetricRankTwoTensorTempl< T >::setToIdentity | ( | ) |
set the tensor to the identity matrix
Definition at line 745 of file SymmetricRankTwoTensorImplementation.h.
T SymmetricRankTwoTensorTempl< T >::sin3Lode | ( | const T & | r0, |
const T & | r0_value | ||
) | const |
Sin(3*Lode_angle) If secondInvariant() <= r0 then return r0_value This is to gaurd against precision-loss errors.
Note that sin(3*Lode_angle) is not defined for secondInvariant() = 0
Definition at line 649 of file SymmetricRankTwoTensor.h.
SymmetricRankTwoTensorTempl< T > SymmetricRankTwoTensorTempl< T >::square | ( | ) | const |
Returns the matrix squared.
Definition at line 356 of file SymmetricRankTwoTensorImplementation.h.
void SymmetricRankTwoTensorTempl< T >::surfaceFillFromInputVector | ( | const std::vector< T > & | input | ) |
sets _vals[0][0], _vals[0][1], _vals[1][0], _vals[1][1] to input, and the remainder to zero
|
protected |
Uses the petscblaslapack.h LAPACKsyev_ routine to find, for symmetric _vals: (1) the eigenvalues (if calculation_type == "N") (2) the eigenvalues and eigenvectors (if calculation_type == "V")
calculation_type | If "N" then calculation eigenvalues only |
eigvals | Eigenvalues are placed in this array, in ascending order |
a | Eigenvectors are placed in this array if calculation_type == "V". See code in dsymmetricEigenvalues for extracting eigenvectors from the a output. |
Definition at line 675 of file SymmetricRankTwoTensorImplementation.h.
void SymmetricRankTwoTensorTempl< T >::symmetricEigenvalues | ( | std::vector< T > & | eigvals | ) | const |
computes eigenvalues, assuming tens is symmetric, and places them in ascending order in eigvals
Definition at line 687 of file SymmetricRankTwoTensorImplementation.h.
void SymmetricRankTwoTensorTempl< T >::symmetricEigenvaluesEigenvectors | ( | std::vector< T > & | eigvals, |
RankTwoTensorTempl< T > & | eigvecs | ||
) | const |
computes eigenvalues and eigenvectors, assuming tens is symmetric, and places them in ascending order in eigvals.
eigvecs is a matrix with the first column being the first eigenvector, the second column being the second, etc.
Definition at line 698 of file SymmetricRankTwoTensorImplementation.h.
T SymmetricRankTwoTensorTempl< T >::thirdInvariant | ( | ) | const |
Denote the _vals[i][j] by A_ij, then S_ij = A_ij - de_ij*tr(A)/3 Then this returns det(S + S.transpose())/2 Note the explicit symmeterisation.
Definition at line 545 of file SymmetricRankTwoTensorImplementation.h.
|
static |
return the matrix multiplied with its transpose A*A^T (guaranteed symmetric)
Definition at line 293 of file SymmetricRankTwoTensorImplementation.h.
Referenced by SymmetricRankTwoTensorTempl< Real >::square().
|
static |
Definition at line 305 of file SymmetricRankTwoTensorImplementation.h.
|
inline |
T SymmetricRankTwoTensorTempl< T >::trace | ( | ) | const |
returns the trace of the tensor, ie _vals[i][i] (sum i = 0, 1, 2)
Definition at line 514 of file SymmetricRankTwoTensorImplementation.h.
SymmetricRankTwoTensorTempl< T > SymmetricRankTwoTensorTempl< T >::transpose | ( | ) | const |
Returns a matrix that is the transpose of the matrix this was called on.
This is a non-operation.
Definition at line 265 of file SymmetricRankTwoTensorImplementation.h.
|
static |
return the matrix multiplied with its transpose A^T*A (guaranteed symmetric)
Definition at line 321 of file SymmetricRankTwoTensorImplementation.h.
|
static |
Definition at line 333 of file SymmetricRankTwoTensorImplementation.h.
void SymmetricRankTwoTensorTempl< T >::zero | ( | ) |
Set all components to zero.
Definition at line 363 of file SymmetricRankTwoTensorImplementation.h.
Referenced by SymmetricRankTwoTensorTempl< Real >::operator=().
|
friend |
|
friend |
|
friend |
Definition at line 422 of file SymmetricRankTwoTensor.h.
Definition at line 500 of file SymmetricRankTwoTensor.h.
|
private |
Definition at line 492 of file SymmetricRankTwoTensor.h.
Referenced by dataLoad(), dataStore(), SymmetricRankTwoTensorTempl< Real >::doubleContraction(), SymmetricRankTwoTensorTempl< Real >::fromRawComponents(), SymmetricRankTwoTensorTempl< Real >::operator!=(), SymmetricRankTwoTensorTempl< Real >::operator()(), SymmetricRankFourTensorTempl< T >::operator*(), SymmetricRankTwoTensorTempl< Real >::operator*(), SymmetricRankTwoTensorTempl< Real >::operator+=(), SymmetricRankTwoTensorTempl< Real >::operator-=(), SymmetricRankTwoTensorTempl< Real >::operator/(), SymmetricRankTwoTensorTempl< Real >::operator==(), SymmetricRankTwoTensorTempl< Real >::outerProduct(), SymmetricRankTwoTensorTempl< Real >::SymmetricRankTwoTensorTempl(), SymmetricRankTwoTensorTempl< Real >::timesTranspose(), and SymmetricRankTwoTensorTempl< Real >::tr().
|
static |
Definition at line 87 of file SymmetricRankTwoTensor.h.
|
staticprivate |
Definition at line 489 of file SymmetricRankTwoTensor.h.
|
static |
Definition at line 83 of file SymmetricRankTwoTensor.h.
Referenced by SymmetricRankTwoTensorTempl< Real >::SymmetricRankTwoTensorTempl().
|
static |
tensor dimension and Mandel vector length
Definition at line 82 of file SymmetricRankTwoTensor.h.
Referenced by SymmetricRankTwoTensorTempl< Real >::mandelFactor().
|
static |
Definition at line 90 of file SymmetricRankTwoTensor.h.
Referenced by SymmetricRankTwoTensorTempl< Real >::operator()().