Go to the documentation of this file.
32 : _constant(constant), _values_computed(false)
34 for (
unsigned i(0); i < 21; ++i)
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();
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);
99 else if (1 == i && 1 == j)
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);
105 else if (2 == i && 2 == j)
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);
111 else if (0 == i && 1 == j)
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);
117 else if (1 == i && 0 == j)
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);
123 else if (1 == i && 2 == j)
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);
129 else if (2 == i && 1 == j)
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);
135 else if (0 == i && 2 == j)
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);
141 else if (2 == i && 0 == j)
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);
150 s <<
"Wrong index in stiffness calculation: ";
160 if (input.numEntries() != 81)
162 mooseError(
"Cannot convert from ColumnMajorMatrix (wrong size)");
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);
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);
178 _val[11] = input(8, 8);
179 _val[12] = input(8, 3);
180 _val[13] = input(8, 5);
181 _val[14] = input(8, 6);
183 _val[15] = input(1, 1);
184 _val[16] = input(1, 5);
185 _val[17] = input(1, 2);
187 _val[18] = input(5, 5);
188 _val[19] = input(5, 6);
190 _val[20] = input(2, 2);
196 if (input.numEntries() != 36)
198 mooseError(
"Cannot convert from ColumnMajorMatrix (wrong size)");
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);
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);
214 _val[11] = input(2, 2);
215 _val[12] = input(2, 3);
216 _val[13] = input(2, 4);
217 _val[14] = input(2, 5);
219 _val[15] = input(3, 3);
220 _val[16] = input(3, 4);
221 _val[17] = input(3, 5);
223 _val[18] = input(4, 4);
224 _val[19] = input(4, 5);
226 _val[20] = input(5, 5);
232 ColumnMajorMatrix cmm(6, 6);
234 for (
unsigned i(0); i < 6; ++i)
236 for (
unsigned j(i); j < 6; ++j)
238 cmm(i, j) = cmm(j, i) =
_val[count++];
247 ColumnMajorMatrix cmm(9, 9);
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];
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];
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];
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];
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];
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];
293 cmm(6, 6) =
_val[20];
294 cmm(6, 7) = cmm(7, 6) =
_val[19];
295 cmm(6, 8) = cmm(8, 6) =
_val[14];
297 cmm(7, 7) =
_val[18];
298 cmm(7, 8) = cmm(8, 7) =
_val[13];
300 cmm(8, 8) =
_val[11];
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"
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;
342 ColumnMajorMatrix & R_9x9)
const
344 for (
int i = 0; i < 3; ++i)
346 for (
int j = 0; j < 3; ++j)
348 for (
int k = 0; k < 3; ++k)
350 for (
int l = 0; l < 3; ++l)
352 R_9x9(((i * 3) + k), ((j * 3) + l)) = R_3x3(i, j) * R_3x3(k, l);
374 mooseError(
"adjustForCracking method not defined");
380 mooseError(
"adjustForCrackingWithShearRetention method not defined");
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.");
391 for (
int i = 0; i < 21; i++)
void calculate(unsigned int qp)
Public function that will be called whenever the values for this matrix need to be filled in.
void rotateFromLocalToGlobal(const ColumnMajorMatrix &R)
void convertFrom9x9(const ColumnMajorMatrix &cmm)
Real valueAtIndex(int i) const
virtual void multiply(const SymmTensor &x, SymmTensor &b) const
void rotateFromGlobalToLocal(const ColumnMajorMatrix &R)
std::ostream & operator<<(std::ostream &stream, const SymmElasticityTensor &obj)
VectorValue< Real > RealGradient
bool _values_computed
Whether or not the values have been computed once.
virtual void adjustForCracking(const RealVectorValue &crack_flags)
void form9x9Rotation(const ColumnMajorMatrix &R_3x3, ColumnMajorMatrix &R_9x9) const
virtual Real stiffness(const unsigned int i, const unsigned int j, const RealGradient &test, const RealGradient &phi) const
virtual void adjustForCrackingWithShearRetention(const RealVectorValue &crack_flags)
void convertFrom6x6(const ColumnMajorMatrix &cmm)
This class defines a basic set of capabilities any elasticity tensor should have.
SymmElasticityTensor(const bool constant=false)
Default constructor...
void dataLoad(std::istream &stream, SymmElasticityTensor &set, void *context)
bool _constant
Whether or not the matrix is constant for all of time and space.
void dataStore(std::ostream &stream, SymmElasticityTensor &set, void *context)
virtual SymmElasticityTensor calculateDerivative(unsigned int qp, unsigned int i)
virtual void calculateEntries(unsigned int qp)
Virtual (must be overriden by derived class).
ColumnMajorMatrix columnMajorMatrix6x6() const
void fillFromInputVector(std::vector< Real > input, bool all)
RealGradient sum_3x1() const
SymmTensor operator*(const SymmTensor &x) const
ColumnMajorMatrix columnMajorMatrix9x9() const