2
! CalculiX - A 3-dimensional finite element program
3
! Copyright (C) 1998-2015 Guido Dhondt
5
! This program is free software; you can redistribute it and/or
6
! modify it under the terms of the GNU General Public License as
7
! published by the Free Software Foundation(version 2);
10
! This program is distributed in the hope that it will be useful,
11
! but WITHOUT ANY WARRANTY; without even the implied warranty of
12
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
! GNU General Public License for more details.
15
! You should have received a copy of the GNU General Public License
16
! along with this program; if not, write to the Free Software
17
! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
subroutine cyclicsymmetrymodels(inpc,textpart,set,
21
& ialset,nset,tieset,tietol,co,nk,ipompc,nodempc,
22
& coefmpc,nmpc,nmpc_,ikmpc,ilmpc,mpcfree,rcs,zcs,ics,nr,nz,
23
& rcs0,zcs0,ncs_,cs,labmpc,istep,istat,n,iline,ipol,inl,
24
& ipoinp,inp,ntie,mcs,lprev,ithermal,rcscg,rcs0cg,zcscg,
25
& zcs0cg,nrcg,nzcg,jcs,kontri,straight,ne,ipkon,kon,
26
& lakon,lcs,ifacetet,inodface,ipoinpc,maxsectors,
27
& trab,ntrans,ntrans_,jobnamec,vold,cfd,mi,iaxial)
29
! reading the input deck: *CYCLIC SYMMETRY MODEL
31
! several cyclic symmetry parts can be defined for one and the
32
! same model; for each part there must be a *CYCLIC SYMMETRY MODEL
35
! cs(1,mcs): # segments in 360 degrees
36
! cs(2,mcs): minimum node diameter
37
! cs(3,mcs): maximum node diameter
38
! cs(4,mcs): # nodes on the independent side (for fluids: upper bound)
39
! cs(5,mcs): # sectors to be plotted
40
! cs(6..8,mcs): first point on cyclic symmetry axis
41
! cs(9..11,mcs): second point on cylic symmetry axis; turning
42
! the slave surface clockwise about the cyclic symmetry axis
43
! while looking from the first point to the second point one
44
! arrives at the master surface without leaving the body
45
! cs(12,mcs): -1 (denotes a cylindrical coordinate system)
46
! cs(13,mcs): number of the element set
47
! cs(14,mcs): sum of previous independent nodes
48
! cs(15,mcs): cos(angle); angle = 2*pi/cs(1,mcs)
49
! cs(16,mcs): sin(angle)
50
! cs(17,mcs): number of tie constraint
54
logical triangulation,calcangle,nodesonaxis,check,exist
56
character*1 inpc(*),depkind,indepkind
58
character*20 labmpc(*)
60
character*81 set(*),depset,indepset,tieset(3,*),elset
61
character*132 textpart(16),jobnamec(*)
63
integer istartset(*),iendset(*),ialset(*),ipompc(*),ifaces,
64
& nodempc(3,*),itiecyc,ntiecyc,iaxial,nopes,nelems,m,indexe,
65
& nset,istep,istat,n,key,i,j,k,nk,nmpc,nmpc_,mpcfree,ics(*),
66
& nr(*),nz(*),jdep,jindep,l,noded,ikmpc(*),ilmpc(*),lcs(*),
67
& kflag,node,ncsnodes,ncs_,iline,ipol,inl,ipoinp(2,*),nneigh,
68
& inp(3,*),itie,iset,ipos,mcs,lprev,ntie,ithermal,ncounter,
69
& nrcg(*),nzcg(*),jcs(*),kontri(3,*),ne,ipkon(*),kon(*),nodei,
70
& ifacetet(*),inodface(*),ipoinpc(0:*),maxsectors,id,jfaces,
71
& noden(2),ntrans,ntrans_,cfd,mi(*),ifaceq(8,6),ifacet(6,4),
72
& ifacew1(4,5),ifacew2(8,5),idof
74
real*8 tolloc,co(3,*),coefmpc(*),rcs(*),zcs(*),rcs0(*),zcs0(*),
75
& csab(7),xn,yn,zn,dd,xap,yap,zap,tietol(3,*),cs(17,*),xsectors,
76
& gsectors,x3,y3,z3,phi,rcscg(*),rcs0cg(*),zcscg(*),zcs0cg(*),
77
& straight(9,*),x1,y1,z1,x2,y2,z2,zp,rp,dist,trab(7,*),
78
& vold(0:mi(2),*),calculated_angle,user_angle
80
! nodes per face for hex elements
82
data ifaceq /4,3,2,1,11,10,9,12,
83
& 5,6,7,8,13,14,15,16,
85
& 2,3,7,6,10,19,14,18,
86
& 3,4,8,7,11,20,15,19,
87
& 4,1,5,8,12,17,16,20/
89
! nodes per face for tet elements
91
data ifacet /1,3,2,7,6,5,
96
! nodes per face for linear wedge elements
98
data ifacew1 /1,3,2,0,
104
! nodes per face for quadratic wedge elements
106
data ifacew2 /1,3,2,9,8,7,0,0,
107
& 4,5,6,10,11,12,0,0,
108
& 1,2,5,4,7,14,10,13,
109
& 2,3,6,5,8,15,11,14,
110
& 3,1,4,6,9,13,12,15/
113
write(*,*) '*ERROR reading *CYCLIC SYMMETRY MODEL:'
114
write(*,*) ' *CYCLIC SYMMETRY MODEL should'
115
write(*,*) ' be placed before all step definitions'
126
if(textpart(i)(1:2).eq.'N=') then
127
read(textpart(i)(3:22),'(f20.0)',iostat=istat) xsectors
128
if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
129
&"*CYCLIC SYMMETRY MODEL%")
130
elseif(textpart(i)(1:8).eq.'CHECK=NO') then
132
elseif(textpart(i)(1:7).eq.'NGRAPH=') then
133
read(textpart(i)(8:27),'(f20.0)',iostat=istat) gsectors
134
if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
135
&"*CYCLIC SYMMETRY MODEL%")
136
elseif(textpart(i)(1:4).eq.'TIE=') then
137
read(textpart(i)(5:84),'(a80)',iostat=istat) tie
138
if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
139
&"*CYCLIC SYMMETRY MODEL%")
140
elseif(textpart(i)(1:6).eq.'ELSET=') then
141
read(textpart(i)(7:86),'(a80)',iostat=istat) elset
142
if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
143
&"*CYCLIC SYMMETRY MODEL%")
145
ipos=index(elset,' ')
149
& '*WARNING reading *CYCLIC SYMMETRY MODEL:'
150
write(*,*) ' parameter not recognized:'
152
& textpart(i)(1:index(textpart(i),' ')-1)
153
call inputwarning(inpc,ipoinpc,iline,
154
&"*CYCLIC SYMMETRY MODEL%")
158
if(xsectors.le.0) then
159
write(*,*) '*ERROR reading *CYCLIC SYMMETRY MODEL:'
160
write(*,*) ' the required parameter N'
161
write(*,*) ' is lacking on the *CYCLIC SYMMETRY MODEL'
162
write(*,*) ' keyword card or has a value <=0'
165
if(gsectors.lt.1) then
166
write(*,*) '*WARNING reading *CYCLIC SYMMETRY MODEL:'
167
write(*,*) ' cannot plot less than'
168
write(*,*) ' one sector: one sector will be plotted'
171
if(gsectors.gt.xsectors) then
172
write(*,*) '*WARNING reading *CYCLIC SYMMETRY MODEL:'
173
write(*,*) ' cannot plot more than'
174
write(*,*) ' ',xsectors,'sectors;',
175
& xsectors,' sectors will'
176
write(*,*) ' be plotted'
180
maxsectors=max(maxsectors,int(xsectors+0.5d0))
181
c iaxial=max(iaxial,maxsectors)
188
! determining the tie constraint
193
if((tieset(1,i)(1:80).eq.tie).and.
194
& (tieset(1,i)(81:81).eq.'P')) then
197
! fluid periodicity (translational)
199
call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
200
& ipoinp,inp,ipoinpc)
202
! translation vector from the slave surface to the
206
read(textpart(j)(1:20),'(f20.0)',iostat=istat)
211
! counting the number of faces on the master side (should be the
212
! same as on the slave side)
214
indepset=tieset(3,itie)
216
if(set(j).eq.indepset) exit
219
! max 8 nodes per face
221
cs(4,mcs)=(iendset(j)-istartset(j)+1)*8+0.5d0
223
elseif((tieset(1,i)(1:80).eq.tie).and.
224
& (tieset(1,i)(81:81).eq.'Z')) then
227
! fluid periodicity (rotational)
229
call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
230
& ipoinp,inp,ipoinpc)
232
! translation vector from the slave surface to the
236
read(textpart(j)(1:20),'(f20.0)',iostat=istat)
242
! counting the number of faces on the master side (should be the
243
! same as on the slave side)
245
indepset=tieset(3,itie)
247
if(set(j).eq.indepset) exit
250
! max 8 nodes per face
252
cs(4,mcs)=(iendset(j)-istartset(j)+1)*8+0.5d0
254
elseif((tieset(1,i)(1:80).eq.tie).and.
255
& (tieset(1,i)(81:81).ne.'C').and.
256
& (tieset(1,i)(81:81).ne.'T')) then
259
elseif((tieset(1,i)(81:81).ne.'C').and.
260
& (tieset(1,i)(81:81).ne.'T')) then
266
if(ntiecyc.eq.1) then
270
& '*ERROR reading *CYCLIC SYMMETRY MODEL:'
271
write(*,*) ' tie constraint is nonexistent'
272
call inputerror(inpc,ipoinpc,iline,
273
&"*CYCLIC SYMMETRY MODEL%")
278
cs(5,mcs)=gsectors+0.5
280
depset=tieset(2,itie)
281
indepset=tieset(3,itie)
282
tolloc=tietol(1,itie)
284
! determining the element set
287
if(elset.eq.' ') then
288
write(*,*) '*INFO reading *CYCLIC SYMMETRY MODEL:'
289
write(*,*) ' no element set given'
290
call inputinfo(inpc,ipoinpc,iline,
291
&"*CYCLIC SYMMETRY MODEL%")
294
if(set(i).eq.elset) then
300
write(*,*) '*ERROR reading *CYCLIC SYMMETRY MODEL:'
301
write(*,*) ' element set does not'
302
write(*,*) ' exist; '
303
call inputerror(inpc,ipoinpc,iline,
304
&"*CYCLIC SYMMETRY MODEL%")
309
call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
310
& ipoinp,inp,ipoinpc)
312
if((istat.lt.0).or.(key.eq.1)) then
313
write(*,*)'*ERROR reading *CYCLIC SYMMETRY MODEL:'
314
write(*,*) ' definition of the cyclic'
315
write(*,*) ' symmetry model is not complete'
320
if(ntrans.gt.ntrans_) then
321
write(*,*) '*ERROR reading *CYCLIC SYMMETRY MODEL:'
322
write(*,*) ' increase ntrans_'
327
read(textpart(i)(1:20),'(f20.0)',iostat=istat) csab(i)
328
trab(i,ntrans)=csab(i)
329
if(istat.gt.0) call inputerror(inpc,ipoinpc,iline,
330
&"*CYCLIC SYMMETRY MODEL%")
333
! cyclic coordinate system
337
! marker for cyclic symmetry axis
341
! check whether depset and indepset exist
342
! determine the kind of set (nodal or facial)
344
ipos=index(depset,' ')
346
depset(ipos:ipos)=depkind
348
if(set(i).eq.depset) exit
352
depset(ipos:ipos)=depkind
354
if(set(i).eq.depset) exit
357
write(*,*) '*ERROR reading *CYCLIC SYMMETRY MODEL:'
358
write(*,*) ' surface ',depset
359
write(*,*) ' has not yet been defined.'
365
ipos=index(indepset,' ')
367
indepset(ipos:ipos)=indepkind
369
if(set(i).eq.indepset) exit
373
indepset(ipos:ipos)=indepkind
375
if(set(i).eq.indepset) exit
378
write(*,*) '*ERROR reading *CYCLIC SYMMETRY MODEL:'
379
write(*,*) ' surface ',indepset
380
write(*,*) ' has not yet been defined.'
386
! unit vector along the rotation axis (xn,yn,zn)
391
dd=dsqrt(xn*xn+yn*yn+zn*zn)
396
! defining the indepset as a 2-D data field (axes: r=radial
397
! coordinate, z=axial coordinate): needed to allocate a node
398
! of the depset to a node of the indepset for the cyclic
402
do j=istartset(jindep),iendset(jindep)
403
if(ialset(j).gt.0) then
404
if(indepkind.eq.'T') then
406
! facial independent surface
409
nelems=int(ifaces/10)
410
jfaces=ifaces - nelems*10
413
if(lakon(nelems)(4:5).eq.'20') then
415
elseif(lakon(nelems)(4:4).eq.'2') then
417
elseif(lakon(nelems)(4:4).eq.'8') then
419
elseif(lakon(nelems)(4:5).eq.'10') then
421
elseif(lakon(nelems)(4:4).eq.'4') then
425
if(lakon(nelems)(4:4).eq.'6') then
432
if(lakon(nelems)(4:5).eq.'15') then
444
if(indepkind.eq.'T') then
445
if((lakon(nelems)(4:4).eq.'2').or.
446
& (lakon(nelems)(4:4).eq.'8')) then
447
node=kon(indexe+ifaceq(m,jfaces))
448
elseif((lakon(nelems)(4:4).eq.'4').or.
449
& (lakon(nelems)(4:5).eq.'10')) then
450
node=kon(indexe+ifacet(m,jfaces))
451
elseif(lakon(nelems)(4:4).eq.'6') then
452
node=kon(indexe+ifacew1(m,jfaces))
453
elseif(lakon(nelems)(4:5).eq.'15') then
454
node=kon(indexe+ifacew2(m,jfaces))
456
call nident(ics(lprev+1),node,l,id)
459
if(ics(lprev+id).eq.node) then
465
if(lprev+l.gt.ncs_) then
466
write(*,*) '*ERROR reading *CYCLIC SYMMETRY MODEL:'
467
write(*,*) ' increase ncs_'
470
do k=lprev+l,lprev+id+2,-1
476
xap=co(1,node)-csab(1)
477
yap=co(2,node)-csab(2)
478
zap=co(3,node)-csab(3)
481
zcs(lprev+id+1)=xap*xn+yap*yn+zap*zn
482
rcs(lprev+id+1)=dsqrt((xap-zcs(lprev+id+1)*xn)**2+
483
& (yap-zcs(lprev+id+1)*yn)**2+
484
& (zap-zcs(lprev+id+1)*zn)**2)
487
if(lprev+l.gt.ncs_) then
488
write(*,*) '*ERROR reading *CYCLIC SYMMETRY MODEL:'
489
write(*,*) ' increase ncs_'
494
xap=co(1,node)-csab(1)
495
yap=co(2,node)-csab(2)
496
zap=co(3,node)-csab(3)
499
zcs(l)=xap*xn+yap*yn+zap*zn
500
rcs(l)=dsqrt((xap-zcs(l)*xn)**2+
501
& (yap-zcs(l)*yn)**2+
502
& (zap-zcs(l)*zn)**2)
509
if(k.ge.ialset(j-1)) exit
512
write(*,*) '*ERROR reading *CYCLIC SYMMETRY MODEL:'
513
write(*,*) ' increase ncs_'
518
xap=co(1,node)-csab(1)
519
yap=co(2,node)-csab(2)
520
zap=co(3,node)-csab(3)
523
zcs(l)=xap*xn+yap*yn+zap*zn
524
rcs(l)=dsqrt((xap-zcs(l)*xn)**2+
525
& (yap-zcs(l)*yn)**2+
526
& (zap-zcs(l)*zn)**2)
533
! initialization of near2d
542
call dsort(rcs,nr,ncsnodes,kflag)
543
call dsort(zcs,nz,ncsnodes,kflag)
545
! check whether a tolerance was defined. If not, a tolerance
546
! is calculated as 0.5 % of the mean of the distance of every
547
! independent node to its nearest neighbour
549
if(tolloc.lt.0.d0) then
555
xap=co(1,nodei)-csab(1)
556
yap=co(2,nodei)-csab(2)
557
zap=co(3,nodei)-csab(3)
559
zp=xap*xn+yap*yn+zap*zn
560
rp=dsqrt((xap-zp*xn)**2+(yap-zp*yn)**2+(zap-zp*zn)**2)
562
call near2d(rcs0,zcs0,rcs,zcs,nr,nz,rp,zp,ncsnodes,noden,
565
dist=dist+dsqrt((co(1,nodei)-co(1,noden(2)))**2+
566
& (co(2,nodei)-co(2,noden(2)))**2+
567
& (co(3,nodei)-co(3,noden(2)))**2)
569
tolloc=1.d-10*dist/ncsnodes
570
write(*,*) '*INFO reading *CYCLIC SYMMETRY MODEL:'
571
write(*,*) ' no tolerance was defined'
572
write(*,*) ' in the *TIE option; a tolerance of ',
574
write(*,*) ' will be used'
578
! calculating the angle between dependent and independent
579
! side and check for nodes on the axis
581
! this angle may be different from 2*pi/xsectors: in that way
582
! the user can simulate fractional nodal diameters
584
! (x2,y2,z2): unit vector on the dependent side and orthogonal
585
! to the rotation axis
586
! (x3,y3,z3): unit vector on the independent side and orthogonal
587
! to the rotation axis
588
! (x1,y1,z1)=(x2,y2,z2)x(x3,y3,z3)
589
! points in the same direction of xn if the independent
590
! side is on the clockwise side of the dependent side if
591
! looking in the direction of xn
597
loop1: do i=istartset(jdep),iendset(jdep)
598
if(ialset(i).gt.0) then
600
! check whether dependent side is node based or
603
if(depkind.eq.'T') then
605
nelems=int(ifaces/10)
606
jfaces=ifaces - nelems*10
609
if(lakon(nelems)(4:5).eq.'20') then
611
elseif(lakon(nelems)(4:4).eq.'2') then
613
elseif(lakon(nelems)(4:4).eq.'8') then
615
elseif(lakon(nelems)(4:5).eq.'10') then
617
elseif(lakon(nelems)(4:4).eq.'4') then
621
if(lakon(nelems)(4:4).eq.'6') then
628
if(lakon(nelems)(4:5).eq.'15') then
640
if(depkind.eq.'T') then
641
if((lakon(nelems)(4:4).eq.'2').or.
642
& (lakon(nelems)(4:4).eq.'8')) then
643
noded=kon(indexe+ifaceq(m,jfaces))
644
elseif((lakon(nelems)(4:4).eq.'4').or.
645
& (lakon(nelems)(4:5).eq.'10')) then
646
noded=kon(indexe+ifacet(m,jfaces))
647
elseif(lakon(nelems)(4:4).eq.'6') then
648
noded=kon(indexe+ifacew1(m,jfaces))
649
elseif(lakon(nelems)(4:5).eq.'15') then
650
noded=kon(indexe+ifacew2(m,jfaces))
653
if(i.gt.istartset(jdep)) then
654
if(ialset(i).eq.ialset(i-1)) cycle loop1
660
xap=co(1,noded)-csab(1)
661
yap=co(2,noded)-csab(2)
662
zap=co(3,noded)-csab(3)
664
zp=xap*xn+yap*yn+zap*zn
665
rp=dsqrt((xap-zp*xn)**2+(yap-zp*yn)**2+(zap-zp*zn)**2)
667
if((.not.calcangle).and.(rp.gt.1.d-10)) then
673
call near2d(rcs0,zcs0,rcs,zcs,nr,nz,rp,zp,ncsnodes,node,
678
if(nodei.eq.noded) then
684
xap=co(1,nodei)-csab(1)
685
yap=co(2,nodei)-csab(2)
686
zap=co(3,nodei)-csab(3)
688
zp=xap*xn+yap*yn+zap*zn
689
rp=dsqrt((xap-zp*xn)**2+(yap-zp*yn)**2+(zap-zp*zn)**2)
691
if((.not.calcangle).and.(rp.gt.1.d-10)) then
700
phi=(x1*xn+y1*yn+z1*zn)/dabs(x1*xn+y1*yn+z1*zn)*
701
& dacos(x2*x3+y2*y3+z2*z3)
703
calculated_angle=dacos(x2*x3+y2*y3+z2*z3)
704
user_angle=6.28318531d0/cs(1,mcs)
705
if(dabs(calculated_angle-user_angle)/
706
& calculated_angle.gt.0.01d0) then
708
& '*ERROR reading *CYCLIC SYMMETRY MODEL'
709
write(*,*) ' number of segments does not'
710
write(*,*) ' agree with the geometry'
711
write(*,*) ' angle based on N:',
712
& user_angle*57.29577951d0
713
write(*,*)' angle based on the geometry:',
714
& calculated_angle*57.29577951d0
718
write(*,*) '*INFO in cyclicsymmetrymodels: angle'
719
write(*,*)' check is deactivated by the user;'
720
write(*,*) ' the real geometry is used for'
721
write(*,*) ' the calculation of the segment'
733
if(k.ge.ialset(i-1)) exit
736
xap=co(1,noded)-csab(1)
737
yap=co(2,noded)-csab(2)
738
zap=co(3,noded)-csab(3)
740
zp=xap*xn+yap*yn+zap*zn
741
rp=dsqrt((xap-zp*xn)**2+(yap-zp*yn)**2+(zap-zp*zn)**2)
743
if((.not.calcangle).and.(rp.gt.1.d-10)) then
749
call near2d(rcs0,zcs0,rcs,zcs,nr,nz,rp,zp,ncsnodes,node,
754
if(nodei.eq.noded) then
760
xap=co(1,nodei)-csab(1)
761
yap=co(2,nodei)-csab(2)
762
zap=co(3,nodei)-csab(3)
764
zp=xap*xn+yap*yn+zap*zn
765
rp=dsqrt((xap-zp*xn)**2+(yap-zp*yn)**2+(zap-zp*zn)**2)
767
if((.not.calcangle).and.(rp.gt.1.d-10)) then
776
phi=(x1*xn+y1*yn+z1*zn)/dabs(x1*xn+y1*yn+z1*zn)*
777
& dacos(x2*x3+y2*y3+z2*z3)
779
calculated_angle=dacos(x2*x3+y2*y3+z2*z3)
780
user_angle=6.28318531d0/cs(1,mcs)
781
if(dabs(calculated_angle-user_angle)
782
& /calculated_angle.gt.0.01d0) then
784
& '*ERROR reading *CYCLIC SYMMETRY MODEL'
785
write(*,*) ' number of segments does not'
786
write(*,*) ' agree with the geometry'
787
write(*,*) ' angle based on N:',
788
& user_angle*57.29577951d0
789
write(*,*) ' angle based on the geometry:'
790
& ,calculated_angle*57.29577951d0
802
! allocating a node of the depset to each node of the indepset
805
triangulation=.false.
807
! opening a file to store the nodes which are not connected
809
open(40,file='WarnNodeMissCyclicSymmetry.nam',status='unknown')
810
write(40,*) '*NSET,NSET=WarnNodeCyclicSymmetry'
811
write(*,*) '*INFO in cyclicsymmetrymodels:'
812
write(*,*) ' failed nodes (if any) are stored in file'
813
write(*,*) ' WarnNodeMissCyclicSymmetry.nam'
814
write(*,*) ' This file can be loaded into'
815
write(*,*) ' an active cgx-session by typing'
817
& ' read WarnNodeMissCyclicSymmetry.nam inp'
820
loop2: do i=istartset(jdep),iendset(jdep)
821
if(ialset(i).gt.0) then
823
! check whether dependent side is node based or
826
if(depkind.eq.'T') then
828
nelems=int(ifaces/10)
829
jfaces=ifaces - nelems*10
832
if(lakon(nelems)(4:5).eq.'20') then
834
elseif(lakon(nelems)(4:4).eq.'2') then
836
elseif(lakon(nelems)(4:4).eq.'8') then
838
elseif(lakon(nelems)(4:5).eq.'10') then
840
elseif(lakon(nelems)(4:4).eq.'4') then
844
if(lakon(nelems)(4:4).eq.'6') then
851
if(lakon(nelems)(4:5).eq.'15') then
863
if(depkind.eq.'T') then
864
if((lakon(nelems)(4:4).eq.'2').or.
865
& (lakon(nelems)(4:4).eq.'8')) then
866
noded=kon(indexe+ifaceq(m,jfaces))
867
elseif((lakon(nelems)(4:4).eq.'4').or.
868
& (lakon(nelems)(4:5).eq.'10')) then
869
noded=kon(indexe+ifacet(m,jfaces))
870
elseif(lakon(nelems)(4:4).eq.'6') then
871
noded=kon(indexe+ifacew1(m,jfaces))
872
elseif(lakon(nelems)(4:5).eq.'15') then
873
noded=kon(indexe+ifacew2(m,jfaces))
876
if(i.gt.istartset(jdep)) then
877
if(ialset(i).eq.ialset(i-1)) cycle loop2
883
! check whether cyclic MPC's have already been
884
! generated (e.g. for nodes belonging to several
885
! faces for face based dependent surfaces)
888
call nident(ikmpc,idof,nmpc,id)
890
if(ikmpc(id).eq.idof) then
891
if(labmpc(ilmpc(id))(1:6).eq.'CYCLIC') cycle
895
call generatecycmpcs(tolloc,co,nk,ipompc,nodempc,
896
& coefmpc,nmpc,ikmpc,ilmpc,mpcfree,rcs,zcs,ics,
897
& nr,nz,rcs0,zcs0,labmpc,
898
& mcs,triangulation,csab,xn,yn,zn,phi,noded,
899
& ncsnodes,rcscg,rcs0cg,zcscg,zcs0cg,nrcg,
900
& nzcg,jcs,lcs,kontri,straight,ne,ipkon,kon,lakon,
901
& ifacetet,inodface,ncounter,jobnamec,vold,cfd,mi,
909
if(k.ge.ialset(i-1)) exit
912
! check whether cyclic MPC's have already been
913
! generated (e.g. for nodes belonging to several
914
! faces for face based dependent surfaces)
917
call nident(ikmpc,idof,nmpc,id)
919
if(ikmpc(id).eq.idof) then
920
if(labmpc(ilmpc(id))(1:6).eq.'CYCLIC') cycle
924
call generatecycmpcs(tolloc,co,nk,ipompc,nodempc,
925
& coefmpc,nmpc,ikmpc,ilmpc,mpcfree,rcs,zcs,ics,
926
& nr,nz,rcs0,zcs0,labmpc,
927
& mcs,triangulation,csab,xn,yn,zn,phi,noded,
928
& ncsnodes,rcscg,rcs0cg,zcscg,zcs0cg,nrcg,
929
& nzcg,jcs,lcs,kontri,straight,ne,ipkon,kon,lakon,
930
& ifacetet,inodface,ncounter,jobnamec,vold,cfd,mi,
939
if(ncounter.ne.0) then
940
write(*,*) '*WARNING reading *CYCLIC SYMMETRY MODEL:'
941
write(*,*) ' for at least one dependent'
942
write(*,*) ' node in a cyclic symmetry definition no '
943
write(*,*) ' independent counterpart was found'
944
c next line was commented on 19/04/2012
949
! ics contains the master (independent) nodes
952
call isortii(ics,nr,ncsnodes,kflag)
953
cs(4,mcs)=ncsnodes+0.5
956
! check orientation of (xn,yn,zn) (important for copying of base
957
! sector in arpackcs)
960
csab(4)=2.d0*csab(1)-csab(4)
961
csab(5)=2.d0*csab(2)-csab(5)
962
csab(6)=2.d0*csab(3)-csab(6)
969
call getnewline(inpc,textpart,istat,n,key,iline,ipol,inl,
970
& ipoinp,inp,ipoinpc)