added _mul33xx33 double contraction: A_ij * B_ij = scalar

This commit is contained in:
Philip Eisenlohr 2010-09-30 09:32:49 +00:00
parent cb4b4afc88
commit a8dfdc6487
1 changed files with 22 additions and 2 deletions

View File

@ -429,6 +429,26 @@ real(pReal), dimension(4,36), parameter :: math_symOperations = &
endfunction endfunction
!**************************************************************************
! matrix multiplication 33x33 = 1 (double contraction --> ij * ij)
!**************************************************************************
pure function math_mul33xx33(A,B)
use prec, only: pReal, pInt
implicit none
integer(pInt) i,j
real(pReal), dimension(3,3), intent(in) :: A,B
real(pReal), dimension(3,3) :: C
real(pReal) math_mul33xx33
forall (i=1:3,j=1:3) C(i,j) = A(i,j) * B(i,j)
math_mul33xx33 = sum(C)
return
endfunction
!************************************************************************** !**************************************************************************
! matrix multiplication 33x33 = 3x3 ! matrix multiplication 33x33 = 3x3
!************************************************************************** !**************************************************************************