6 use size_m
, only : nid, nelt
7 use input, only : param, ifmvbd, if3d, ccurve, xc, yc, zc
8 use mesh, only : ifdfrm
11 real(DP) :: XCC(8),YCC(8),ZCC(8)
16 integer :: ie, iedg, i, i1, j, i2
38 IF (param(59) /= 0 .AND. nid == 0) &
39 write(6,*)
'NOTE: All elements deformed , param(59) ^=0'
40 IF (param(59) /= 0)
return
60 IF(ccurve(iedg,ie) /=
' ')
THEN
73 vec(1,i)=xcc(2*i)-xcc(2*i-1)
74 vec(2,i)=ycc(2*i)-ycc(2*i-1)
75 vec(3,i)=zcc(2*i)-zcc(2*i-1)
83 vec(1,i1)=xcc(i2)-xcc(i2-2)
84 vec(2,i1)=ycc(i2)-ycc(i2-2)
85 vec(3,i1)=zcc(i2)-zcc(i2-2)
92 vec(1,i1)=xcc(i)-xcc(i-4)
93 vec(2,i1)=ycc(i)-ycc(i-4)
94 vec(3,i1)=zcc(i)-zcc(i-4)
98 veclen = vec(1,i)**2 + vec(2,i)**2 + vec(3,i)**2
100 vec(1,i)=vec(1,i)/veclen
101 vec(2,i)=vec(2,i)/veclen
102 vec(3,i)=vec(3,i)/veclen
108 IF ( ifvchk(vec,1,5, 9) ) ifdfrm(ie)= .true.
109 IF ( ifvchk(vec,1,6,10) ) ifdfrm(ie)= .true.
110 IF ( ifvchk(vec,2,5,11) ) ifdfrm(ie)= .true.
111 IF ( ifvchk(vec,2,6,12) ) ifdfrm(ie)= .true.
112 IF ( ifvchk(vec,3,7, 9) ) ifdfrm(ie)= .true.
113 IF ( ifvchk(vec,3,8,10) ) ifdfrm(ie)= .true.
114 IF ( ifvchk(vec,4,7,11) ) ifdfrm(ie)= .true.
115 IF ( ifvchk(vec,4,8,12) ) ifdfrm(ie)= .true.
122 IF(ccurve(iedg,ie) /=
' ')
THEN
129 xcc(i)=xc(indx(i),ie)
130 ycc(i)=yc(indx(i),ie)
133 vec(1,1)=xcc(2)-xcc(1)
134 vec(1,2)=xcc(4)-xcc(3)
135 vec(1,3)=xcc(3)-xcc(1)
136 vec(1,4)=xcc(4)-xcc(2)
138 vec(2,1)=ycc(2)-ycc(1)
139 vec(2,2)=ycc(4)-ycc(3)
140 vec(2,3)=ycc(3)-ycc(1)
141 vec(2,4)=ycc(4)-ycc(2)
145 veclen = vec(1,i)**2 + vec(2,i)**2
146 veclen = sqrt(veclen)
147 vec(1,i)=vec(1,i)/veclen
148 vec(2,i)=vec(2,i)/veclen
154 IF ( ifvchk(vec,1,3,5) ) ifdfrm(ie)= .true.
155 IF ( ifvchk(vec,1,4,5) ) ifdfrm(ie)= .true.
156 IF ( ifvchk(vec,2,3,5) ) ifdfrm(ie)= .true.
157 IF ( ifvchk(vec,2,4,5) ) ifdfrm(ie)= .true.
168 real(DP) :: vec(3,12)
169 integer :: i1, i2, i3
172 real(DP) :: epsm, dot1, dot2, dot3, dot
177 dot1=vec(1,i1)*vec(1,i2)+vec(2,i1)*vec(2,i2)+vec(3,i1)*vec(3,i2)
178 dot2=vec(1,i2)*vec(1,i3)+vec(2,i2)*vec(2,i3)+vec(3,i2)*vec(3,i3)
179 dot3=vec(1,i1)*vec(1,i3)+vec(2,i1)*vec(2,i3)+vec(3,i1)*vec(3,i3)
185 IF (dot > epsm) iftmp= .true.
197 use size_m
, only : nx1, ny1, nz1
198 use geom, only : ifgmsh3, xm1, ym1, zm1
205 write(*,*)
"Oops: IFGMSH3"
208 CALL
genxyz(xm1,ym1,zm1,nx1,ny1,nz1)
215 subroutine genxyz (xml,yml,zml,nxl,nyl,nzl)
217 use size_m
, only : lx1, nelt, ndim
218 use input, only : ccurve, ifaxis
221 integer :: nxl, nyl, nzl
222 real(DP) :: xml(nxl,nyl,nzl,1),yml(nxl,nyl,nzl,1),zml(nxl,nyl,nzl,1)
224 real(DP) :: h(lx1,3,2), zgml(lx1,3)
227 integer :: ie, nfaces, iface, isid
236 call
linquad(xml,yml,zml,nxl,nyl,nzl)
240 call
setzgml(zgml,ie,nxl,nyl,nzl,ifaxis)
241 call
sethmat(h,zgml,nxl,nyl,nzl)
247 ccv = ccurve(iface,ie)
249 write(*,*)
"Oops: ccv = 's'"
253 write(*,*)
"Oops: ccv = 'e'"
259 ccv = ccurve(isid,ie)
261 write(*,*)
"Oops: ccv = 'C'"
274 use size_m
, only : lx1
275 use input, only : if3d
278 real(DP) :: h(lx1,3,2),zgml(lx1,3)
279 integer :: nxl, nyl, nzl
281 integer :: ix, iy, iz
284 h(ix,1,1)=(1.0-zgml(ix,1))*0.5
285 h(ix,1,2)=(1.0+zgml(ix,1))*0.5
288 h(iy,2,1)=(1.0-zgml(iy,2))*0.5
289 h(iy,2,2)=(1.0+zgml(iy,2))*0.5
293 h(iz,3,1)=(1.0-zgml(iz,3))*0.5
294 h(iz,3,2)=(1.0+zgml(iz,3))*0.5
306 use size_m
, only : lx1, nx1, nx3, ny1, nz1
307 use geom, only : ifgmsh3, ifrzer
308 use wz_m, only : zgm1
311 real(DP),
intent(out) :: zgml(lx1,3)
312 integer :: e, nxl, nyl, nzl
320 if (nxl == 3 .AND. .NOT. ifaxl)
then
326 elseif (ifgmsh3 .AND. nxl == nx3)
then
327 write(*,*)
"Oops: IFGMSH3"
329 call
copy(zgml(1,1),zgm3(1,1),nx3)
330 call
copy(zgml(1,2),zgm3(1,2),ny3)
331 call
copy(zgml(1,3),zgm3(1,3),nz3)
332 if (ifaxl .AND. ifrzer(e)) call
copy(zgml(1,2),zam3,ny3)
334 elseif (nxl == nx1 .and. nyl == ny1 .and. nzl == nz1)
then
335 call
copy(zgml(1,1),zgm1(1,1),nxl)
336 call
copy(zgml(1,2),zgm1(1,2),nyl)
337 call
copy(zgml(1,3),zgm1(1,3),nzl)
338 if (ifaxl .AND. ifrzer(e)) call
copy(zgml(1,2),zam1,ny1)
340 call
exitti(
'ABORT setzgml! $',nxl)
348 REAL(DP) FUNCTION dot(V1,V2,N)
353 real(DP) :: V1(n),V2(n)
360 sum = sum + v1(i)*v2(i)
369 use size_m
, only : ndim, nelt, lx1
370 use input, only : ccurve, ifaxis
373 integer :: nxl, nyl, nzl
374 real(DP) :: xl(nxl*nyl*nzl,*),yl(nxl*nyl*nzl,*),zl(nxl*nyl*nzl,*)
376 integer :: e, nedge, k
379 nedge = 4 + 8*(ndim-2)
385 if (ccurve(k,e) ==
'm') ifmid = .true.
388 if (lx1 == 2) ifmid = .false.
390 write(*,*)
"Oops: ifmid"
393 call
xyzlin(xl(1,e),yl(1,e),zl(1,e),nxl,nyl,nzl,e,ifaxis)
402 subroutine xyzlin(xl,yl,zl,nxl,nyl,nzl,e,ifaxl)
404 use size_m
, only : lx1, ly1, lz1, ndim
405 use input, only : xc, yc, zc
408 integer :: nxl, nyl, nzl, e
409 real(DP) :: xl(nxl,nyl,nzl),yl(nxl,nyl,nzl),zl(nxl,nyl,nzl)
422 integer,
save :: indx(8) = (/ 1,2,4,3,5,6,8,7 /)
424 integer,
parameter :: ldw=4*lx1*ly1*lz1
425 real(DP) :: xcb(2,2,2),ycb(2,2,2),zcb(2,2,2),w(ldw)
428 real(DP) :: zgml(lx1,3),jx (lx1*2)
429 real(DP) :: jxt(lx1*2),jyt(lx1*2),jzt(lx1*2),zlin(2)
431 integer :: i, k, ndim2
433 call
setzgml(zgml,e,nxl,nyl,nzl,ifaxl)
449 xcb = reshape(xc(indx(1:ndim2),e), (/2,2,2/))
450 ycb = reshape(yc(indx(1:ndim2),e), (/2,2,2/))
451 zcb = reshape(zc(indx(1:ndim2),e), (/2,2,2/))
457 call
tensr3(xl,nxl,xcb,2,jx,jyt,jzt,w)
458 call
tensr3(yl,nxl,ycb,2,jx,jyt,jzt,w)
459 call
tensr3(zl,nxl,zcb,2,jx,jyt,jzt,w)
real(dp) function dot(V1, V2, N)
Compute Cartesian vector dot product.
subroutine transpose(a, lda, b, ldb)
subroutine xyzlin(xl, yl, zl, nxl, nyl, nzl, e, ifaxl)
Generate bi- or trilinear mesh.
logical function ifvchk(VEC, I1, I2, I3)
Take the dot product of the three components of VEC to see if it's zero.
subroutine fd_weights_full(xx, x, n, m, c)
This routine evaluates the derivative based on all points in the stencils. It is more memory efficien...
subroutine setzgml(zgml, e, nxl, nyl, nzl, ifaxl)
subroutine linquad(xl, yl, zl, nxl, nyl, nzl)
subroutine genxyz(xml, yml, zml, nxl, nyl, nzl)
subroutine sethmat(h, zgml, nxl, nyl, nzl)
subroutine gencoor()
Generate xyz coordinates for all elements. Velocity formulation : mesh 3 is used Stress formulation :...
subroutine setdef()
Set up deformed element logical switches.
subroutine exitti(stringi, idata)
subroutine tensr3(v, nv, u, nu, A, Bt, Ct, w)
Tensor product application of v = (C x B x A) u . NOTE – the transpose of B & C must be input...