55 numcstet,lmcstet,coor,&
56 nstart,nend, kappadamp)
63 INTEGER :: numnp,numcstet
64 INTEGER :: nstart, nend
66 REAL*8 :: inv60=1.d0/60.d0, inv120=1.d0/120.d0
71 INTEGER,
DIMENSION(1:4,1:numcstet) :: lmcstet
73 REAL*8,
DIMENSION(1:3*numnp) :: vhalf
75 INTEGER :: n1,n2,n3,n4
77 REAL*8 :: u1,u2,u3,u4,v1,v2,v3,v4,w1,w2,w3,w4
79 REAL*8 :: x1,x2,x3,x4,y1,y2,y3,y4,z1,z2,z3,z4
81 REAL*8 :: x14, x24, x34, y14, y24, y34, z14, z24, z34
83 REAL*8 :: c11, c21, c31
86 REAL*8,
DIMENSION(1:3,1:numnp) :: coor
88 REAL*8 :: vx6, vx6inv, vol,multiplier
90 INTEGER :: k1n1,k1n2,k1n3,k1n4,k2n1,k2n2,k2n3,k2n4
91 INTEGER :: k3n1,k3n2,k3n3,k3n4
94 REAL*8,
DIMENSION(1:3*numnp) :: r_in
154 c11 = y24*z34 - z24*y34
155 c21 = -( x24*z34 - z24*x34 )
156 c31 = x24*y34 - y24*x34
158 vx6 = -( x14*c11 + y14*c21 + z14*c31 )
160 multiplier = kappadamp*vx6
163 r_in(k1n1) = r_in(k1n1) - multiplier*(inv60*u1+inv120*(u2+u3+u4))
164 r_in(k2n1) = r_in(k2n1) - multiplier*(inv60*v1+inv120*(v2+v3+v4))
165 r_in(k3n1) = r_in(k3n1) - multiplier*(inv60*w1+inv120*(w2+w3+w4))
167 r_in(k1n2) = r_in(k1n2) - multiplier*(inv60*u2+inv120*(u1+u3+u4))
168 r_in(k2n2) = r_in(k2n2) - multiplier*(inv60*v2+inv120*(v1+v3+v4))
169 r_in(k3n2) = r_in(k3n2) - multiplier*(inv60*w2+inv120*(w1+w3+w4))
171 r_in(k1n3) = r_in(k1n3) - multiplier*(inv60*u3+inv120*(u1+u2+u4))
172 r_in(k2n3) = r_in(k2n3) - multiplier*(inv60*v3+inv120*(v1+v2+v4))
173 r_in(k3n3) = r_in(k3n3) - multiplier*(inv60*w3+inv120*(w1+w2+w4))
175 r_in(k1n4) = r_in(k1n4) - multiplier*(inv60*u4+inv120*(u1+u2+u3))
176 r_in(k2n4) = r_in(k2n4) - multiplier*(inv60*v4+inv120*(v1+v2+v3))
177 r_in(k3n4) = r_in(k3n4) - multiplier*(inv60*w4+inv120*(w1+w2+w3))
subroutine v3d4_damping(vhalf, R_in, numnp, numcstet, lmcstet, coor, nstart, nend, KappaDamp)