www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
SymmElasticityTensor Class Reference

This class defines a basic set of capabilities any elasticity tensor should have. More...

#include <SymmElasticityTensor.h>

Inheritance diagram for SymmElasticityTensor:
[legend]

Public Member Functions

 SymmElasticityTensor (const bool constant=false)
 Default constructor... More...
 
void constant (bool c)
 
virtual ~SymmElasticityTensor ()
 
void copyValues (SymmElasticityTensor &rhs) const
 
void calculate (unsigned int qp)
 Public function that will be called whenever the values for this matrix need to be filled in. More...
 
virtual void multiply (const SymmTensor &x, SymmTensor &b) const
 
SymmTensor operator* (const SymmTensor &x) const
 
SymmElasticityTensor operator* (Real x) const
 
virtual Real stiffness (const unsigned int i, const unsigned int j, const RealGradient &test, const RealGradient &phi) const
 
SymmElasticityTensor operator+ (const SymmElasticityTensor &rhs) const
 
void operator+= (const SymmElasticityTensor &rhs)
 
void operator-= (const SymmElasticityTensor &rhs)
 
void operator*= (Real rhs)
 
void operator/= (Real rhs)
 
void zero ()
 
void convertFrom9x9 (const ColumnMajorMatrix &cmm)
 
void convertFrom6x6 (const ColumnMajorMatrix &cmm)
 
ColumnMajorMatrix columnMajorMatrix9x9 () const
 
ColumnMajorMatrix columnMajorMatrix6x6 () const
 
void form9x9Rotation (const ColumnMajorMatrix &R_3x3, ColumnMajorMatrix &R_9x9) const
 
void rotateFromGlobalToLocal (const ColumnMajorMatrix &R)
 
void rotateFromLocalToGlobal (const ColumnMajorMatrix &R)
 
virtual void adjustForCracking (const RealVectorValue &crack_flags)
 
virtual void adjustForCrackingWithShearRetention (const RealVectorValue &crack_flags)
 
virtual SymmElasticityTensor calculateDerivative (unsigned int qp, unsigned int i)
 
void fillFromInputVector (std::vector< Real > input, bool all)
 
Real sum_3x3 () const
 
RealGradient sum_3x1 () const
 
Real valueAtIndex (int i) const
 

Protected Member Functions

virtual void calculateEntries (unsigned int qp)
 Virtual (must be overriden by derived class). More...
 

Protected Attributes

bool _constant
 Whether or not the matrix is constant for all of time and space. More...
 
bool _values_computed
 Whether or not the values have been computed once. More...
 
Real _val [21]
 

Friends

std::ostream & operator<< (std::ostream &stream, const SymmElasticityTensor &obj)
 
template<class T >
void dataStore (std::ostream &, T &, void *)
 
template<class T >
void dataLoad (std::istream &, T &, void *)
 

Detailed Description

This class defines a basic set of capabilities any elasticity tensor should have.

The SymmElasticityTensor represents the C_ijkl 3x3x3x3 tensor by a symmetric 6x6 matrix. 21 entries are stored.

Entries: Indices: C11 C12 C13 C14 C15 C16 0 1 2 3 4 5 C22 C23 C24 C25 C26 6 7 8 9 10 C33 C34 C35 C36 11 12 13 14 C44 C45 C46 15 16 17 C55 C56 18 19 C66 20

Multiplication by the strain is done by: |C11 C12 C13 C14 C15 C16| | exx| |Sxx| | C22 C23 C24 C25 C26| | eyy| |Syy| | C33 C34 C35 C36| | ezz| = |Szz| | C44 C45 C46| |2*exy| |Sxy| | C55 C56| |2*eyz| |Syz| | C66| |2*ezx| |Szx|

If the elasticity matrix is taken as 9x9 (with a column-major representation of the stress/strain), the relationship is: C11 C14 C16 C14 C12 C15 C16 C15 C13 C44 C46 C44 C42 C45 C46 C45 C43 C66 C64 C62 C65 C66 C65 C63 C44 C42 C45 C46 C45 C43 C22 C25 C26 C25 C23 C55 C56 C55 C53 C66 C65 C63 C55 C53 C33

Definition at line 56 of file SymmElasticityTensor.h.

Constructor & Destructor Documentation

◆ SymmElasticityTensor()

SymmElasticityTensor::SymmElasticityTensor ( const bool  constant = false)

Default constructor...

Parameters
constantDetermines whether or not the matrix will get recomputed multiple times (false) or just once (true).

Definition at line 31 of file SymmElasticityTensor.C.

Referenced by calculateDerivative().

33 {
34  for (unsigned i(0); i < 21; ++i)
35  {
36  _val[i] = 0;
37  }
38 }
bool _constant
Whether or not the matrix is constant for all of time and space.
bool _values_computed
Whether or not the values have been computed once.

◆ ~SymmElasticityTensor()

virtual SymmElasticityTensor::~SymmElasticityTensor ( )
inlinevirtual

Definition at line 69 of file SymmElasticityTensor.h.

69 {}

Member Function Documentation

◆ adjustForCracking()

void SymmElasticityTensor::adjustForCracking ( const RealVectorValue &  crack_flags)
virtual

Reimplemented in SymmIsotropicElasticityTensor.

Definition at line 372 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections().

373 {
374  mooseError("adjustForCracking method not defined");
375 }

◆ adjustForCrackingWithShearRetention()

void SymmElasticityTensor::adjustForCrackingWithShearRetention ( const RealVectorValue &  crack_flags)
virtual

Reimplemented in SymmIsotropicElasticityTensor.

Definition at line 378 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections().

379 {
380  mooseError("adjustForCrackingWithShearRetention method not defined");
381 }

◆ calculate()

void SymmElasticityTensor::calculate ( unsigned int  qp)

Public function that will be called whenever the values for this matrix need to be filled in.

Definition at line 41 of file SymmElasticityTensor.C.

Referenced by SolidModel::computeElasticityTensor(), LinearIsotropicMaterial::computeProperties(), and SolidModel::createElasticityTensor().

42 {
43  if (!_constant || !_values_computed)
44  {
45  calculateEntries(qp);
46  _values_computed = true;
47  }
48 }
bool _constant
Whether or not the matrix is constant for all of time and space.
virtual void calculateEntries(unsigned int qp)
Virtual (must be overriden by derived class).
bool _values_computed
Whether or not the values have been computed once.

◆ calculateDerivative()

SymmElasticityTensor SymmElasticityTensor::calculateDerivative ( unsigned int  qp,
unsigned int  i 
)
virtual

Definition at line 328 of file SymmElasticityTensor.C.

329 {
330  return SymmElasticityTensor();
331 }
SymmElasticityTensor(const bool constant=false)
Default constructor...

◆ calculateEntries()

void SymmElasticityTensor::calculateEntries ( unsigned int  qp)
protectedvirtual

Virtual (must be overriden by derived class).

This method actually fills in the entries of the tensor... using whatever information it has.

Reimplemented in SymmAnisotropicElasticityTensor, and SymmIsotropicElasticityTensor.

Definition at line 51 of file SymmElasticityTensor.C.

Referenced by calculate().

52 {
53 }

◆ columnMajorMatrix6x6()

ColumnMajorMatrix SymmElasticityTensor::columnMajorMatrix6x6 ( ) const

Definition at line 230 of file SymmElasticityTensor.C.

Referenced by SymmAnisotropicElasticityTensor::form_transformed_material_dt_matrix().

231 {
232  ColumnMajorMatrix cmm(6, 6);
233  unsigned count(0);
234  for (unsigned i(0); i < 6; ++i)
235  {
236  for (unsigned j(i); j < 6; ++j)
237  {
238  cmm(i, j) = cmm(j, i) = _val[count++];
239  }
240  }
241  return cmm;
242 }

◆ columnMajorMatrix9x9()

ColumnMajorMatrix SymmElasticityTensor::columnMajorMatrix9x9 ( ) const

Definition at line 245 of file SymmElasticityTensor.C.

Referenced by SymmAnisotropicElasticityTensor::form_transformed_material_dmat_matrix(), rotateFromGlobalToLocal(), and rotateFromLocalToGlobal().

246 {
247  ColumnMajorMatrix cmm(9, 9);
248  cmm(0, 0) = _val[0];
249  cmm(0, 1) = cmm(1, 0) = _val[3];
250  cmm(0, 2) = cmm(2, 0) = _val[5];
251  cmm(0, 3) = cmm(3, 0) = _val[3];
252  cmm(0, 4) = cmm(4, 0) = _val[1];
253  cmm(0, 5) = cmm(5, 0) = _val[4];
254  cmm(0, 6) = cmm(6, 0) = _val[5];
255  cmm(0, 7) = cmm(7, 0) = _val[4];
256  cmm(0, 8) = cmm(8, 0) = _val[2];
257 
258  cmm(1, 1) = _val[15];
259  cmm(1, 2) = cmm(2, 1) = _val[17];
260  cmm(1, 3) = cmm(3, 1) = _val[15];
261  cmm(1, 4) = cmm(4, 1) = _val[8];
262  cmm(1, 5) = cmm(5, 1) = _val[16];
263  cmm(1, 6) = cmm(6, 1) = _val[17];
264  cmm(1, 7) = cmm(7, 1) = _val[16];
265  cmm(1, 8) = cmm(8, 1) = _val[12];
266 
267  cmm(2, 2) = _val[20];
268  cmm(2, 3) = cmm(3, 2) = _val[17];
269  cmm(2, 4) = cmm(4, 2) = _val[10];
270  cmm(2, 5) = cmm(5, 2) = _val[19];
271  cmm(2, 6) = cmm(6, 2) = _val[20];
272  cmm(2, 7) = cmm(7, 2) = _val[19];
273  cmm(2, 8) = cmm(8, 2) = _val[14];
274 
275  cmm(3, 3) = _val[15];
276  cmm(3, 4) = cmm(4, 3) = _val[8];
277  cmm(3, 5) = cmm(5, 3) = _val[16];
278  cmm(3, 6) = cmm(6, 3) = _val[17];
279  cmm(3, 7) = cmm(7, 3) = _val[16];
280  cmm(3, 8) = cmm(8, 3) = _val[12];
281 
282  cmm(4, 4) = _val[6];
283  cmm(4, 5) = cmm(5, 4) = _val[9];
284  cmm(4, 6) = cmm(6, 4) = _val[10];
285  cmm(4, 7) = cmm(7, 4) = _val[9];
286  cmm(4, 8) = cmm(8, 4) = _val[7];
287 
288  cmm(5, 5) = _val[18];
289  cmm(5, 6) = cmm(6, 5) = _val[19];
290  cmm(5, 7) = cmm(7, 5) = _val[18];
291  cmm(5, 8) = cmm(8, 5) = _val[13];
292 
293  cmm(6, 6) = _val[20];
294  cmm(6, 7) = cmm(7, 6) = _val[19];
295  cmm(6, 8) = cmm(8, 6) = _val[14];
296 
297  cmm(7, 7) = _val[18];
298  cmm(7, 8) = cmm(8, 7) = _val[13];
299 
300  cmm(8, 8) = _val[11];
301 
302  return cmm;
303 }

◆ constant()

void SymmElasticityTensor::constant ( bool  c)
inline

Definition at line 67 of file SymmElasticityTensor.h.

67 { _constant = c; }
bool _constant
Whether or not the matrix is constant for all of time and space.

◆ convertFrom6x6()

void SymmElasticityTensor::convertFrom6x6 ( const ColumnMajorMatrix &  cmm)

Definition at line 194 of file SymmElasticityTensor.C.

195 {
196  if (input.numEntries() != 36)
197  {
198  mooseError("Cannot convert from ColumnMajorMatrix (wrong size)");
199  }
200 
201  _val[0] = input(0, 0);
202  _val[1] = input(0, 1);
203  _val[2] = input(0, 2);
204  _val[3] = input(0, 3);
205  _val[4] = input(0, 4);
206  _val[5] = input(0, 5);
207 
208  _val[6] = input(1, 1);
209  _val[7] = input(1, 2);
210  _val[8] = input(1, 3);
211  _val[9] = input(1, 4);
212  _val[10] = input(1, 5);
213 
214  _val[11] = input(2, 2);
215  _val[12] = input(2, 3);
216  _val[13] = input(2, 4);
217  _val[14] = input(2, 5);
218 
219  _val[15] = input(3, 3);
220  _val[16] = input(3, 4);
221  _val[17] = input(3, 5);
222 
223  _val[18] = input(4, 4);
224  _val[19] = input(4, 5);
225 
226  _val[20] = input(5, 5);
227 }

◆ convertFrom9x9()

void SymmElasticityTensor::convertFrom9x9 ( const ColumnMajorMatrix &  cmm)

Definition at line 158 of file SymmElasticityTensor.C.

Referenced by SymmAnisotropicElasticityTensor::form_transformed_material_dt_matrix(), rotateFromGlobalToLocal(), and rotateFromLocalToGlobal().

159 {
160  if (input.numEntries() != 81)
161  {
162  mooseError("Cannot convert from ColumnMajorMatrix (wrong size)");
163  }
164 
165  _val[0] = input(0, 0);
166  _val[1] = input(0, 4);
167  _val[2] = input(0, 8);
168  _val[3] = input(0, 1);
169  _val[4] = input(0, 5);
170  _val[5] = input(0, 2);
171 
172  _val[6] = input(4, 4);
173  _val[7] = input(4, 8);
174  _val[8] = input(4, 3);
175  _val[9] = input(4, 5);
176  _val[10] = input(4, 6);
177 
178  _val[11] = input(8, 8);
179  _val[12] = input(8, 3);
180  _val[13] = input(8, 5);
181  _val[14] = input(8, 6);
182 
183  _val[15] = input(1, 1);
184  _val[16] = input(1, 5);
185  _val[17] = input(1, 2);
186 
187  _val[18] = input(5, 5);
188  _val[19] = input(5, 6);
189 
190  _val[20] = input(2, 2);
191 }

◆ copyValues()

void SymmElasticityTensor::copyValues ( SymmElasticityTensor rhs) const
inline

Definition at line 71 of file SymmElasticityTensor.h.

Referenced by SymmAnisotropicElasticityTensor::form_transformed_material_dmat_matrix().

72  {
73  for (unsigned i(0); i < 21; ++i)
74  {
75  rhs._val[i] = _val[i];
76  }
77  }

◆ fillFromInputVector()

void SymmElasticityTensor::fillFromInputVector ( std::vector< Real >  input,
bool  all 
)

Definition at line 384 of file SymmElasticityTensor.C.

Referenced by LinearGeneralAnisotropicMaterial::LinearGeneralAnisotropicMaterial(), and MacroElastic::updateElasticityTensor().

385 {
386  if ((all == true && input.size() != 21) || (all == false && input.size() != 9))
387  mooseError("Please check the number of entries in the stiffness input vector.");
388 
389  if (all == true)
390  {
391  for (int i = 0; i < 21; i++)
392  _val[i] = input[i];
393  }
394  else
395  {
396  _val[0] = input[0]; // C1111
397  _val[1] = input[1]; // C1122
398  _val[2] = input[2]; // C1133
399  _val[6] = input[3]; // C2222
400  _val[7] = input[4]; // C2233
401  _val[11] = input[5]; // C3333
402  _val[15] = input[6]; // C2323
403  _val[18] = input[7]; // C1313
404  _val[20] = input[8]; // C1212
405  }
406 }

◆ form9x9Rotation()

void SymmElasticityTensor::form9x9Rotation ( const ColumnMajorMatrix &  R_3x3,
ColumnMajorMatrix &  R_9x9 
) const

Definition at line 341 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections().

343 {
344  for (int i = 0; i < 3; ++i)
345  {
346  for (int j = 0; j < 3; ++j)
347  {
348  for (int k = 0; k < 3; ++k)
349  {
350  for (int l = 0; l < 3; ++l)
351  {
352  R_9x9(((i * 3) + k), ((j * 3) + l)) = R_3x3(i, j) * R_3x3(k, l);
353  }
354  }
355  }
356  }
357 }

◆ multiply()

void SymmElasticityTensor::multiply ( const SymmTensor x,
SymmTensor b 
) const
virtual

Reimplemented in SymmIsotropicElasticityTensor.

Definition at line 56 of file SymmElasticityTensor.C.

Referenced by operator*().

57 {
58  const Real xx = x.xx();
59  const Real yy = x.yy();
60  const Real zz = x.zz();
61  const Real xy = x.xy();
62  const Real yz = x.yz();
63  const Real zx = x.zx();
64 
65  b.xx() =
66  _val[0] * xx + _val[1] * yy + _val[2] * zz + 2 * (_val[3] * xy + _val[4] * yz + _val[5] * zx);
67  b.yy() = _val[1] * xx + _val[6] * yy + _val[7] * zz +
68  2 * (_val[8] * xy + _val[9] * yz + _val[10] * zx);
69  b.zz() = _val[2] * xx + _val[7] * yy + _val[11] * zz +
70  2 * (_val[12] * xy + _val[13] * yz + _val[14] * zx);
71  b.xy() = _val[3] * xx + _val[8] * yy + _val[12] * zz +
72  2 * (_val[15] * xy + _val[16] * yz + _val[17] * zx);
73  b.yz() = _val[4] * xx + _val[9] * yy + _val[13] * zz +
74  2 * (_val[16] * xy + _val[18] * yz + _val[19] * zx);
75  b.zx() = _val[5] * xx + _val[10] * yy + _val[14] * zz +
76  2 * (_val[17] * xy + _val[19] * yz + _val[20] * zx);
77 }
Real yz() const
Definition: SymmTensor.h:136
Real zx() const
Definition: SymmTensor.h:137
Real yy() const
Definition: SymmTensor.h:133
Real xx() const
Definition: SymmTensor.h:132
Real xy() const
Definition: SymmTensor.h:135
Real zz() const
Definition: SymmTensor.h:134

◆ operator*() [1/2]

SymmTensor SymmElasticityTensor::operator* ( const SymmTensor x) const

Definition at line 79 of file SymmElasticityTensor.C.

80 {
81  SymmTensor b;
82  multiply(x, b);
83  return b;
84 }
virtual void multiply(const SymmTensor &x, SymmTensor &b) const

◆ operator*() [2/2]

SymmElasticityTensor SymmElasticityTensor::operator* ( Real  x) const

Definition at line 333 of file SymmElasticityTensor.C.

334 {
335  SymmElasticityTensor fred(*this);
336  fred *= x;
337  return fred;
338 }
This class defines a basic set of capabilities any elasticity tensor should have. ...

◆ operator*=()

void SymmElasticityTensor::operator*= ( Real  rhs)
inline

Definition at line 119 of file SymmElasticityTensor.h.

120  {
121  for (unsigned i(0); i < 21; ++i)
122  {
123  _val[i] *= rhs;
124  }
125  }

◆ operator+()

SymmElasticityTensor SymmElasticityTensor::operator+ ( const SymmElasticityTensor rhs) const
inline

Definition at line 94 of file SymmElasticityTensor.h.

95  {
96  SymmElasticityTensor t = *this;
97 
98  t += rhs;
99 
100  return t;
101  }
This class defines a basic set of capabilities any elasticity tensor should have. ...

◆ operator+=()

void SymmElasticityTensor::operator+= ( const SymmElasticityTensor rhs)
inline

Definition at line 103 of file SymmElasticityTensor.h.

104  {
105  for (unsigned i(0); i < 21; ++i)
106  {
107  _val[i] += rhs._val[i];
108  }
109  }

◆ operator-=()

void SymmElasticityTensor::operator-= ( const SymmElasticityTensor rhs)
inline

Definition at line 111 of file SymmElasticityTensor.h.

112  {
113  for (unsigned i(0); i < 21; ++i)
114  {
115  _val[i] -= rhs._val[i];
116  }
117  }

◆ operator/=()

void SymmElasticityTensor::operator/= ( Real  rhs)
inline

Definition at line 127 of file SymmElasticityTensor.h.

128  {
129  for (unsigned i(0); i < 21; ++i)
130  {
131  _val[i] /= rhs;
132  }
133  }

◆ rotateFromGlobalToLocal()

void SymmElasticityTensor::rotateFromGlobalToLocal ( const ColumnMajorMatrix &  R)

Definition at line 366 of file SymmElasticityTensor.C.

367 {
368  convertFrom9x9(R.transpose() * (columnMajorMatrix9x9() * R));
369 }
ColumnMajorMatrix columnMajorMatrix9x9() const
void convertFrom9x9(const ColumnMajorMatrix &cmm)

◆ rotateFromLocalToGlobal()

void SymmElasticityTensor::rotateFromLocalToGlobal ( const ColumnMajorMatrix &  R)

Definition at line 360 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections().

361 {
362  convertFrom9x9((R * columnMajorMatrix9x9()) * R.transpose());
363 }
ColumnMajorMatrix columnMajorMatrix9x9() const
void convertFrom9x9(const ColumnMajorMatrix &cmm)

◆ stiffness()

Real SymmElasticityTensor::stiffness ( const unsigned int  i,
const unsigned int  j,
const RealGradient &  test,
const RealGradient &  phi 
) const
virtual

Definition at line 87 of file SymmElasticityTensor.C.

91 {
92  RealGradient b;
93  if (0 == i && 0 == j)
94  {
95  b(0) = _val[0] * phi(0) + _val[3] * phi(1) + _val[5] * phi(2);
96  b(1) = _val[3] * phi(0) + _val[15] * phi(1) + _val[17] * phi(2);
97  b(2) = _val[5] * phi(0) + _val[17] * phi(1) + _val[20] * phi(2);
98  }
99  else if (1 == i && 1 == j)
100  {
101  b(0) = _val[15] * phi(0) + _val[8] * phi(1) + _val[16] * phi(2);
102  b(1) = _val[8] * phi(0) + _val[6] * phi(1) + _val[9] * phi(2);
103  b(2) = _val[16] * phi(0) + _val[9] * phi(1) + _val[18] * phi(2);
104  }
105  else if (2 == i && 2 == j)
106  {
107  b(0) = _val[20] * phi(0) + _val[19] * phi(1) + _val[14] * phi(2);
108  b(1) = _val[19] * phi(0) + _val[18] * phi(1) + _val[13] * phi(2);
109  b(2) = _val[14] * phi(0) + _val[13] * phi(1) + _val[11] * phi(2);
110  }
111  else if (0 == i && 1 == j)
112  {
113  b(0) = _val[3] * phi(0) + _val[1] * phi(1) + _val[4] * phi(2);
114  b(1) = _val[15] * phi(0) + _val[8] * phi(1) + _val[16] * phi(2);
115  b(2) = _val[17] * phi(0) + _val[10] * phi(1) + _val[19] * phi(2);
116  }
117  else if (1 == i && 0 == j)
118  {
119  b(0) = _val[3] * phi(0) + _val[15] * phi(1) + _val[17] * phi(2);
120  b(1) = _val[1] * phi(0) + _val[8] * phi(1) + _val[10] * phi(2);
121  b(2) = _val[4] * phi(0) + _val[16] * phi(1) + _val[19] * phi(2);
122  }
123  else if (1 == i && 2 == j)
124  {
125  b(0) = _val[17] * phi(0) + _val[16] * phi(1) + _val[12] * phi(2);
126  b(1) = _val[10] * phi(0) + _val[9] * phi(1) + _val[7] * phi(2);
127  b(2) = _val[19] * phi(0) + _val[18] * phi(1) + _val[13] * phi(2);
128  }
129  else if (2 == i && 1 == j)
130  {
131  b(0) = _val[17] * phi(0) + _val[10] * phi(1) + _val[19] * phi(2);
132  b(1) = _val[16] * phi(0) + _val[9] * phi(1) + _val[18] * phi(2);
133  b(2) = _val[12] * phi(0) + _val[7] * phi(1) + _val[13] * phi(2);
134  }
135  else if (0 == i && 2 == j)
136  {
137  b(0) = _val[5] * phi(0) + _val[4] * phi(1) + _val[2] * phi(2);
138  b(1) = _val[17] * phi(0) + _val[16] * phi(1) + _val[12] * phi(2);
139  b(2) = _val[20] * phi(0) + _val[19] * phi(1) + _val[14] * phi(2);
140  }
141  else if (2 == i && 0 == j)
142  {
143  b(0) = _val[5] * phi(0) + _val[17] * phi(1) + _val[20] * phi(2);
144  b(1) = _val[4] * phi(0) + _val[16] * phi(1) + _val[19] * phi(2);
145  b(2) = _val[2] * phi(0) + _val[12] * phi(1) + _val[14] * phi(2);
146  }
147  else
148  {
149  std::stringstream s;
150  s << "Wrong index in stiffness calculation: ";
151  s << i << " " << j;
152  mooseError(s.str());
153  }
154  return test * b;
155 }

◆ sum_3x1()

RealGradient SymmElasticityTensor::sum_3x1 ( ) const

Definition at line 422 of file SymmElasticityTensor.C.

423 {
424  // used for volumetric locking correction
425  RealGradient a(3);
426  a(0) = _val[0] + _val[1] + _val[2]; // C00 + C01 + C02
427  a(1) = _val[1] + _val[6] + _val[7]; // C10 + C11 + C12
428  a(2) = _val[2] + _val[7] + _val[11]; // C20 + C21 + C22
429  return a;
430 }

◆ sum_3x3()

Real SymmElasticityTensor::sum_3x3 ( ) const

Definition at line 415 of file SymmElasticityTensor.C.

416 {
417  // summation of Cij for i and j ranging from 0 to 2 - used in the volumetric locking correction
418  return _val[0] + 2 * (_val[1] + _val[2] + _val[7]) + _val[6] + _val[11];
419 }

◆ valueAtIndex()

Real SymmElasticityTensor::valueAtIndex ( int  i) const

Definition at line 409 of file SymmElasticityTensor.C.

Referenced by RateDepSmearCrackModel::computeStress().

410 {
411  return _val[i];
412 }

◆ zero()

void SymmElasticityTensor::zero ( )
inline

Definition at line 135 of file SymmElasticityTensor.h.

Referenced by SymmAnisotropicElasticityTensor::calculateEntries().

136  {
137  for (unsigned i(0); i < 21; ++i)
138  {
139  _val[i] = 0;
140  }
141  }

Friends And Related Function Documentation

◆ dataLoad

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

◆ dataStore

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

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const SymmElasticityTensor obj 
)
friend

Definition at line 306 of file SymmElasticityTensor.C.

307 {
308  stream << "SymmElasticityTensor:\n"
309  << std::setprecision(6) << std::setw(13) << obj._val[0] << "\t" << std::setw(13)
310  << obj._val[1] << "\t" << std::setw(13) << obj._val[2] << "\t" << std::setw(13)
311  << obj._val[3] << "\t" << std::setw(13) << obj._val[4] << "\t" << std::setw(13)
312  << obj._val[5] << "\n"
313  << "\t\t" << std::setw(13) << obj._val[6] << "\t" << std::setw(13) << obj._val[7] << "\t"
314  << std::setw(13) << obj._val[8] << "\t" << std::setw(13) << obj._val[9] << "\t"
315  << std::setw(13) << obj._val[10] << "\n"
316  << "\t\t\t\t" << std::setw(13) << obj._val[11] << "\t" << std::setw(13) << obj._val[12]
317  << "\t" << std::setw(13) << obj._val[13] << "\t" << std::setw(13) << obj._val[14] << "\n"
318  << "\t\t\t\t\t\t" << std::setw(13) << obj._val[15] << "\t" << std::setw(13) << obj._val[16]
319  << "\t" << std::setw(13) << obj._val[17] << "\t"
320  << "\n"
321  << "\t\t\t\t\t\t\t\t" << std::setw(13) << obj._val[18] << "\t" << std::setw(13)
322  << obj._val[19] << "\n"
323  << "\t\t\t\t\t\t\t\t\t\t" << std::setw(13) << obj._val[20] << std::endl;
324  return stream;
325 }

Member Data Documentation

◆ _constant

bool SymmElasticityTensor::_constant
protected

Whether or not the matrix is constant for all of time and space.

Definition at line 174 of file SymmElasticityTensor.h.

Referenced by calculate(), and constant().

◆ _val

Real SymmElasticityTensor::_val[21]
protected

◆ _values_computed

bool SymmElasticityTensor::_values_computed
protected

Whether or not the values have been computed once.

Definition at line 179 of file SymmElasticityTensor.h.

Referenced by calculate().


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