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 53 of file SymmElasticityTensor.h.

Constructor & Destructor Documentation

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 28 of file SymmElasticityTensor.C.

Referenced by calculateDerivative().

30 {
31  for (unsigned i(0); i < 21; ++i)
32  {
33  _val[i] = 0;
34  }
35 }
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.
virtual SymmElasticityTensor::~SymmElasticityTensor ( )
inlinevirtual

Definition at line 66 of file SymmElasticityTensor.h.

66 {}

Member Function Documentation

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

Reimplemented in SymmIsotropicElasticityTensor.

Definition at line 369 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections(), and zero().

370 {
371  mooseError("adjustForCracking method not defined");
372 }
void SymmElasticityTensor::adjustForCrackingWithShearRetention ( const RealVectorValue &  crack_flags)
virtual

Reimplemented in SymmIsotropicElasticityTensor.

Definition at line 375 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections(), and zero().

376 {
377  mooseError("adjustForCrackingWithShearRetention method not defined");
378 }
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 38 of file SymmElasticityTensor.C.

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

39 {
40  if (!_constant || !_values_computed)
41  {
42  calculateEntries(qp);
43  _values_computed = true;
44  }
45 }
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.
SymmElasticityTensor SymmElasticityTensor::calculateDerivative ( unsigned int  qp,
unsigned int  i 
)
virtual

Definition at line 325 of file SymmElasticityTensor.C.

Referenced by zero().

326 {
327  return SymmElasticityTensor();
328 }
SymmElasticityTensor(const bool constant=false)
Default constructor...
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 48 of file SymmElasticityTensor.C.

Referenced by calculate().

49 {
50 }
ColumnMajorMatrix SymmElasticityTensor::columnMajorMatrix6x6 ( ) const

Definition at line 227 of file SymmElasticityTensor.C.

Referenced by SymmAnisotropicElasticityTensor::form_transformed_material_dt_matrix(), and zero().

228 {
229  ColumnMajorMatrix cmm(6, 6);
230  unsigned count(0);
231  for (unsigned i(0); i < 6; ++i)
232  {
233  for (unsigned j(i); j < 6; ++j)
234  {
235  cmm(i, j) = cmm(j, i) = _val[count++];
236  }
237  }
238  return cmm;
239 }
ColumnMajorMatrix SymmElasticityTensor::columnMajorMatrix9x9 ( ) const

Definition at line 242 of file SymmElasticityTensor.C.

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

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

Definition at line 64 of file SymmElasticityTensor.h.

64 { _constant = c; }
bool _constant
Whether or not the matrix is constant for all of time and space.
void SymmElasticityTensor::convertFrom6x6 ( const ColumnMajorMatrix &  cmm)

Definition at line 191 of file SymmElasticityTensor.C.

Referenced by zero().

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

Definition at line 155 of file SymmElasticityTensor.C.

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

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

Definition at line 68 of file SymmElasticityTensor.h.

Referenced by SymmAnisotropicElasticityTensor::form_transformed_material_dmat_matrix().

69  {
70  for (unsigned i(0); i < 21; ++i)
71  {
72  rhs._val[i] = _val[i];
73  }
74  }
void SymmElasticityTensor::fillFromInputVector ( std::vector< Real >  input,
bool  all 
)

Definition at line 381 of file SymmElasticityTensor.C.

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

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

Definition at line 338 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections(), and zero().

340 {
341  for (int i = 0; i < 3; ++i)
342  {
343  for (int j = 0; j < 3; ++j)
344  {
345  for (int k = 0; k < 3; ++k)
346  {
347  for (int l = 0; l < 3; ++l)
348  {
349  R_9x9(((i * 3) + k), ((j * 3) + l)) = R_3x3(i, j) * R_3x3(k, l);
350  }
351  }
352  }
353  }
354 }
void SymmElasticityTensor::multiply ( const SymmTensor x,
SymmTensor b 
) const
virtual

Reimplemented in SymmIsotropicElasticityTensor.

Definition at line 53 of file SymmElasticityTensor.C.

Referenced by copyValues(), and operator*().

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

Definition at line 76 of file SymmElasticityTensor.C.

Referenced by copyValues().

77 {
78  SymmTensor b;
79  multiply(x, b);
80  return b;
81 }
virtual void multiply(const SymmTensor &x, SymmTensor &b) const
SymmElasticityTensor SymmElasticityTensor::operator* ( Real  x) const

Definition at line 330 of file SymmElasticityTensor.C.

331 {
332  SymmElasticityTensor fred(*this);
333  fred *= x;
334  return fred;
335 }
This class defines a basic set of capabilities any elasticity tensor should have. ...
void SymmElasticityTensor::operator*= ( Real  rhs)
inline

Definition at line 116 of file SymmElasticityTensor.h.

117  {
118  for (unsigned i(0); i < 21; ++i)
119  {
120  _val[i] *= rhs;
121  }
122  }
SymmElasticityTensor SymmElasticityTensor::operator+ ( const SymmElasticityTensor rhs) const
inline

Definition at line 91 of file SymmElasticityTensor.h.

92  {
93  SymmElasticityTensor t = *this;
94 
95  t += rhs;
96 
97  return t;
98  }
This class defines a basic set of capabilities any elasticity tensor should have. ...
void SymmElasticityTensor::operator+= ( const SymmElasticityTensor rhs)
inline

Definition at line 100 of file SymmElasticityTensor.h.

101  {
102  for (unsigned i(0); i < 21; ++i)
103  {
104  _val[i] += rhs._val[i];
105  }
106  }
void SymmElasticityTensor::operator-= ( const SymmElasticityTensor rhs)
inline

Definition at line 108 of file SymmElasticityTensor.h.

109  {
110  for (unsigned i(0); i < 21; ++i)
111  {
112  _val[i] -= rhs._val[i];
113  }
114  }
void SymmElasticityTensor::operator/= ( Real  rhs)
inline

Definition at line 124 of file SymmElasticityTensor.h.

125  {
126  for (unsigned i(0); i < 21; ++i)
127  {
128  _val[i] /= rhs;
129  }
130  }
void SymmElasticityTensor::rotateFromGlobalToLocal ( const ColumnMajorMatrix &  R)

Definition at line 363 of file SymmElasticityTensor.C.

Referenced by zero().

364 {
365  convertFrom9x9(R.transpose() * (columnMajorMatrix9x9() * R));
366 }
void convertFrom9x9(const ColumnMajorMatrix &cmm)
ColumnMajorMatrix columnMajorMatrix9x9() const
void SymmElasticityTensor::rotateFromLocalToGlobal ( const ColumnMajorMatrix &  R)

Definition at line 357 of file SymmElasticityTensor.C.

Referenced by SolidModel::crackingStrainDirections(), and zero().

358 {
359  convertFrom9x9((R * columnMajorMatrix9x9()) * R.transpose());
360 }
void convertFrom9x9(const ColumnMajorMatrix &cmm)
ColumnMajorMatrix columnMajorMatrix9x9() const
Real SymmElasticityTensor::stiffness ( const unsigned int  i,
const unsigned int  j,
const RealGradient &  test,
const RealGradient &  phi 
) const
virtual

Definition at line 84 of file SymmElasticityTensor.C.

Referenced by copyValues().

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

Definition at line 419 of file SymmElasticityTensor.C.

Referenced by zero().

420 {
421  // used for volumetric locking correction
422  RealGradient a(3);
423  a(0) = _val[0] + _val[1] + _val[2]; // C00 + C01 + C02
424  a(1) = _val[1] + _val[6] + _val[7]; // C10 + C11 + C12
425  a(2) = _val[2] + _val[7] + _val[11]; // C20 + C21 + C22
426  return a;
427 }
Real SymmElasticityTensor::sum_3x3 ( ) const

Definition at line 412 of file SymmElasticityTensor.C.

Referenced by zero().

413 {
414  // summation of Cij for i and j ranging from 0 to 2 - used in the volumetric locking correction
415  return _val[0] + 2 * (_val[1] + _val[2] + _val[7]) + _val[6] + _val[11];
416 }
Real SymmElasticityTensor::valueAtIndex ( int  i) const

Definition at line 406 of file SymmElasticityTensor.C.

Referenced by RateDepSmearCrackModel::computeStress(), and zero().

407 {
408  return _val[i];
409 }
void SymmElasticityTensor::zero ( )
inline

Definition at line 132 of file SymmElasticityTensor.h.

Referenced by SymmAnisotropicElasticityTensor::calculateEntries().

133  {
134  for (unsigned i(0); i < 21; ++i)
135  {
136  _val[i] = 0;
137  }
138  }

Friends And Related Function Documentation

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

Definition at line 303 of file SymmElasticityTensor.C.

Referenced by zero().

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

Member Data Documentation

bool SymmElasticityTensor::_constant
protected

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

Definition at line 171 of file SymmElasticityTensor.h.

Referenced by calculate(), and constant().

Real SymmElasticityTensor::_val[21]
protected
bool SymmElasticityTensor::_values_computed
protected

Whether or not the values have been computed once.

Definition at line 176 of file SymmElasticityTensor.h.

Referenced by calculate().


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