@@ -200,74 +200,6 @@ def vecMVToSymm(A, scale=True):
200200 return symm_mat
201201
202202
203- def vecMVCOBMatrix (R ):
204- """
205- GenerateS array of 6 x 6 basis transformation matrices for the
206- Mandel-Voigt tensor representation in 3-D given by:
207-
208- [A] = [[A_11, A_12, A_13],
209- [A_12, A_22, A_23],
210- [A_13, A_23, A_33]]
211-
212- {A} = [A_11, A_22, A_33, sqrt(2)*A_23, sqrt(2)*A_13, sqrt(2)*A_12]
213-
214- where the operation :math:`R*A*R.T` (in tensor notation) is obtained by
215- the matrix-vector product [T]*{A}.
216-
217- USAGE
218-
219- T = vecMVCOBMatrix(R)
220-
221- INPUTS
222-
223- 1) R is (3, 3) an ndarray representing a change of basis matrix
224-
225- OUTPUTS
226-
227- 1) T is (6, 6), an ndarray of transformation matrices as
228- described above
229-
230- NOTES
231-
232- 1) Compoments of symmetric 4th-rank tensors transform in a
233- manner analogous to symmetric 2nd-rank tensors in full
234- matrix notation.
235-
236- SEE ALSO
237-
238- symmToVecMV, vecMVToSymm, quatToMat
239- """
240- rdim = len (R .shape )
241- if rdim == 2 :
242- nrot = 1
243- R = np .tile (R , (1 , 1 , 1 ))
244- elif rdim == 3 :
245- nrot = R .shape [0 ]
246- else :
247- raise RuntimeError (
248- "R array must be (3, 3) or (n, 3, 3); input has dimension %d"
249- % (rdim )
250- )
251-
252- T = np .zeros ((nrot , 6 , 6 ), dtype = 'float64' )
253-
254- for i in range (3 ):
255- # Other two i values
256- i1 , i2 = [k for k in range (3 ) if k != i ]
257- for j in range (3 ):
258- # Other two j values
259- j1 , j2 = [k for k in range (3 ) if k != j ]
260-
261- T [:, i , j ] = R [:, i , j ] ** 2
262- T [:, i , j + 3 ] = sqr2 * R [:, i , j1 ] * R [:, i , j2 ]
263- T [:, i + 3 , j ] = sqr2 * R [:, i1 , j ] * R [:, i2 , j ]
264- T [:, i + 3 , j + 3 ] = (
265- R [:, i1 , j1 ] * R [:, i2 , j2 ] + R [:, i1 , j2 ] * R [:, i2 , j1 ]
266- )
267-
268- return T .squeeze ()
269-
270-
271203def nrmlProjOfVecMV (vec ):
272204 """
273205 Gives vstacked p x 6 array to To perform n' * A * n as [N]*{A} for
0 commit comments