CalculiX  2.13
A Free Software Three-Dimensional Structural Finite Element Program
mult.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine mult (matrix, trans, n)
 

Function/Subroutine Documentation

◆ mult()

subroutine mult ( real*8, dimension(3,3)  matrix,
real*8, dimension(3,3)  trans,
integer  n 
)
20 !
21  implicit none
22 !
23  integer i,j,k,n
24  real*8 matrix(3,3),trans(3,3),a(3,3)
25 !
26 ! 3x3 matrix multiplication. If n=1 then
27 ! matrix=trans^T*matrix,
28 ! if n=2 then
29 ! matrix=matrix*trans.
30 !
31  if(n.eq.1) then
32  do i=1,3
33  do j=1,3
34  a(i,j)=0.d0
35  do k=1,3
36  a(i,j)=a(i,j)+trans(k,i)*matrix(k,j)
37  enddo
38  enddo
39  enddo
40  elseif(n.eq.2) then
41  do i=1,3
42  do j=1,3
43  a(i,j)=0.d0
44  do k=1,3
45  a(i,j)=a(i,j)+matrix(i,k)*trans(k,j)
46  enddo
47  enddo
48  enddo
49  endif
50 !
51  do i=1,3
52  do j=1,3
53  matrix(i,j)=a(i,j)
54  enddo
55  enddo
56 !
57  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)