26 character*132 jobnamef,fnequ
27 character*8 lakonfa(*),lakonfaloc
29 integer nk,iponoelfa(*),inoelfa(3,*),konfa(*),ipkonfa(*),ne,
30 & i,ndepnodes,index,nexp,nnor,nel,ielem,indexe,j,iel(100),
31 & jl(100),ial(100),ifi(100),indexx,k,l,ifix,nemin,jact,ixfree,
32 & node,idim,iponor(*),nodedesiinv(*),len,ndet(3),nsort(3)
34 real*8 co(3,*),xnor(*),xno(3,100),xi,et,coloc6(2,6),coloc8(2,8),
35 & xl(3,8),dd,xnoref(3),dot,xnorloc(3,3),det(3),sort(3)
37 data coloc6 /0.d0,0.d0,1.d0,0.d0,0.d0,1.d0,0.5d0,0.d0,
38 & 0.5d0,0.5d0,0.d0,0.5d0/
39 data coloc8 /-1.d0,-1.d0,1.d0,-1.d0,1.d0,1.d0,-1.d0,1.d0,
40 & 0.d0,-1.d0,1.d0,0.d0,0.d0,1.d0,-1.d0,0.d0/
45 if(jobnamef(len:len).eq.
' ')
exit 49 fnequ=jobnamef(1:len)//
'.equ' 50 open(20,file=fnequ(1:len+4),status=
'unknown',err=100)
51 close(20,status=
'delete',err=101)
52 open(20,file=fnequ(1:len+4),status=
'unknown',err=100)
55 102
format(
'**SUMMARY OF EUQATIONS FOR MESH-UPDATE ')
56 103
format(
'*EQUATION')
84 ielem=inoelfa(1,index)
85 if(lakonfa(ielem)(1:1).eq.
'S') nnor=1
89 write(*,*)
'*ERROR in normalsforequ_se: more ' 90 write(*,*)
' than 100 shell elements ' 91 write(*,*)
' share the same node' 97 index=inoelfa(3,index)
108 indexe=ipkonfa(iel(j))
109 indexx=iponor(indexe+jl(j))
112 xno(k,j)=xnor(indexx+k)
122 lakonfaloc=lakonfa(iel(j))
123 if(lakonfa(iel(j))(2:2).eq.
'3')
then 133 elseif(lakonfa(iel(j))(2:2).eq.
'4')
then 143 elseif(lakonfa(iel(j))(2:2).eq.
'6')
then 153 elseif(lakonfa(iel(j))(2:2).eq.
'8')
then 165 dd=dsqrt(xno(1,j)**2+xno(2,j)**2+xno(3,j)**2)
166 if(dd.lt.1.d-10)
then 167 write(*,*)
'*ERROR in normalsforequ_se: size ' 168 write(*,*)
' of estimatedshell normal in 169 &node ',i,
' element ',iel(j)
170 write(*,*)
' is smaller than 1.e-10' 192 if(ial(j).ne.0) cycle
202 if(iel(j).lt.nemin)
then 208 if(nemin.eq.ne+1)
exit 212 xnoref(j)=xno(j,jact)
224 if(ial(j).eq.2) cycle
228 dot=xno(1,j)*xnoref(1)+xno(2,j)*xnoref(2)+
231 if(dot.gt.0.939693d0)
then 232 if((lakonfa(iel(j))(1:3).eq.
233 & lakonfa(iel(jact))(1:3))
235 & ((lakonfa(iel(j))(1:1).eq.
'S').and.
236 & (lakonfa(iel(jact))(1:1).eq.
'S')))
239 if(dot.lt.0.999962d0) nnor=2
242 if((lakonfa(iel(j))(1:1).eq.
'S').and.
243 & (lakonfa(iel(jact))(1:1).eq.
'S'))
then 249 if(dot.gt.-0.999962)
then 252 write(*,*)
'*INFO in gen3dnor: in some 253 &nodes opposite normals are defined' 258 if(dot.gt.0.999962d0)
then 259 if((lakonfa(iel(j))(1:3).eq.
260 & lakonfa(iel(jact))(1:3))
262 & ((lakonfa(iel(j))(1:1).eq.
'S').and.
263 & (lakonfa(iel(jact))(1:1).eq.
'S')))
266 if((lakonfa(iel(j))(1:1).eq.
'S').and.
267 & (lakonfa(iel(jact))(1:1).eq.
'S'))
then 273 if(dot.gt.-0.999962)
then 276 write(*,*)
'*INFO in gen3dnor: in some 277 &nodes opposite normals are defined' 294 xnoref(k)=xnoref(k)+xno(k,j)
298 dd=dsqrt(xnoref(1)**2+xnoref(2)**2+xnoref(3)**2)
299 if(dd.lt.1.d-10)
then 300 write(*,*)
'*ERROR in gen3dnor: size of' 301 write(*,*)
' estimated shell normal is' 302 write(*,*)
' smaller than 1.e-10' 306 xnoref(j)=xnoref(j)/dd
317 iponor(ipkonfa(iel(j))+jl(j))=ixfree
318 elseif(j.ne.jact)
then 319 iponor(ipkonfa(iel(j))+jl(j))=
320 & iponor(ipkonfa(iel(jact))+jl(jact))
330 xnor(ixfree+j)=xnoref(j)
342 if(nodedesiinv(i).eq.0)
then 354 elseif(nexp.eq.1)
then 357 xnorloc(4-l,j)=xnor(ixfree+1-l)
358 sort(4-l)=dabs(xnor(ixfree+1-l))
361 call dsort(sort,nsort,3,2)
363 write(20,104) i,nsort(3),xnorloc(nsort(3),1),
364 & i,nsort(2),xnorloc(nsort(2),1),
365 & i,nsort(1),xnorloc(nsort(1),1)
369 elseif(nexp.eq.2)
then 373 xnorloc(4-l,j)=xnor(ixfree+1-l-k)
382 det(1)=dabs(xnorloc(1,1)*xnorloc(2,2)-
383 & xnorloc(1,2)*xnorloc(2,1))
384 det(2)=dabs(xnorloc(1,1)*xnorloc(3,2)-
385 & xnorloc(1,2)*xnorloc(3,1))
386 det(3)=dabs(xnorloc(2,1)*xnorloc(3,2)-
387 & xnorloc(2,2)*xnorloc(3,1))
388 call dsort(det,ndet,3,2)
390 if(ndet(3).eq.1)
then 393 if((dabs(xnorloc(1,1)).gt.1.d-5).and.
394 & (dabs(xnorloc(2,2)).gt.1.d-5))
then 396 write(20,107) i,1,xnorloc(1,1),
399 write(20,107) i,2,xnorloc(2,2),
403 write(20,107) i,2,xnorloc(2,1),
406 write(20,107) i,1,xnorloc(1,2),
409 elseif(ndet(3).eq.2)
then 412 if((dabs(xnorloc(1,1)).gt.1.d-5).and.
413 & (dabs(xnorloc(3,2)).gt.1.d-5))
then 415 write(20,107) i,1,xnorloc(1,1),
418 write(20,107) i,3,xnorloc(3,2),
422 write(20,107) i,3,xnorloc(3,1),
425 write(20,107) i,1,xnorloc(1,2),
428 elseif(ndet(3).eq.3)
then 431 if((dabs(xnorloc(2,1)).gt.1.d-5).and.
432 & (dabs(xnorloc(3,2)).gt.1.d-5))
then 434 write(20,107) i,2,xnorloc(2,1),
437 write(20,107) i,3,xnorloc(3,2),
441 write(20,107) i,3,xnorloc(3,1),
444 write(20,107) i,2,xnorloc(2,2),
451 104
format(3(i10,
",",i1,
",",e20.13,
","))
452 105
format(1(i10,
",",i1,
",",i1,
","))
454 107
format(2(i10,
",",i1,
",",e20.13,
","))
461 100
write(*,*)
'*ERROR in openfile: could not open file ',
464 101
write(*,*)
'*ERROR in openfile: could not delete file ',
subroutine norshell8(xi, et, xl, xnor)
Definition: norshell8.f:20
subroutine norshell4(xi, et, xl, xnor)
Definition: norshell4.f:20
subroutine norshell6(xi, et, xl, xnor)
Definition: norshell6.f:20
subroutine dsort(dx, iy, n, kflag)
Definition: dsort.f:6
subroutine norshell3(xi, et, xl, xnor)
Definition: norshell3.f:20