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

Go to the source code of this file.

Functions/Subroutines

subroutine matvec (n, x, y, nelt, ia, ja, a, isym)
 

Function/Subroutine Documentation

◆ matvec()

subroutine matvec ( integer  n,
real*8, dimension(*)  x,
real*8, dimension(*)  y,
integer  nelt,
integer, dimension(*)  ia,
integer, dimension(*)  ja,
real*8, dimension(*)  a,
integer  isym 
)
27  use omp_lib
28 !
29  implicit none
30 !
31  integer ia(*),ja(*),i,j,n,nelt,isym,nflnei
32  real*8 y(*),x(*),a(*)
33 !
34 ! number of off-diagonal terms
35 !
36  nflnei=nelt-n
37 !
38 c$omp parallel default(none)
39 c$omp& shared(n,x,a,y,ja,ia,nflnei)
40 c$omp& private(i,j)
41 c$omp do
42  do i=1,n
43  y(i)=a(nflnei+i)*x(i)
44  do j=ja(i)+1,ja(i+1)
45 c if(ia(j).ne.0) then
46  y(i)=y(i)+a(j)*x(ia(j))
47 c endif
48  enddo
49  enddo
50 c$omp end do
51 c$omp end parallel
52 !
53  return
Hosted by OpenAircraft.com, (Michigan UAV, LLC)