https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
SymmetricRankFourTensorTempl< T > Class Template Reference

SymmetricRankFourTensorTempl is designed to handle an N-dimensional fourth order tensor with minor symmetry, C. More...

#include <SymmetricRankFourTensor.h>

Classes

struct  TwoTensorMultTraits
 
struct  TwoTensorMultTraits< SymmetricRankTwoTensorTempl, Scalar >
 
struct  TwoTensorMultTraits< TensorValue, Scalar >
 
struct  TwoTensorMultTraits< TypeTensor, Scalar >
 

Public Types

enum  InitMethod { initNone , initIdentity , initIdentitySymmetricFour }
 Initialization method. More...
 
enum  FillMethod {
  symmetric9 , symmetric21 , symmetric_isotropic , symmetric_isotropic_E_nu ,
  axisymmetric_rz , principal , orthotropic
}
 To fill up the 36 entries in the 4th-order tensor, fillFromInputVector is called with one of the following fill_methods. More...
 

Public Member Functions

 SymmetricRankFourTensorTempl ()
 Default constructor; fills to zero.
 
 SymmetricRankFourTensorTempl (const InitMethod)
 Select specific initialization pattern.
 
 SymmetricRankFourTensorTempl (const std::vector< T > &, FillMethod)
 Fill from vector.
 
 SymmetricRankFourTensorTempl (const SymmetricRankFourTensorTempl< T > &a)=default
 Copy assignment operator must be defined if used.
 
template<typename T2 >
 SymmetricRankFourTensorTempl (const SymmetricRankFourTensorTempl< T2 > &copy)
 Copy constructor.
 
 SymmetricRankFourTensorTempl (const RankFourTensorTempl< T > &a)
 Copy constructor from RankFourTensorTempl<T>
 
 operator RankFourTensorTempl< T > ()
 The conversion operator to RankFourTensorTempl
 
T & operator() (unsigned int i, unsigned int j)
 Gets the value for the indices specified. Takes indices ranging from 0-5 for i and j.
 
const T & operator() (unsigned int i, unsigned int j) const
 Gets the value for the indices specified.
 
void zero ()
 Zeros out the tensor.
 
void print (std::ostream &stm=Moose::out) const
 Print the rank four tensor.
 
void printReal (std::ostream &stm=Moose::out) const
 Print the values of the rank four tensor.
 
SymmetricRankFourTensorTempl< T > & operator= (const SymmetricRankFourTensorTempl< T > &a)=default
 copies values from a into this tensor
 
template<typename Scalar >
std::enable_if< libMesh::ScalarTraits< Scalar >::value, SymmetricRankFourTensorTempl & >::type operator= (const Scalar &libmesh_dbg_var(p))
 Assignment-from-scalar operator.
 
template<typename T2 >
auto operator* (const SymmetricRankTwoTensorTempl< T2 > &b) const -> SymmetricRankTwoTensorTempl< decltype(T() *T2())>
 C_ijkl*a_kl.
 
template<typename T2 >
auto operator* (const T2 &a) const -> typename std::enable_if< libMesh::ScalarTraits< T2 >::value, SymmetricRankFourTensorTempl< decltype(T() *T2())> >::type
 C_ijkl*a.
 
SymmetricRankFourTensorTempl< T > & operator*= (const T &a)
 C_ijkl *= a.
 
template<typename T2 >
auto operator/ (const T2 &a) const -> typename std::enable_if< libMesh::ScalarTraits< T2 >::value, SymmetricRankFourTensorTempl< decltype(T()/T2())> >::type
 C_ijkl/a.
 
SymmetricRankFourTensorTempl< T > & operator/= (const T &a)
 C_ijkl /= a for all i, j, k, l.
 
SymmetricRankFourTensorTempl< T > & operator+= (const SymmetricRankFourTensorTempl< T > &a)
 C_ijkl += a_ijkl for all i, j, k, l.
 
template<typename T2 >
auto operator+ (const SymmetricRankFourTensorTempl< T2 > &a) const -> SymmetricRankFourTensorTempl< decltype(T()+T2())>
 C_ijkl + a_ijkl.
 
SymmetricRankFourTensorTempl< T > & operator-= (const SymmetricRankFourTensorTempl< T > &a)
 C_ijkl -= a_ijkl.
 
template<typename T2 >
auto operator- (const SymmetricRankFourTensorTempl< T2 > &a) const -> SymmetricRankFourTensorTempl< decltype(T() - T2())>
 C_ijkl - a_ijkl.
 
SymmetricRankFourTensorTempl< T > operator- () const
 -C_ijkl
 
template<typename T2 >
auto operator* (const SymmetricRankFourTensorTempl< T2 > &a) const -> SymmetricRankFourTensorTempl< decltype(T() *T2())>
 C_ijpq*a_pqkl.
 
L2norm () const
 sqrt(C_ijkl*C_ijkl)
 
SymmetricRankFourTensorTempl< 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 that C_ijkl = C_jikl = C_ijlk.
 
void rotate (const TypeTensor< T > &R)
 Rotate the tensor using C_ijkl = R_im R_jn R_ko R_lp C_mnop.
 
SymmetricRankFourTensorTempl< T > transposeMajor () const
 Transpose the tensor by swapping the first pair with the second pair of indices This amounts to a regular transpose of the 6x6 matrix.
 
SymmetricRankFourTensorTempl< T > transposeIj () const
 Transpose the tensor by swapping the first two indices - a no-op.
 
void fillFromInputVector (const std::vector< T > &input, FillMethod fill_method)
 fillFromInputVector takes some number of inputs to fill the Rank-4 tensor.
 
template<typename T2 >
void fillSymmetric9FromInputVector (const T2 &input)
 fillSymmetric9FromInputVector takes 9 inputs to fill in the Rank-4 tensor with the appropriate crystal symmetries maintained.
 
template<typename T2 >
void fillSymmetric21FromInputVector (const T2 &input)
 fillSymmetric21FromInputVector takes 21 inputs to fill in the Rank-4 tensor with the appropriate crystal symmetries maintained.
 
sum3x3 () const
 Calculates the sum of Ciijj for i and j varying from 0 to 2.
 
libMesh::VectorValue< T > sum3x1 () const
 Calculates the vector a[i] = sum over j Ciijj for i and j varying from 0 to 2.
 
bool isSymmetric () const
 checks if the tensor is symmetric
 
bool isIsotropic () const
 checks if the tensor is isotropic
 
void fillSymmetricIsotropic (const T &i0, const T &i1)
 Vector-less fill API functions. See docs of the corresponding ...FromInputVector methods.
 
void fillSymmetricIsotropicEandNu (const T &E, const T &nu)
 

Static Public Member Functions

static constexpr Real mandelFactor (unsigned int i, unsigned int j)
 returns the 1, sqrt(2), or 2 prefactor in the Mandel notation for the indices i,j ranging from 0-5.
 
static SymmetricRankFourTensorTempl< T > identity ()
 
static SymmetricRankFourTensorTempl< T > identitySymmetricFour ()
 
static SymmetricRankFourTensorTempl< T > rotationMatrix (const TypeTensor< T > &R)
 Build a 6x6 rotation matrix MEHRABADI, MORTEZA M.; COWIN, STEPHEN C.
 
static MooseEnum fillMethodEnum ()
 Static method for use in validParams for getting the "fill_method".
 

Static Public Attributes

static constexpr unsigned int full_index [6][6][4]
 
static constexpr unsigned int Ndim = LIBMESH_DIM
 tensor dimension, Mandel matrix dimension, and Mandel matrix size
 
static constexpr unsigned int N = Ndim + Ndim * (Ndim - 1) / 2
 
static constexpr unsigned int N2 = N * N
 

Protected Member Functions

void fillSymmetricIsotropicFromInputVector (const std::vector< T > &input)
 fillSymmetricIsotropicFromInputVector takes 2 inputs to fill the the symmetric Rank-4 tensor with the appropriate symmetries maintained.
 
void fillSymmetricIsotropicEandNuFromInputVector (const std::vector< T > &input)
 fillSymmetricIsotropicEandNuFromInputVector is a variation of the fillSymmetricIsotropicFromInputVector which takes as inputs the more commonly used Young's modulus (E) and Poisson's ratio (nu) constants to fill the isotropic elasticity tensor.
 
void fillAxisymmetricRZFromInputVector (const std::vector< T > &input)
 fillAxisymmetricRZFromInputVector takes 5 inputs to fill the axisymmetric Rank-4 tensor with the appropriate symmetries maintatined for use with axisymmetric problems using coord_type = RZ.
 
void fillPrincipalFromInputVector (const std::vector< T > &input)
 fillPrincipalFromInputVector takes 9 inputs to fill a Rank-4 tensor C1111 = input0 C1122 = input1 C1133 = input2 C2211 = input3 C2222 = input4 C2233 = input5 C3311 = input6 C3322 = input7 C3333 = input8 with all other components being zero
 
void fillGeneralOrthotropicFromInputVector (const std::vector< T > &input)
 fillGeneralOrhotropicFromInputVector takes 10 inputs to fill the Rank-4 tensor It defines a general orthotropic tensor for which some constraints among elastic parameters exist
 

Protected Attributes

std::array< T, N2_vals
 The values of the rank-four tensor.
 

Friends

template<typename T2 >
class SymmetricRankTwoTensorTempl
 
template<typename T2 >
class SymmetricRankFourTensorTempl
 
template<typename T2 >
class RankThreeTensorTempl
 
std::ostream & operator<< (std::ostream &os, const SymmetricRankFourTensorTempl< T > &t)
 
template<class T2 >
void dataStore (std::ostream &, SymmetricRankFourTensorTempl< T2 > &, void *)
 
template<class T2 >
void dataLoad (std::istream &, SymmetricRankFourTensorTempl< T2 > &, void *)
 

Detailed Description

template<typename T>
class SymmetricRankFourTensorTempl< T >

SymmetricRankFourTensorTempl is designed to handle an N-dimensional fourth order tensor with minor symmetry, C.

Since N is hard-coded to 3, SymmetricRankFourTensorTempl holds 36 separate C_ij entries. Within the code i,j = 0, .., 5.

Definition at line 67 of file SymmetricRankFourTensor.h.

Member Enumeration Documentation

◆ FillMethod

template<typename T >
enum SymmetricRankFourTensorTempl::FillMethod

To fill up the 36 entries in the 4th-order tensor, fillFromInputVector is called with one of the following fill_methods.

See the fill*FromInputVector functions for more details

Enumerator
symmetric9 
symmetric21 
symmetric_isotropic 
symmetric_isotropic_E_nu 
axisymmetric_rz 
principal 
orthotropic 

Definition at line 105 of file SymmetricRankFourTensor.h.

106 {
107 symmetric9, // fillSymmetric9FromInputVector
108 symmetric21, // fillSymmetric21FromInputVector
109 symmetric_isotropic, // fillSymmetricIsotropicFromInputVector
110 symmetric_isotropic_E_nu, // fillSymmetricIsotropicEandNu
111 axisymmetric_rz, // fillAxisymmetricRZFromInputVector
112 principal, // fillPrincipalFromInputVector
113 orthotropic // fillGeneralOrthotropicFromInputVector
114 };

◆ InitMethod

template<typename T >
enum SymmetricRankFourTensorTempl::InitMethod

Initialization method.

Enumerator
initNone 
initIdentity 
initIdentitySymmetricFour 

Definition at line 93 of file SymmetricRankFourTensor.h.

Constructor & Destructor Documentation

◆ SymmetricRankFourTensorTempl() [1/6]

Default constructor; fills to zero.

Definition at line 48 of file SymmetricRankFourTensorImplementation.h.

49{
50 mooseAssert(Ndim == 3,
51 "SymmetricRankFourTensorTempl<T> is designed to only work in 3 dimensions.");
52 zero();
53}
static constexpr unsigned int Ndim
tensor dimension, Mandel matrix dimension, and Mandel matrix size

◆ SymmetricRankFourTensorTempl() [2/6]

template<typename T >
SymmetricRankFourTensorTempl< T >::SymmetricRankFourTensorTempl ( const InitMethod  init)

Select specific initialization pattern.

Definition at line 56 of file SymmetricRankFourTensorImplementation.h.

57{
58 switch (init)
59 {
60 case initNone:
61 break;
62
63 case initIdentity:
64 zero();
65 for (const auto i : make_range(Ndim))
66 (*this)(i, i) = 1.0;
67 break;
68
70 zero();
71 for (const auto i : make_range(N))
72 (*this)(i, i) = 1.0;
73 break;
74
75 default:
76 mooseError("Unknown SymmetricRankFourTensorTempl<T> initialization pattern.");
77 }
78}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
static constexpr unsigned int N
IntRange< T > make_range(T beg, T end)

◆ SymmetricRankFourTensorTempl() [3/6]

template<typename T >
SymmetricRankFourTensorTempl< T >::SymmetricRankFourTensorTempl ( const std::vector< T > &  input,
FillMethod  fill_method 
)

Fill from vector.

Definition at line 120 of file SymmetricRankFourTensorImplementation.h.

122{
123 fillFromInputVector(input, fill_method);
124}
void fillFromInputVector(const std::vector< T > &input, FillMethod fill_method)
fillFromInputVector takes some number of inputs to fill the Rank-4 tensor.

◆ SymmetricRankFourTensorTempl() [4/6]

template<typename T >
SymmetricRankFourTensorTempl< T >::SymmetricRankFourTensorTempl ( const SymmetricRankFourTensorTempl< T > &  a)
default

Copy assignment operator must be defined if used.

◆ SymmetricRankFourTensorTempl() [5/6]

template<typename T >
template<typename T2 >
SymmetricRankFourTensorTempl< T >::SymmetricRankFourTensorTempl ( const SymmetricRankFourTensorTempl< T2 > &  copy)

Copy constructor.

Definition at line 448 of file SymmetricRankFourTensor.h.

450{
451 for (const auto i : make_range(N2))
452 _vals[i] = copy._vals[i];
453}
std::array< T, N2 > _vals
The values of the rank-four tensor.
static constexpr unsigned int N2

◆ SymmetricRankFourTensorTempl() [6/6]

template<typename T >
SymmetricRankFourTensorTempl< T >::SymmetricRankFourTensorTempl ( const RankFourTensorTempl< T > &  a)
explicit

Copy constructor from RankFourTensorTempl<T>

Definition at line 81 of file SymmetricRankFourTensorImplementation.h.

82{
83 for (const auto a : make_range(N))
84 for (const auto b : make_range(N))
85 {
86 const auto & idx = full_index[a][b];
87 auto i = idx[0];
88 auto j = idx[1];
89 auto k = idx[2];
90 auto l = idx[3];
91 (*this)(a, b) =
92 (t(i, j, k, l) + t(j, i, l, k) + t(j, i, k, l) + t(i, j, l, k)) / 4 * mandelFactor(a, b);
93 }
94}
for(PetscInt i=0;i< nvars;++i)
static constexpr unsigned int full_index[6][6][4]
static constexpr Real mandelFactor(unsigned int i, unsigned int j)
returns the 1, sqrt(2), or 2 prefactor in the Mandel notation for the indices i,j ranging from 0-5.
unsigned int idx(const ElemType type, const unsigned int nx, const unsigned int i, const unsigned int j)

Member Function Documentation

◆ fillAxisymmetricRZFromInputVector()

template<typename T >
void SymmetricRankFourTensorTempl< T >::fillAxisymmetricRZFromInputVector ( const std::vector< T > &  input)
protected

fillAxisymmetricRZFromInputVector takes 5 inputs to fill the axisymmetric Rank-4 tensor with the appropriate symmetries maintatined for use with axisymmetric problems using coord_type = RZ.

I.e. C1111 = C2222, C1133 = C2233, C2323 = C3131 and C1212 = 0.5*(C1111-C1122)

Parameters
inputthis is C1111, C1122, C1133, C3333, C2323.

Definition at line 383 of file SymmetricRankFourTensorImplementation.h.

384{
385 mooseAssert(input.size() == 5,
386 "To use fillAxisymmetricRZFromInputVector, your input must have size 5.");
387
388 // C1111 C1122 C1133 0 0 0
389 // C2222 C2233=C1133 0 0 0
390 // C3333 0 0 0
391 // C2323 0 0
392 // C3131=C2323 0
393 // C1212
394 // clang-format off
395 fillSymmetric21FromInputVector(std::array<T,21>
396 {{input[0],input[1],input[2], 0.0, 0.0, 0.0,
397 input[0],input[2], 0.0, 0.0, 0.0,
398 input[3], 0.0, 0.0, 0.0,
399 input[4], 0.0, 0.0,
400 input[4], 0.0,
401 (input[0] - input[1]) * 0.5}});
402 // clang-format on
403}
void fillSymmetric21FromInputVector(const T2 &input)
fillSymmetric21FromInputVector takes 21 inputs to fill in the Rank-4 tensor with the appropriate crys...

◆ fillFromInputVector()

template<typename T >
void SymmetricRankFourTensorTempl< T >::fillFromInputVector ( const std::vector< T > &  input,
FillMethod  fill_method 
)

fillFromInputVector takes some number of inputs to fill the Rank-4 tensor.

Parameters
inputthe numbers that will be placed in the tensor
fill_methodSee FillMethod

Definition at line 300 of file SymmetricRankFourTensorImplementation.h.

302{
303
304 switch (fill_method)
305 {
306 case symmetric9:
308 break;
309 case symmetric21:
311 break;
314 break;
317 break;
318 case axisymmetric_rz:
320 break;
321 case principal:
323 break;
324 case orthotropic:
326 break;
327 default:
328 mooseError("fillFromInputVector called with unknown fill_method of ", fill_method);
329 }
330}
void fillSymmetricIsotropicFromInputVector(const std::vector< T > &input)
fillSymmetricIsotropicFromInputVector takes 2 inputs to fill the the symmetric Rank-4 tensor with the...
void fillAxisymmetricRZFromInputVector(const std::vector< T > &input)
fillAxisymmetricRZFromInputVector takes 5 inputs to fill the axisymmetric Rank-4 tensor with the appr...
void fillGeneralOrthotropicFromInputVector(const std::vector< T > &input)
fillGeneralOrhotropicFromInputVector takes 10 inputs to fill the Rank-4 tensor It defines a general o...
void fillSymmetric9FromInputVector(const T2 &input)
fillSymmetric9FromInputVector takes 9 inputs to fill in the Rank-4 tensor with the appropriate crysta...
void fillPrincipalFromInputVector(const std::vector< T > &input)
fillPrincipalFromInputVector takes 9 inputs to fill a Rank-4 tensor C1111 = input0 C1122 = input1 C11...
void fillSymmetricIsotropicEandNuFromInputVector(const std::vector< T > &input)
fillSymmetricIsotropicEandNuFromInputVector is a variation of the fillSymmetricIsotropicFromInputVect...

◆ fillGeneralOrthotropicFromInputVector()

template<typename T >
void SymmetricRankFourTensorTempl< T >::fillGeneralOrthotropicFromInputVector ( const std::vector< T > &  input)
protected

fillGeneralOrhotropicFromInputVector takes 10 inputs to fill the Rank-4 tensor It defines a general orthotropic tensor for which some constraints among elastic parameters exist

Parameters
inputEa, Eb, Ec, Gab, Gbc, Gca, nuba, nuca, nucb, nuab, nuac, nubc

Definition at line 429 of file SymmetricRankFourTensorImplementation.h.

430{
431 mooseAssert(LIBMESH_DIM == 3, "This method assumes LIBMESH_DIM == 3");
432 if (input.size() != 12)
433 mooseError("To use fillGeneralOrhotropicFromInputVector, your input must have size 12. Yours "
434 "has size ",
435 input.size());
436
437 const T & Ea = input[0];
438 const T & Eb = input[1];
439 const T & Ec = input[2];
440 const T & Gab = input[3];
441 const T & Gbc = input[4];
442 const T & Gca = input[5];
443 const T & nuba = input[6];
444 const T & nuca = input[7];
445 const T & nucb = input[8];
446 const T & nuab = input[9];
447 const T & nuac = input[10];
448 const T & nubc = input[11];
449
450 // Input must satisfy constraints.
451 bool preserve_symmetry = MooseUtils::relativeFuzzyEqual(nuab * Eb, nuba * Ea) &&
452 MooseUtils::relativeFuzzyEqual(nuca * Ea, nuac * Ec) &&
453 MooseUtils::relativeFuzzyEqual(nubc * Ec, nucb * Eb);
454
455 if (!preserve_symmetry)
456 mooseError("Orthotropic elasticity tensor input is not consistent with symmetry requirements. "
457 "Check input for accuracy");
458
459 zero();
460 T k = 1 - nuab * nuba - nubc * nucb - nuca * nuac - nuab * nubc * nuca - nuba * nucb * nuac;
461
462 bool is_positive_definite =
463 (k > 0) && (1 - nubc * nucb) > 0 && (1 - nuac * nuca) > 0 && (1 - nuab * nuba) > 0;
464 if (!is_positive_definite)
465 mooseError("Orthotropic elasticity tensor input is not positive definite. Check input for "
466 "accuracy");
467
468 _vals[0] = Ea * (1 - nubc * nucb) / k;
469 _vals[1] = Ea * (nubc * nuca + nuba) / k;
470 _vals[2] = Ea * (nuba * nucb + nuca) / k;
471
472 _vals[6] = Eb * (nuac * nucb + nuab) / k;
473 _vals[7] = Eb * (1 - nuac * nuca) / k;
474 _vals[8] = Eb * (nuab * nuca + nucb) / k;
475
476 _vals[12] = Ec * (nuab * nubc + nuac) / k;
477 _vals[13] = Ec * (nuac * nuba + nubc) / k;
478 _vals[14] = Ec * (1 - nuab * nuba) / k;
479
480 _vals[21] = 2 * Gbc;
481 _vals[28] = 2 * Gca;
482 _vals[35] = 2 * Gab;
483}

◆ fillMethodEnum()

template<typename T >
MooseEnum SymmetricRankFourTensorTempl< T >::fillMethodEnum ( )
static

Static method for use in validParams for getting the "fill_method".

Definition at line 41 of file SymmetricRankFourTensorImplementation.h.

42{
43 return MooseEnum("symmetric9 symmetric21 symmetric_isotropic symmetric_isotropic_E_nu "
44 "axisymmetric_rz principal orthotropic");
45}
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition MooseEnum.h:55

◆ fillPrincipalFromInputVector()

template<typename T >
void SymmetricRankFourTensorTempl< T >::fillPrincipalFromInputVector ( const std::vector< T > &  input)
protected

fillPrincipalFromInputVector takes 9 inputs to fill a Rank-4 tensor C1111 = input0 C1122 = input1 C1133 = input2 C2211 = input3 C2222 = input4 C2233 = input5 C3311 = input6 C3322 = input7 C3333 = input8 with all other components being zero

Definition at line 407 of file SymmetricRankFourTensorImplementation.h.

408{
409 if (input.size() != 9)
410 mooseError("To use fillPrincipalFromInputVector, your input must have size 9. Yours has size ",
411 input.size());
412
413 zero();
414
415 // top left block
416 _vals[0] = input[0];
417 _vals[1] = input[1];
418 _vals[2] = input[2];
419 _vals[6] = input[3];
420 _vals[7] = input[4];
421 _vals[8] = input[5];
422 _vals[12] = input[6];
423 _vals[13] = input[7];
424 _vals[14] = input[8];
425}

◆ fillSymmetric21FromInputVector()

template<typename T >
template<typename T2 >
void SymmetricRankFourTensorTempl< T >::fillSymmetric21FromInputVector ( const T2 &  input)

fillSymmetric21FromInputVector takes 21 inputs to fill in the Rank-4 tensor with the appropriate crystal symmetries maintained.

I.e., C_ijkl = C_klij, C_ijkl = C_ijlk, C_ijkl = C_jikl

Parameters
inputis C1111 C1122 C1133 C1123 C1113 C1112 C2222 C2233 C2223 C2213 C2212 C3333 C3323 C3313 C3312 C2323 C2313 C2312 C1313 C1312 C1212

Definition at line 535 of file SymmetricRankFourTensor.h.

536{
537 // C1111 C1122 C1133 C1123 C1113 C1112
538 // C2222 C2233 C2223 C2213 C2212
539 // C3333 C3323 C3313 C3312
540 // C2323 C2313 C2312
541 // C1313 C1312
542 // C1212
543
544 mooseAssert(LIBMESH_DIM == 3, "This method assumes LIBMESH_DIM == 3");
545 mooseAssert(input.size() == 21,
546 "To use fillSymmetric21FromInputVector, your input must have size 21.");
547 std::size_t index = 0;
548 for (const auto i : make_range(N))
549 for (const auto j : make_range(i, N))
550 {
551 _vals[i + N * j] = mandelFactor(i, j) * input[index];
552 _vals[j + N * i] = mandelFactor(j, i) * input[index];
553 index++;
554 }
555}

◆ fillSymmetric9FromInputVector()

template<typename T >
template<typename T2 >
void SymmetricRankFourTensorTempl< T >::fillSymmetric9FromInputVector ( const T2 &  input)

fillSymmetric9FromInputVector takes 9 inputs to fill in the Rank-4 tensor with the appropriate crystal symmetries maintained.

I.e., C_ijkl = C_klij, C_ijkl = C_ijlk, C_ijkl = C_jikl

Parameters
inputis: C1111 C1122 C1133 C2222 C2233 C3333 C2323 C1313 C1212 In the isotropic case this is (la is first Lame constant, mu is second (shear) Lame constant) la+2mu la la la+2mu la la+2mu mu mu mu

Definition at line 508 of file SymmetricRankFourTensor.h.

509{
510 mooseAssert(LIBMESH_DIM == 3, "This method assumes LIBMESH_DIM == 3");
511 mooseAssert(input.size() == 9,
512 "To use fillSymmetric9FromInputVector, your input must have size 9.");
513 zero();
514
515 _vals[0] = input[0]; // C1111
516 _vals[7] = input[3]; // C2222
517 _vals[14] = input[5]; // C3333
518
519 _vals[1] = _vals[6] = input[1]; // C1122
520 _vals[2] = _vals[12] = input[2]; // C1133
521 _vals[8] = _vals[13] = input[4]; // C2233
522
523 static constexpr std::size_t C2323 = 21;
524 static constexpr std::size_t C1313 = 28;
525 static constexpr std::size_t C1212 = 35;
526
527 _vals[C2323] = 2.0 * input[6];
528 _vals[C1313] = 2.0 * input[7];
529 _vals[C1212] = 2.0 * input[8];
530}

◆ fillSymmetricIsotropic()

template<typename T >
void SymmetricRankFourTensorTempl< T >::fillSymmetricIsotropic ( const T &  i0,
const T &  i1 
)

Vector-less fill API functions. See docs of the corresponding ...FromInputVector methods.

Definition at line 343 of file SymmetricRankFourTensorImplementation.h.

344{
345 // clang-format off
346 fillSymmetric21FromInputVector(std::array<T,21>
347 {{lambda + 2.0 * G, lambda, lambda, 0.0, 0.0, 0.0,
348 lambda + 2.0 * G, lambda, 0.0, 0.0, 0.0,
349 lambda + 2.0 * G, 0.0, 0.0, 0.0,
350 G, 0.0, 0.0,
351 G, 0.0,
352 G}});
353 // clang-format on
354}

◆ fillSymmetricIsotropicEandNu()

template<typename T >
void SymmetricRankFourTensorTempl< T >::fillSymmetricIsotropicEandNu ( const T &  E,
const T &  nu 
)

Definition at line 372 of file SymmetricRankFourTensorImplementation.h.

373{
374 // Calculate lambda and the shear modulus from the given young's modulus and poisson's ratio
375 const T & lambda = E * nu / ((1.0 + nu) * (1.0 - 2.0 * nu));
376 const T & G = E / (2.0 * (1.0 + nu));
377
378 fillSymmetricIsotropic(lambda, G);
379}
void fillSymmetricIsotropic(const T &i0, const T &i1)
Vector-less fill API functions. See docs of the corresponding ...FromInputVector methods.

◆ fillSymmetricIsotropicEandNuFromInputVector()

template<typename T >
void SymmetricRankFourTensorTempl< T >::fillSymmetricIsotropicEandNuFromInputVector ( const std::vector< T > &  input)
protected

fillSymmetricIsotropicEandNuFromInputVector is a variation of the fillSymmetricIsotropicFromInputVector which takes as inputs the more commonly used Young's modulus (E) and Poisson's ratio (nu) constants to fill the isotropic elasticity tensor.

Using well-known formulas, E and nu are used to calculate lambda and mu and then the vector is passed to fillSymmetricIsotropicFromInputVector.

Parameters
inputYoung's modulus (E) and Poisson's ratio (nu)

Definition at line 358 of file SymmetricRankFourTensorImplementation.h.

360{
361 if (input.size() != 2)
363 "To use fillSymmetricIsotropicEandNuFromInputVector, your input must have size 2. Yours "
364 "has size ",
365 input.size());
366
367 fillSymmetricIsotropicEandNu(input[0], input[1]);
368}
void fillSymmetricIsotropicEandNu(const T &E, const T &nu)

◆ fillSymmetricIsotropicFromInputVector()

template<typename T >
void SymmetricRankFourTensorTempl< T >::fillSymmetricIsotropicFromInputVector ( const std::vector< T > &  input)
protected

fillSymmetricIsotropicFromInputVector takes 2 inputs to fill the the symmetric Rank-4 tensor with the appropriate symmetries maintained.

C_ijkl = lambda*de_ij*de_kl + mu*(de_ik*de_jl + de_il*de_jk) where lambda is the first Lame modulus, mu is the second (shear) Lame modulus,

Parameters
inputthis is lambda and mu in the above formula

Definition at line 334 of file SymmetricRankFourTensorImplementation.h.

335{
336 mooseAssert(input.size() == 2,
337 "To use fillSymmetricIsotropicFromInputVector, your input must have size 2.");
338 fillSymmetricIsotropic(input[0], input[1]);
339}

◆ identity()

template<typename T >
static SymmetricRankFourTensorTempl< T > SymmetricRankFourTensorTempl< T >::identity ( )
inlinestatic

Definition at line 162 of file SymmetricRankFourTensor.h.

163 {
165 }
SymmetricRankFourTensorTempl is designed to handle an N-dimensional fourth order tensor with minor sy...

◆ identitySymmetricFour()

template<typename T >
static SymmetricRankFourTensorTempl< T > SymmetricRankFourTensorTempl< T >::identitySymmetricFour ( )
inlinestatic

Definition at line 166 of file SymmetricRankFourTensor.h.

◆ invSymm()

template<typename T >
SymmetricRankFourTensorTempl< T > SymmetricRankFourTensorTempl< 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 that C_ijkl = C_jikl = C_ijlk.

Definition at line 559 of file SymmetricRankFourTensor.h.

560{
562
563 if constexpr (SymmetricRankFourTensorTempl<T>::N2 * sizeof(T) > EIGEN_STACK_ALLOCATION_LIMIT)
564 {
565 Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic> mat(N, N);
566 for (const auto i : make_range(N))
567 for (const auto j : make_range(N))
568 mat(i, j) = (*this)(i, j);
569 mat = mat.inverse();
570 for (const auto i : make_range(N))
571 for (const auto j : make_range(N))
572 result(i, j) = mat(i, j);
573 }
574 else
575 {
576 const Eigen::Map<const Eigen::Matrix<T, N, N, Eigen::RowMajor>> mat(&_vals[0]);
577 Eigen::Map<Eigen::Matrix<T, N, N, Eigen::RowMajor>> res(&result._vals[0]);
578 res = mat.inverse();
579 }
580
581 return result;
582}

◆ isIsotropic()

template<typename T >
bool SymmetricRankFourTensorTempl< T >::isIsotropic ( ) const

checks if the tensor is isotropic

Definition at line 523 of file SymmetricRankFourTensorImplementation.h.

524{
525 // prerequisite is symmetry
526 if (!isSymmetric())
527 return false;
528
529 // inspect shear components
530 const T & mu = _vals[35];
531
532 // ...diagonal
533 if (_vals[28] != mu || _vals[21] != mu)
534 return false;
535
536 // ...off-diagonal
537 if (_vals[22] != 0.0 || _vals[23] != 0.0 || _vals[29] != 0.0)
538 return false;
539
540 // off diagonal blocks in Voigt
541 for (const auto i : make_range(3))
542 for (const auto j : make_range(3))
543 if (_vals[3 + i + N * j] != 0.0)
544 return false;
545
546 // top left block
547 const T & K1 = _vals[0];
548 const T & K2 = _vals[1];
549 if (!MooseUtils::relativeFuzzyEqual(K1 - 2.0 * mu / 3.0, K2 + mu / 3.0))
550 return false;
551 if (_vals[7] != K1 || _vals[14] != K1)
552 return false;
553
554 for (const auto i : make_range(1, 3))
555 for (const auto j : make_range(i))
556 if (_vals[i + N * j] != K2)
557 return false;
558
559 return true;
560}
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
bool isSymmetric() const
checks if the tensor is symmetric

◆ isSymmetric()

template<typename T >
bool SymmetricRankFourTensorTempl< T >::isSymmetric ( ) const

checks if the tensor is symmetric

Definition at line 511 of file SymmetricRankFourTensorImplementation.h.

512{
513 for (unsigned int i = 0; i < N; ++i)
514 for (unsigned int j = 0; j < N; ++j)
515 // major symmetry
516 if (_vals[i + N * j] != _vals[N * i + j])
517 return false;
518 return true;
519}

◆ L2norm()

template<typename T >
T SymmetricRankFourTensorTempl< T >::L2norm ( ) const

sqrt(C_ijkl*C_ijkl)

Definition at line 251 of file SymmetricRankFourTensorImplementation.h.

252{
253 T l2 = Utility::pow<2>(_vals[0]);
254 for (const auto i : make_range(1u, N2))
255 l2 += Utility::pow<2>(_vals[i]);
256 using std::sqrt;
257 return sqrt(l2);
258}
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
T pow(const T &x)

◆ mandelFactor()

template<typename T >
static constexpr Real SymmetricRankFourTensorTempl< T >::mandelFactor ( unsigned int  i,
unsigned int  j 
)
inlinestaticconstexpr

returns the 1, sqrt(2), or 2 prefactor in the Mandel notation for the indices i,j ranging from 0-5.

Definition at line 86 of file SymmetricRankFourTensor.h.

87 {
90 }
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.

Referenced by SymmetricRankTwoTensorTempl< T >::d2thirdInvariant(), and RankFourTensorTempl< T >::RankFourTensorTempl().

◆ operator RankFourTensorTempl< T >()

template<typename T >
SymmetricRankFourTensorTempl< T >::operator RankFourTensorTempl< T > ( )
explicit

The conversion operator to RankFourTensorTempl

Definition at line 97 of file SymmetricRankFourTensorImplementation.h.

98{
99 auto & q = *this;
101 for (const auto a : make_range(N))
102 for (const auto b : make_range(N))
103 {
104 const auto i = full_index[a][b][0];
105 const auto j = full_index[a][b][1];
106 const auto k = full_index[a][b][2];
107 const auto l = full_index[a][b][3];
108
109 // Rijkl = Rjikl = Rijlk = Rjilk
110 r(i, j, k, l) = q(a, b) / mandelFactor(a, b);
111 r(j, i, k, l) = q(a, b) / mandelFactor(a, b);
112 r(i, j, l, k) = q(a, b) / mandelFactor(a, b);
113 r(j, i, l, k) = q(a, b) / mandelFactor(a, b);
114 }
115
116 return r;
117}
RankFourTensorTempl is designed to handle any N-dimensional fourth order tensor, C.

◆ operator()() [1/2]

template<typename T >
T & SymmetricRankFourTensorTempl< T >::operator() ( unsigned int  i,
unsigned int  j 
)
inline

Gets the value for the indices specified. Takes indices ranging from 0-5 for i and j.

Definition at line 172 of file SymmetricRankFourTensor.h.

172{ return _vals[i * N + j]; }

◆ operator()() [2/2]

template<typename T >
const T & SymmetricRankFourTensorTempl< T >::operator() ( unsigned int  i,
unsigned int  j 
) const
inline

Gets the value for the indices specified.

Takes indices ranging from 0-5 for i and j. used for const

Definition at line 178 of file SymmetricRankFourTensor.h.

178{ return _vals[i * N + j]; }

◆ operator*() [1/3]

template<typename T >
template<typename T2 >
auto SymmetricRankFourTensorTempl< T >::operator* ( const SymmetricRankFourTensorTempl< T2 > &  a) const -> SymmetricRankFourTensorTempl<decltype(T() * T2())>

C_ijpq*a_pqkl.

Definition at line 235 of file SymmetricRankFourTensorImplementation.h.

237{
238 typedef decltype(T() * T2()) ValueType;
240
241 for (const auto i : make_range(N))
242 for (const auto j : make_range(N))
243 for (const auto p : make_range(N))
244 result(i, j) += (*this)(i, p) * b(p, j);
245
246 return result;
247}

◆ operator*() [2/3]

template<typename T >
template<typename T2 >
auto SymmetricRankFourTensorTempl< T >::operator* ( const SymmetricRankTwoTensorTempl< T2 > &  b) const -> SymmetricRankTwoTensorTempl<decltype(T() * T2())>

C_ijkl*a_kl.

Definition at line 474 of file SymmetricRankFourTensor.h.

476{
477 typedef decltype(T() * T2()) ValueType;
479
480 std::size_t index = 0;
481 for (const auto i : make_range(N))
482 {
483 ValueType tmp = 0.0;
484 for (const auto j : make_range(N))
485 tmp += _vals[index++] * b._vals[j];
486 result._vals[i] = tmp;
487 }
488
489 return result;
490}
SymmetricRankTwoTensorTempl is designed to handle the Stress or Strain Tensor for an anisotropic mate...

◆ operator*() [3/3]

template<typename T >
template<typename T2 >
auto SymmetricRankFourTensorTempl< T >::operator* ( const T2 &  a) const -> typename std::enable_if<libMesh::ScalarTraits<T2>::value, SymmetricRankFourTensorTempl<decltype(T() * T2())>>::type

C_ijkl*a.

Definition at line 458 of file SymmetricRankFourTensor.h.

461{
462 typedef decltype(T() * T2()) ValueType;
464
465 for (const auto i : make_range(N2))
466 result._vals[i] = _vals[i] * b;
467
468 return result;
469}

◆ operator*=()

template<typename T >
SymmetricRankFourTensorTempl< T > & SymmetricRankFourTensorTempl< T >::operator*= ( const T &  a)

C_ijkl *= a.

Definition at line 164 of file SymmetricRankFourTensorImplementation.h.

165{
166 for (const auto i : make_range(N2))
167 _vals[i] *= a;
168 return *this;
169}

◆ operator+()

template<typename T >
template<typename T2 >
auto SymmetricRankFourTensorTempl< T >::operator+ ( const SymmetricRankFourTensorTempl< T2 > &  a) const -> SymmetricRankFourTensorTempl<decltype(T() + T2())>

C_ijkl + a_ijkl.

Definition at line 192 of file SymmetricRankFourTensorImplementation.h.

194{
195 SymmetricRankFourTensorTempl<decltype(T() + T2())> result;
196 for (const auto i : make_range(N2))
197 result._vals[i] = _vals[i] + b._vals[i];
198 return result;
199}

◆ operator+=()

template<typename T >
SymmetricRankFourTensorTempl< T > & SymmetricRankFourTensorTempl< T >::operator+= ( const SymmetricRankFourTensorTempl< T > &  a)

C_ijkl += a_ijkl for all i, j, k, l.

Definition at line 182 of file SymmetricRankFourTensorImplementation.h.

183{
184 for (const auto i : make_range(N2))
185 _vals[i] += a._vals[i];
186 return *this;
187}

◆ operator-() [1/2]

template<typename T >
SymmetricRankFourTensorTempl< T > SymmetricRankFourTensorTempl< T >::operator- ( ) const

-C_ijkl

Definition at line 224 of file SymmetricRankFourTensorImplementation.h.

225{
227 for (const auto i : make_range(N2))
228 result._vals[i] = -_vals[i];
229 return result;
230}

◆ operator-() [2/2]

template<typename T >
template<typename T2 >
auto SymmetricRankFourTensorTempl< T >::operator- ( const SymmetricRankFourTensorTempl< T2 > &  a) const -> SymmetricRankFourTensorTempl<decltype(T() - T2())>

C_ijkl - a_ijkl.

Definition at line 213 of file SymmetricRankFourTensorImplementation.h.

215{
216 SymmetricRankFourTensorTempl<decltype(T() - T2())> result;
217 for (const auto i : make_range(N2))
218 result._vals[i] = _vals[i] - b._vals[i];
219 return result;
220}

◆ operator-=()

template<typename T >
SymmetricRankFourTensorTempl< T > & SymmetricRankFourTensorTempl< T >::operator-= ( const SymmetricRankFourTensorTempl< T > &  a)

C_ijkl -= a_ijkl.

Definition at line 203 of file SymmetricRankFourTensorImplementation.h.

204{
205 for (const auto i : make_range(N2))
206 _vals[i] -= a._vals[i];
207 return *this;
208}

◆ operator/()

template<typename T >
template<typename T2 >
auto SymmetricRankFourTensorTempl< T >::operator/ ( const T2 &  a) const -> typename std::enable_if<libMesh::ScalarTraits<T2>::value, SymmetricRankFourTensorTempl<decltype(T() / T2())>>::type

C_ijkl/a.

Definition at line 495 of file SymmetricRankFourTensor.h.

498{
499 SymmetricRankFourTensorTempl<decltype(T() / T2())> result;
500 for (const auto i : make_range(N2))
501 result._vals[i] = _vals[i] / b;
502 return result;
503}

◆ operator/=()

template<typename T >
SymmetricRankFourTensorTempl< T > & SymmetricRankFourTensorTempl< T >::operator/= ( const T &  a)

C_ijkl /= a for all i, j, k, l.

Definition at line 173 of file SymmetricRankFourTensorImplementation.h.

174{
175 for (const auto i : make_range(N2))
176 _vals[i] /= a;
177 return *this;
178}

◆ operator=() [1/2]

template<typename T >
template<typename Scalar >
std::enable_if< libMesh::ScalarTraits< Scalar >::value, SymmetricRankFourTensorTempl & >::type SymmetricRankFourTensorTempl< T >::operator= ( const Scalar &  libmesh_dbg_varp)
inline

Assignment-from-scalar operator.

Used only to zero out the tensor.

Returns
A reference to *this.

Definition at line 206 of file SymmetricRankFourTensor.h.

207 {
208 libmesh_assert_equal_to(p, Scalar(0));
209 this->zero();
210 return *this;
211 }

◆ operator=() [2/2]

template<typename T >
SymmetricRankFourTensorTempl< T > & SymmetricRankFourTensorTempl< T >::operator= ( const SymmetricRankFourTensorTempl< T > &  a)
default

copies values from a into this tensor

◆ print()

template<typename T >
void SymmetricRankFourTensorTempl< T >::print ( std::ostream &  stm = Moose::out) const

Print the rank four tensor.

Definition at line 262 of file SymmetricRankFourTensorImplementation.h.

263{
264 for (const auto i : make_range(N))
265 {
266 for (const auto j : make_range(N))
267 stm << std::setw(15) << _vals[i * N + j] << " ";
268 stm << '\n';
269 }
270 stm << std::flush;
271}

◆ printReal()

template<typename T >
void SymmetricRankFourTensorTempl< T >::printReal ( std::ostream &  stm = Moose::out) const

Print the values of the rank four tensor.

Definition at line 275 of file SymmetricRankFourTensorImplementation.h.

276{
277 for (const auto i : make_range(N))
278 {
279 for (const auto j : make_range(N))
280 stm << std::setw(15) << MetaPhysicL::raw_value(_vals[i * N + j]) << " ";
281 stm << '\n';
282 }
283 stm << std::flush;
284}
We need to instantiate the following CompareTypes to tell the compiler that ADReal is a subtype of Ch...
auto raw_value(const Eigen::Map< T > &in)

◆ rotate()

template<typename T >
void SymmetricRankFourTensorTempl< T >::rotate ( const TypeTensor< T > &  R)

Rotate the tensor using C_ijkl = R_im R_jn R_ko R_lp C_mnop.

Definition at line 153 of file SymmetricRankFourTensorImplementation.h.

154{
155 // build 6x6 rotation matrix
157
158 // rotate tensor
159 (*this) = M * (*this) * M.transposeMajor();
160}
static SymmetricRankFourTensorTempl< T > rotationMatrix(const TypeTensor< T > &R)
Build a 6x6 rotation matrix MEHRABADI, MORTEZA M.; COWIN, STEPHEN C.

◆ rotationMatrix()

template<typename T >
SymmetricRankFourTensorTempl< T > SymmetricRankFourTensorTempl< T >::rotationMatrix ( const TypeTensor< T > &  R)
static

Build a 6x6 rotation matrix MEHRABADI, MORTEZA M.; COWIN, STEPHEN C.

(1990). EIGENTENSORS OF LINEAR ANISOTROPIC ELASTIC MATERIALS. The Quarterly Journal of Mechanics and Applied Mathematics, 43(1), 15-41. doi:10.1093/qjmam/43.1.15

Definition at line 135 of file SymmetricRankFourTensorImplementation.h.

136{
138 const static std::array<std::size_t, 3> a = {{1, 0, 0}};
139 const static std::array<std::size_t, 3> b = {{2, 2, 1}};
140 for (std::size_t i = 0; i < 3; ++i)
141 for (std::size_t j = 0; j < 3; ++j)
142 {
143 M(i, j) = R(i, j) * R(i, j);
144 M(i + 3, j) = MathUtils::sqrt2 * R((i + 1) % 3, j) * R((i + 2) % 3, j);
145 M(j, i + 3) = MathUtils::sqrt2 * R(j, (i + 1) % 3) * R(j, (i + 2) % 3);
146 M(i + 3, j + 3) = R(a[i], a[j]) * R(b[i], b[j]) + R(a[i], b[j]) * R(b[i], a[j]);
147 }
148 return M;
149}
static constexpr Real sqrt2
std::sqrt is not constexpr, so we add sqrt(2) as a constant (used in Mandel notation)
Definition MathUtils.h:25

Referenced by SymmetricRankFourTensorTempl< T >::rotate(), and SymmetricRankTwoTensorTempl< T >::rotate().

◆ sum3x1()

template<typename T >
libMesh::VectorValue< T > SymmetricRankFourTensorTempl< T >::sum3x1 ( ) const

Calculates the vector a[i] = sum over j Ciijj for i and j varying from 0 to 2.

Definition at line 500 of file SymmetricRankFourTensorImplementation.h.

501{
502 mooseAssert(LIBMESH_DIM == 3, "This method assumes LIBMESH_DIM == 3");
503 // used for volumetric locking correction
504 return libMesh::VectorValue<T>(_vals[0] + _vals[1] + _vals[2],
505 _vals[6] + _vals[7] + _vals[8],
506 _vals[12] + _vals[13] + _vals[14]);
507}

◆ sum3x3()

template<typename T >
T SymmetricRankFourTensorTempl< T >::sum3x3 ( ) const

Calculates the sum of Ciijj for i and j varying from 0 to 2.

Definition at line 487 of file SymmetricRankFourTensorImplementation.h.

488{
489 mooseAssert(LIBMESH_DIM == 3, "This method assumes LIBMESH_DIM == 3");
490 // summation of Ciijj used in the volumetric locking correction
491 T sum = 0;
492 for (const auto i : make_range(3))
493 for (const auto j : make_range(3))
494 sum += (*this)(i, j);
495 return sum;
496}

◆ transposeIj()

template<typename T >
SymmetricRankFourTensorTempl< T > SymmetricRankFourTensorTempl< T >::transposeIj ( ) const
inline

Transpose the tensor by swapping the first two indices - a no-op.

Definition at line 293 of file SymmetricRankFourTensor.h.

293{ return *this; }

◆ transposeMajor()

template<typename T >
SymmetricRankFourTensorTempl< T > SymmetricRankFourTensorTempl< T >::transposeMajor ( ) const

Transpose the tensor by swapping the first pair with the second pair of indices This amounts to a regular transpose of the 6x6 matrix.

Returns
C_klji

Definition at line 288 of file SymmetricRankFourTensorImplementation.h.

289{
290 std::size_t index = 0;
292 for (const auto i : make_range(N))
293 for (const auto j : make_range(N))
294 ret._vals[index++] = _vals[i + N * j];
295 return ret;
296}

◆ zero()

template<typename T >
void SymmetricRankFourTensorTempl< T >::zero ( )

Friends And Related Symbol Documentation

◆ dataLoad

template<typename T >
template<class T2 >
void dataLoad ( std::istream &  ,
SymmetricRankFourTensorTempl< T2 > &  ,
void *   
)
friend

◆ dataStore

template<typename T >
template<class T2 >
void dataStore ( std::ostream &  ,
SymmetricRankFourTensorTempl< T2 > &  ,
void *   
)
friend

◆ operator<<

template<typename T >
std::ostream & operator<< ( std::ostream &  os,
const SymmetricRankFourTensorTempl< T > &  t 
)
friend

Definition at line 189 of file SymmetricRankFourTensor.h.

190 {
191 t.print(os);
192 return os;
193 }
void print(std::ostream &stm=Moose::out) const
Print the rank four tensor.

◆ RankThreeTensorTempl

template<typename T >
template<typename T2 >
friend class RankThreeTensorTempl
friend

Definition at line 415 of file SymmetricRankFourTensor.h.

◆ SymmetricRankFourTensorTempl

template<typename T >
template<typename T2 >
friend class SymmetricRankFourTensorTempl
friend

Definition at line 413 of file SymmetricRankFourTensor.h.

◆ SymmetricRankTwoTensorTempl

template<typename T >
template<typename T2 >
friend class SymmetricRankTwoTensorTempl
friend

Definition at line 411 of file SymmetricRankFourTensor.h.

Member Data Documentation

◆ _vals

template<typename T >
std::array<T, N2> SymmetricRankFourTensorTempl< T >::_vals
protected

◆ full_index

template<typename T >
constexpr unsigned int SymmetricRankFourTensorTempl< T >::full_index[6][6][4]
staticconstexpr
Initial value:
= {
{{0, 0, 0, 0}, {0, 0, 1, 1}, {0, 0, 2, 2}, {0, 0, 1, 2}, {0, 0, 0, 2}, {0, 0, 0, 1}},
{{1, 1, 0, 0}, {1, 1, 1, 1}, {1, 1, 2, 2}, {1, 1, 1, 2}, {1, 1, 0, 2}, {1, 1, 0, 1}},
{{2, 2, 0, 0}, {2, 2, 1, 1}, {2, 2, 2, 2}, {2, 2, 1, 2}, {2, 2, 0, 2}, {2, 2, 0, 1}},
{{1, 2, 0, 0}, {1, 2, 1, 1}, {1, 2, 2, 2}, {1, 2, 1, 2}, {1, 2, 0, 2}, {1, 2, 0, 1}},
{{0, 2, 0, 0}, {0, 2, 1, 1}, {0, 2, 2, 2}, {0, 2, 1, 2}, {0, 2, 0, 2}, {0, 2, 0, 1}},
{{0, 1, 0, 0}, {0, 1, 1, 1}, {0, 1, 2, 2}, {0, 1, 1, 2}, {0, 1, 0, 2}, {0, 1, 0, 1}}}

Definition at line 77 of file SymmetricRankFourTensor.h.

77 {
78 {{0, 0, 0, 0}, {0, 0, 1, 1}, {0, 0, 2, 2}, {0, 0, 1, 2}, {0, 0, 0, 2}, {0, 0, 0, 1}},
79 {{1, 1, 0, 0}, {1, 1, 1, 1}, {1, 1, 2, 2}, {1, 1, 1, 2}, {1, 1, 0, 2}, {1, 1, 0, 1}},
80 {{2, 2, 0, 0}, {2, 2, 1, 1}, {2, 2, 2, 2}, {2, 2, 1, 2}, {2, 2, 0, 2}, {2, 2, 0, 1}},
81 {{1, 2, 0, 0}, {1, 2, 1, 1}, {1, 2, 2, 2}, {1, 2, 1, 2}, {1, 2, 0, 2}, {1, 2, 0, 1}},
82 {{0, 2, 0, 0}, {0, 2, 1, 1}, {0, 2, 2, 2}, {0, 2, 1, 2}, {0, 2, 0, 2}, {0, 2, 0, 1}},
83 {{0, 1, 0, 0}, {0, 1, 1, 1}, {0, 1, 2, 2}, {0, 1, 1, 2}, {0, 1, 0, 2}, {0, 1, 0, 1}}};

◆ N

template<typename T >
constexpr unsigned int SymmetricRankFourTensorTempl< T >::N = Ndim + Ndim * (Ndim - 1) / 2
staticconstexpr

◆ N2

template<typename T >
constexpr unsigned int SymmetricRankFourTensorTempl< T >::N2 = N * N
staticconstexpr

Definition at line 73 of file SymmetricRankFourTensor.h.

◆ Ndim

template<typename T >
constexpr unsigned int SymmetricRankFourTensorTempl< T >::Ndim = LIBMESH_DIM
staticconstexpr

tensor dimension, Mandel matrix dimension, and Mandel matrix size

Definition at line 71 of file SymmetricRankFourTensor.h.


The documentation for this class was generated from the following files: