The most efficient sub routine for creating the arbitrary 3x3 matrix inversion multiplication.Consider the code for passing some 3x3 prebuilt pointer array.
type_3x3
Code:
real(8), target :: x(3,3)
end type type_3x3
type type_3x3_pointer
type(type_3x3), pointer :: p
end type_3x3_pointer
subroutine matmult_3x3_ListOf_3x3(inA, ListOf_B, ListOf_C, n)
real(8) :: inA(3,3)
integer :: n
type(type_3x3_pointer) :: ListOf_B(n), ListOf_C(n)
real(8) :: A(3,3)
real(8) :: temp
A=inA
do iVector=1,n
do i=1,3
do j=1,3
temp = 0.0D
do k=1,3
temp = temp + ListOf_B(iVector)%p%x(i,k) * A(k,j)
end do
ListOf_C(iVector)%p%x(i,j) = temp
end do
end do
end do
}
}
Bookmarks