85 . X ,XREFC ,IX ,GEO ,PM ,
86 . MS ,TINER ,THKE ,IHBE ,PARTSAV ,
87 . V ,IPART ,MSC ,INC ,AREA ,
88 . I8MI ,IGEO ,ETNOD ,IMID ,IPROP ,
89 . NSHNOD ,STC ,SH4TREE ,MCP ,MCPS ,
90 . TEMP ,MS_LAYER,ZI_LAYER,MS_LAYERC,ZI_LAYERC,
91 . MSZ2C ,ZPLY ,ISUBSTACK,NLAY ,ELBUF_STR,
92 . STACK ,THKI ,RNOISE ,DRAPE ,NINTEMP ,
93 . PERTURB ,IX1 ,IX2 ,IX3 ,IX4 ,
103 use element_mod ,
only : nixc
109#include "implicit_f.inc"
113#include "mvsiz_p.inc"
117#include "com01_c.inc"
118#include "com04_c.inc"
119#include "remesh_c.inc"
120#include "param_c.inc"
121#include "scr03_c.inc"
122#include "scr12_c.inc"
123#include "scr17_c.inc"
124#include "scr22_c.inc"
125#include "vect01_c.inc"
126#include "drape_c.inc"
130 INTEGER IX(NIXC,*),IPART(*),IHBE,IMID,IPROP,
131 . IGEO(NPROPGI,*),NSHNOD(*), SH4TREE(,*),
132 . ISUBSTACK,NLAY,PERTURB(NPERTURB),IDRAPE
133 INTEGER,
DIMENSION(MVSIZ),
INTENT(IN) :: IX1,IX2,IX3,IX4
134 INTEGER ,
INTENT(IN) :: NINTEMP
136 INTEGER,
DIMENSION(SCDRAPE) :: INDX
137 my_real,
DIMENSION(MVSIZ),
INTENT(IN) :: AREA
139 . X(3,*), GEO(NPROPG,*), PM(NPROPM,*), MS(*), TINER(*),THKE(*),
140 . v(3,*),partsav(20,*),msc(*),inc(*),
141 . etnod(*), stc(*),mcp(*),mcps(*),temp(*),
142 . ms_layer(numnod,*), zi_layer(numnod,*),xrefc(4,3,*),
143 . ms_layerc(numelc,*),zi_layerc(numelc,*),msz2c(*),zply(*),thki(*),
147 TYPE(elbuf_struct_),
TARGET :: ELBUF_STR
148 TYPE (STACK_PLY) :: STACK
149 TYPE (DRAPE_) ,
DIMENSION(NUMELC_DRAPE+NUMELTG_DRAPE),
TARGET :: DRAPE
153 INTEGER I,II,J,N,IP,I1,I2,I3,I4,MATLY,IPTHK,IPMAT,IPPOS,
154 . ERRM,IDPROP,IPID,IPPID,ISTACK(MVSIZ,NPT),ISLV,IPID_LY,
155 . ipang,nthk,igtyp,igmat,ilay,nptt,it,iint,ipgmat,max_nptt,
156 . nslice,ipos,ipt,ipt_all,ie,nlay_max
157 CHARACTER(LEN=NCHARTITLE) :: TITR
159 . fac,mst,dms,thickt,thkly,laypos,ins,mzi,ems_nptt,et,zj,
160 . xx,yy,zz,xy,yz,zx,msl,xil,ms_nptt,thinning,f_offset,scale,
163 . ems_layer(mvsiz,nlay)
164 my_real,
DIMENSION(:),
ALLOCATABLE :: posly,ratio_thkly, thk_it,pos_it
165 my_real,
DIMENSION(MVSIZ) :: rho,rhocp,ems,emscp,xi,thk
168 TYPE (DRAPE_PLY_),
POINTER :: DRAPE_PLY
169 my_real A_GAUSS(9,9),W_GAUSS(9,9)
175 2 -.577350269189626,0.577350269189626,0. ,
178 3 -.774596669241483,0. ,0.774596669241483,
181 4 -.861136311594053,-.339981043584856,0.339981043584856,
182 4 0.861136311594053,0. ,0. ,
184 5 -.906179845938664,-.538469310105683,0. ,
185 5 0.538469310105683,0.906179845938664,0. ,
187 6 -.932469514203152,-.661209386466265,-.238619186083197,
188 6 0.238619186083197,0.661209386466265,0.932469514203152,
190 7 -.949107912342759,-.741531185599394,-.405845151377397,
191 7 0. ,0.405845151377397,0.741531185599394,
192 7 0.949107912342759,0. ,0. ,
193 8 -.960289856497536,-.796666477413627,-.525532409916329,
194 8 -.183434642495650,0.183434642495650,0.525532409916329,
195 8 0.796666477413627,0.960289856497536,0. ,
196 9 -.968160239507626,-.836031107326636,-.613371432700590,
197 9 -.324253423403809,0. ,0.324253423403809,
198 9 0.613371432700590,0.836031107326636,0.968160239507626/
206 3 0.555555555555556,0.888888888888889,0.555555555555556,
209 4 0.347854845137454,0.652145154862546,0.652145154862546,
210 4 0.347854845137454,0. ,0. ,
212 5 0.236926885056189,0.478628670499366,0.568888888888889,
213 5 0.478628670499366,0.236926885056189,0. ,
215 6 0.171324492379170,0.360761573048139,0.467913934572691,
216 6 0.467913934572691,0.360761573048139,0.171324492379170,
218 7 0.129484966168870,0.279705391489277,0.381830050505119,
219 7 0.417959183673469,0.381830050505119,0.279705391489277,
220 7 0.129484966168870,0. ,0. ,
221 8 0.101228536290376,0.222381034453374,0.313706645877887,
222 8 0.362683783378362,0.362683783378362,0.313706645877887,
223 8 0.222381034453374,0.101228536290376,0. ,
224 9 0.081274388361574,0.180648160694857,0.260610696402935,
225 9 0.312347077040003,0.330239355001260,0.312347077040003,
226 9 0.260610696402935,0.180648160694857,0.081274388361574/
228 igtyp=nint(geo(12,iprop))
229 igmat = igeo(98,iprop)
236 IF(igtyp == 51 .OR. igtyp == 52)
THEN
238 max_nptt =
max(max_nptt ,elbuf_str%BUFLY(ilay)%NPTT)
240 ALLOCATE(thk_it(max_nptt),pos_it(max_nptt))
242 ALLOCATE(thk_it(0),pos_it(0))
244 nlay_max =
max(nlay, npt)
245 ALLOCATE(posly(nlay_max*max_nptt),ratio_thkly(nlay_max*max_nptt))
247 IF ((igtyp == 17 .OR. igtyp == 51) .AND. igmat < 0 )
THEN
250 IF (ndrape == 0)
THEN
251 IF (thke(i)== zero)
THEN
252 thk(i) = stack%GEO(1,isubstack)
257 thki(i) = stack%GEO(1,isubstack)
258 ELSEIF (ndrape > 0)
THEN
263 IF (nperturb /= 0)
THEN
265 IF (perturb(j) == 1 .AND. rnoise(j,i+nft) /= zero)
THEN
266 thk(i) = thk(i) * rnoise(j,i+nft)
267 thke(i) = thke(i) * rnoise(j,i+nft)
268 thki(i) = thki(i) * rnoise(j,i+nft)
274 rhocp(i) = pm(69,imid)
275 IF(thk(i) == zero.AND.igtyp/=0)
THEN
278 . anmode=aninfo_blind_1,
283 ELSEIF (igtyp == 52 .OR.
284 . ((igtyp == 17 .OR. igtyp == 51) .AND. igmat > 0))
THEN
287 IF (ndrape == 0)
THEN
288 IF (thke(i)== zero)
THEN
289 thk(i) = stack%GEO(1,isubstack)
294 thki(i) = stack%GEO(1,isubstack)
295 ELSEIF (ndrape > 0)
THEN
299 rho(i) = stack%PM(1,isubstack)
300 rhocp(i) = stack%PM(15,isubstack)* rho(i)/stack%PM(14,isubstack)
302 IF (nperturb /= 0)
THEN
304 IF (perturb(j) == 1 .AND. rnoise(j,i+nft) /= zero)
THEN
305 thk(i) = thk(i) * rnoise(j,i+nft)
306 thke(i) = thke(i) * rnoise(j,i+nft)
307 thki(i) = thki(i) * rnoise(j,i+nft)
312 IF(thk(i) == zero.AND.igtyp/=0)
THEN
315 . anmode=aninfo_blind_1,
324 IF (thke(i) == zero)
THEN
325 thk(i) = geo(1,iprop)
333 IF (nperturb /= 0)
THEN
335 IF (perturb(j) == 1 .AND. rnoise(j,i+nft) /= zero)
THEN
336 thk(i) = thk(i) * rnoise(j,i+nft)
337 thke(i) = thke(i) * rnoise(j,i+nft)
338 thki(i) = thki(i) * rnoise(j,i+nft)
344 rhocp(i) = pm(69,imid)
345 IF(thk(i) == zero.AND.igtyp/=0)
THEN
348 . anmode=aninfo_blind_1,
356 IF (igtyp == 11 .OR. igtyp == 16)
THEN
365 thkly = geo(i1,iprop)*thk(i)
366 matly = igeo(i2,iprop)
367 ems(i) = ems(i) + pm(89,matly)*thkly*area(i)*fourth
369 mst = rho(i)*thk(i)*area(i)*fourth
370 dms = abs(ems(i)-mst)/mst
375 IF (dms > em02) errm = 1
377 idprop = igeo(1,iprop)
379 . igeo(npropgi-ltitr+1,iprop),ltitr)
381 . msgtype=msgwarning,
382 . anmode=aninfo_blind_2,
384 . c1=titr,i2=ix(nixc,nft+i),
390 ELSEIF(igtyp == 17 )
THEN
408 thickt = stack%GEO(1 ,isubstack)
409 thkly = stack%GEO(i3 ,isubstack)*thk(i)
410 matly = stack%IGEO(i2,isubstack)
411 ems(i) = ems(i) + pm(89,matly)*thkly*area(i)*fourth
412 ems_layer(i,n) = pm(89,matly)*thkly*area(i)*fourth
413 mzi = mzi + ems_layer(i,n)*stack%GEO(i4 ,isubstack)
414 ipid = stack%IGEO(i1, isubstack)
415 istack(i,n) = igeo(102,ipid)
417 mst = rho(i)*thk(i)*area(i)*fourth
418 dms = abs(ems(i)-mst)/mst
419 IF(dms > em02) errm = 1
422 idprop = igeo(1,iprop)
424 . igeo(npropgi-ltitr+1,iprop),ltitr)
426 . msgtype=msgwarning,
427 . anmode=aninfo_blind_2,
429 . c1=titr,i2=ix(nixc,nft+i),
436 IF(abs(stack%GEO(i4 ,isubstack)) < em15)
437 . stack%GEO(i4 ,isubstack)=zero
439 IF(abs(mzi) > em02)
THEN
443 stack%GEO(i4 ,isubstack) = stack%GEO(i4 ,isubstack) - dms
458 thickt = stack%GEO(1 ,isubstack)
459 thkly = stack%GEO(i3 ,isubstack)*thk(i)
460 matly = stack%IGEO(i2,isubstack)
461 ems(i) = ems(i) + pm(89,matly)*thkly*area(i)*fourth
462 ems_layer(i,n) = pm(89,matly)*thkly*area(i)*fourth
463 mzi = mzi + ems_layer(i,n)*stack%GEO(i4 ,isubstack)
464 ipid = stack%IGEO(i1, isubstack)
465 istack(i,n) = igeo(102,ipid)
468 thick_drape = drape(ie)%THICK
469 scale = thk(i)/thick_drape
475 ip = drape(ie)%INDX_PLY(n)
477 drape_ply => drape(ie)%DRAPE_PLY(ip)
478 thinning = drape_ply%RDRAPE(1,1)
479 thickt = stack%GEO(1 ,isubstack)
480 thkly = stack%GEO(i3 ,isubstack)*thickt
481 thkly = thkly*thinning
483 matly = stack%IGEO(i2,isubstack)
484 ems(i) = ems(i) + pm(89,matly)*thkly*area(i)*fourth*scale
485 ems_layer(i,n) = pm(89,matly)*thkly*area(i)*fourth *scale
486 ratio_thkly(n) = thkly/thick_drape
488 posly(n) = -half + half*ratio_thkly(n)
490 posly(n) = posly(n-1)
491 . + half*(ratio_thkly(n)+ratio_thkly(n-1))
494 mzi = mzi + ems_layer(i,n)*posly(n)
495 ipid = stack%IGEO(i1, isubstack)
498 thickt = stack%GEO(1 ,isubstack)
499 thkly = stack%GEO(i3 ,isubstack)*thickt
500 matly = stack%IGEO(i2,isubstack)
502 ems(i) = ems(i) + pm(89,matly)*thkly*area(i)*fourth*scale
503 ems_layer(i,n) = pm(89,matly)*thkly*area(i)*fourth*scale
504 ratio_thkly(n) = thkly/thick_drape
506 posly(n) = -half + half*ratio_thkly(n)
508 posly(n) = posly(n-1)
509 . + half*(ratio_thkly(n)+ratio_thkly(n-1))
511 mzi = mzi + ems_layer(i,n)*posly(n)
512 ipid = stack%IGEO(i1, isubstack)
513 istack(i,n) = igeo(102,ipid)
517 mst = rho(i)*thk(i)*area(i)*fourth
518 dms = abs(ems(i)-mst)/mst
519 IF(dms > em02) errm = 1
522 idprop = igeo(1,iprop)
524 . igeo(npropgi-ltitr+1,iprop),ltitr)
526 . msgtype=msgwarning,
527 . anmode=aninfo_blind_2,
529 . c1=titr,i2=ix(nixc,nft+i),
536 IF(abs(stack%GEO(i4 ,isubstack)) < em15)
537 . stack%GEO(i4 ,isubstack)=zero
539 IF(abs(mzi) > em02)
THEN
543 stack%GEO(i4 ,isubstack) = stack%GEO(i4 ,isubstack) - dms
549 ELSEIF (igtyp == 51 .OR. igtyp == 52 )
THEN
559 ipos = igeo(99,iprop)
560 thickt = stack%GEO(1,isubstack)
561 zshift = geo(199,iprop)
562 IF(ipos == 2 ) zshift = - zshift /
max(thickt,em20)
563 IF(idrape == 0 )
THEN
568 scale = thk(i)/thickt
570 nptt = elbuf_str%BUFLY(ilay)%NPTT
575 ipid = stack%IGEO(i1,isubstack)
576 iint = igeo(47,iprop)
577 thickt = stack%GEO(1,isubstack)
579 thkly = stack%GEO(i3,isubstack)*thickt
580 laypos = stack%GEO(i4,isubstack)
581 ipid_ly = stack%IGEO(i1,isubstack)
582 matly = stack%IGEO(i2,isubstack)
585 thk_it(it) = thkly/nptt
586 ratio_thkly(ipt) = thk_it(it)/thickt
588 posly(ipt) = zshift + half*ratio_thkly(ipt)
590 posly(ipt) = posly(ipt-1)
591 . + half*(ratio_thkly(ipt) + ratio_thkly(ipt-1))
593 pos_it(it) = posly(ipt)*thk(i)
595 ELSEIF(iint == 2)
THEN
596 thkly = stack%GEO(i3,isubstack)*thickt
597 laypos = stack%GEO(i4,isubstack)
598 ipid_ly = stack%IGEO(i1,isubstack)
599 matly = stack%IGEO(i2,isubstack)
602 thk_it(it) = half*thkly*w_gauss(it,nptt)
605 posly(ipt) = zshift + half*ratio_thkly(ipt)
607 posly(ipt) = posly(ipt-1)
608 . + half*(ratio_thkly(ipt) + ratio_thkly(ipt-1))
610 pos_it(it) = posly(ipt)*thk(i)
615 thk_it(it) = thk_it(it)*scale
616 ems_nptt = pm(89,matly)*thk_it(it)*area(i)*fourth
617 ems(i) = ems(i) + ems_nptt
618 mzi = mzi + ems_nptt * pos_it(it)/thk(i)
620 ipt_all = ipt_all + nptt
623 mst = rho(i)*thk(i)*area(i)*fourth
624 dms = abs(ems(i)-mst)/mst
625 IF (dms > em02) errm = 1
626 IF(igtyp == 51 .AND. igmat < 0)
THEN
628 idprop = igeo(1,iprop)
630 . igeo(npropgi-ltitr+1,iprop),ltitr)
632 . msgtype=msgwarning,
633 . anmode=aninfo_blind_2,
635 . c1=titr,i2=ix(nixc,nft+i),
643 emscp(i)=rhocp(i)*thk(i)*area(i)*fourth
653 scale = thk(i)/thickt
655 nptt = elbuf_str%BUFLY(ilay)%NPTT
660 ipid = stack%IGEO(i1,isubstack)
661 iint = igeo(47,iprop)
662 thickt = stack%GEO(1,isubstack)
664 thkly = stack%GEO(i3,isubstack)*thickt
665 laypos = stack%GEO(i4,isubstack)
666 ipid_ly = stack%IGEO(i1,isubstack)
667 matly = stack%IGEO(i2,isubstack)
670 thk_it(it) = thkly/nptt
671 ratio_thkly(ipt) = thk_it(it)/thickt
673 posly(ipt) = zshift + half*ratio_thkly(ipt)
675 posly(ipt) = posly(ipt-1)
676 . + half*(ratio_thkly(ipt) + ratio_thkly(ipt-1))
678 pos_it(it) = posly(ipt)*thk(i)
680 ELSEIF(iint == 2)
THEN
681 thkly = stack%GEO(i3,isubstack)*thickt
682 laypos = stack%GEO(i4,isubstack)
683 ipid_ly = stack%IGEO(i1,isubstack)
684 matly = stack%IGEO(i2,isubstack)
687 thk_it(it) = half*thkly*w_gauss(it,nptt)
688 ratio_thkly(ipt) = thk_it(it)/thickt
690 posly(ipt) = zshift + half*ratio_thkly(ipt)
692 posly(ipt) = posly(ipt-1)
693 . + half*(ratio_thkly(ipt) + ratio_thkly(ipt-1))
695 pos_it(it) = posly(ipt)*thk(i)
700 thk_it(it) = scale*thk_it(it)
701 ems_nptt = pm(89,matly)*thk_it(it)*area(i)*fourth
702 ems(i) = ems(i) + ems_nptt
703 mzi = mzi + ems_nptt * pos_it(it)/thk(i)
705 ipt_all = ipt_all + nptt
708 thick_drape = drape(ie)%THICK
709 scale = thk(i)/thick_drape
712 nptt = elbuf_str%BUFLY(ilay)%NPTT
714 drape_ply => drape(ie)%DRAPE_PLY(ip)
715 nslice = drape_ply%NSLICE
720 ipid = stack%IGEO(i1,isubstack)
721 iint = igeo(47,iprop)
722 thickt = stack%GEO(1,isubstack)
724 thkly = stack%GEO(i3 ,isubstack)*thickt
725 ipid_ly = stack%IGEO(i1,isubstack)
726 matly = stack%IGEO(i2,isubstack)
729 thinning = drape_ply%RDRAPE(it,1)
730 thk_it(it) = thkly*thinning/nptt
731 ratio_thkly(ipt) = thk_it(it)/thick_drape
733 posly(ipt) = zshift + half*ratio_thkly(ipt)
735 posly(ipt) = posly(ipt-1)
736 . + half*(ratio_thkly(ipt)+ratio_thkly(ipt-1))
738 pos_it(it) = posly(ipt)*thk(i)
740 ELSEIF(iint == 2)
THEN
741 thkly = stack%GEO(i3 ,isubstack)*thickt
742 ipid_ly = stack%IGEO(i1,isubstack)
743 matly = stack%IGEO(i2,isubstack)
746 thinning = drape_ply%RDRAPE(it,1)
747 thk_it(it) = half*thkly*w_gauss(it,nptt)*thinning
748 ratio_thkly(ipt) = thk_it(it)/thick_drape
750 posly(ipt) = zshift + half*ratio_thkly(ipt)
752 posly(ipt) = posly(ipt-1)
753 . + half*(ratio_thkly(ipt)+ratio_thkly(ipt-1))
755 pos_it(it) = posly(ipt)*thk(i)
760 thk_it(it)= scale*thk_it(it)
761 ems_nptt = pm(89,matly)*thk_it(it)*area(i)*fourth
762 ems(i) = ems(i) + ems_nptt
763 mzi = mzi + ems_nptt * pos_it(it)/thk(i)
766 nptt = elbuf_str%BUFLY(ilay)%NPTT
771 ipid = stack%IGEO(i1,isubstack)
772 iint = igeo(47,iprop)
773 thickt = stack%GEO(1,isubstack)
775 thkly = stack%GEO(i3 ,isubstack)*thickt
776 ipid_ly = stack%IGEO(i1,isubstack)
777 matly = stack%IGEO(i2,isubstack)
780 thk_it(it) = thkly/nptt
781 ratio_thkly(ipt) = thk_it(it)/thick_drape
783 posly(ipt) = zshift + half*ratio_thkly(ipt)
785 posly(ipt) = posly(ipt-1)
786 . + half*(ratio_thkly(ipt)+ratio_thkly(ipt-1))
788 pos_it(it) = posly(ipt)*thk(i)
790 ELSEIF(iint == 2)
THEN
791 thkly = stack%GEO(i3 ,isubstack)*thickt
792 ipid_ly = stack%IGEO(i1,isubstack)
793 matly = stack%IGEO(i2,isubstack)
796 thk_it(it) = half*thkly*w_gauss(it,nptt)
797 ratio_thkly(ipt) = thk_it(it)/thk(i)/thick_drape
799 posly(ipt) = zshift + half*ratio_thkly(ipt)
801 posly(ipt) = posly(ipt-1)
802 . + half*(ratio_thkly(ipt)+ratio_thkly(ipt-1))
804 pos_it(it) = posly(ipt)*thk(i)
809 thk_it(it ) = scale*thk_it(it)
810 ems_nptt = pm(89,matly)*thk_it(it)*area(i)*fourth
811 ems(i) = ems(i) + ems_nptt
812 mzi = mzi + ems_nptt * pos_it(it)/thk(i)
815 ipt_all = ipt_all + nptt
819 mst = rho(i)*thk(i)*area(i)*fourth
820 dms = abs(ems(i)-mst)/mst
821 IF (dms > em02) errm = 1
822 IF(igtyp == 51 .AND. igmat < 0)
THEN
824 idprop = igeo(1,iprop)
826 . igeo(npropgi-ltitr+1,iprop),ltitr)
828 . msgtype=msgwarning,
829 . anmode=aninfo_blind_2,
831 . c1=titr,i2=ix(nixc,nft+i),
840 emscp(i)=rhocp(i)*thk(i)*area(i)*fourth
848 ems(i)=rho(i)*thk(i)*area(i)*fourth
853 emscp(i) = rhocp(i)*thk(i)*area(i)*fourth
873 IF(ishxfem_ply > 0 )
THEN
884 ms_layerc(ii,ip)= ems_layer(i,j)
887 thickt = stack%GEO(1 ,isubstack)
888 islv = igeo(32,iprop)
890 zi_layerc(ii,ip) = thickt*stack%GEO(i4 ,isubstack)
891 zply(ip) = zi_layerc(ii,ip)
894 zj = thickt*stack%GEO(i4 ,isubstack)
895 msz2c(ii) = msz2c(ii) + ems_layer(i,j)*zj*zj
900 IF (jthe > 0 .or. nintemp > 0)
THEN
901 IF (nintemp > 0 )
THEN
903 IF(temp(ix1(i))== zero) temp(ix1(i)) = pm(79,imid)
904 IF(temp(ix2(i))== zero) temp(ix2(i)) = pm(79,imid)
905 IF(temp(ix3(i))== zero) temp(ix3(i)) = pm(79,imid)
906 IF(temp(ix4(i))== zero) temp(ix4(i)) = pm(79,imid)
910 temp(ix1(i))= pm(79,imid)
911 temp(ix2(i))= pm(79,imid)
912 temp(ix3(i))= pm(79,imid)
913 temp(ix4(i))= pm(79,imid)
920 IF(iner_9_12 /= zero)
THEN
927 IF (igtyp == 11 .OR. igtyp == 16)
THEN
935 thickt= geo(200,iprop)
936 thkly = geo(i1,iprop)*thk(i)
937 laypos = geo(i3,iprop)*thk(i)
939 matly = igeo(i2,iprop)
940 msl = pm(89,matly)*thkly*area(i)*fourth
941 xil = msl*(area(i)/fac+thkly*thkly*one_over_12+laypos*laypos)
945 ELSEIF(igtyp == 17)
THEN
952 ipos = igeo(99,iprop)
953 thickt = stack%GEO(1,isubstack)
954 zshift = geo(199,iprop)
955 IF(ipos == 2 ) zshift = - zshift /
max(thickt,em20)
965 thickt= stack%GEO(1,isubstack)
966 thkly = stack%GEO(i3 ,isubstack )*thk(i)
967 laypos = stack%GEO(i4,isubstack)*thk(i)
968 matly = stack%IGEO(i2 ,isubstack)
969 msl = pm(89,matly)*thkly*area(i)*fourth
970 xil = msl*(area(i)/fac+thkly*thkly*one_over_12+laypos*laypos)
984 thickt= stack%GEO(1,isubstack)
985 thkly = stack%GEO(i3 ,isubstack )*thk(i)
986 laypos = stack%GEO(i4,isubstack)*thk(i)
987 matly = stack%IGEO(i2 ,isubstack)
988 msl = pm(89,matly)*thkly*area(i)*fourth
989 xil = msl*(area(i)/fac+thkly*thkly*one_over_12+laypos*laypos)
993 thick_drape = drape(ie)%THICK
994 scale = thk(i)/thick_drape
996 ip = drape(ie)%INDX_PLY(n)
998 drape_ply => drape(ie)%DRAPE_PLY(ip)
1003 thinning = drape_ply%RDRAPE(1,1)
1004 thickt= stack%GEO(1,isubstack)
1005 thkly = stack%GEO(i3 ,isubstack)*thickt
1006 thkly = thkly*thinning
1007 matly = stack%IGEO(i2,isubstack)
1008 ratio_thkly(n) = thkly/thick_drape
1010 posly(n) = zshift + half*ratio_thkly(n)
1012 posly(n) = posly(n-1)
1013 . + half*(ratio_thkly(n)+ratio_thkly(n-1))
1015 laypos = posly(n)*thk(i)
1017 msl = pm(89,matly)*thkly*area(i)*fourth
1018 xil = msl*(area(i)/fac+thkly*thkly*one_over_12+laypos*laypos)
1025 thickt= stack%GEO(1,isubstack)
1026 thkly = stack%GEO(i3 ,isubstack)*thickt
1027 matly = stack%IGEO(i2,isubstack)
1028 ratio_thkly(n) = thkly/thick_drape
1030 posly(n) = zshift + half*ratio_thkly(n)
1032 posly(n) = posly(n-1)
1033 . + half*(ratio_thkly(n)+ratio_thkly(n-1))
1035 laypos = posly(n)*thk(i)
1037 msl = pm(89,matly)*thkly*area(i)*fourth
1038 xil = msl*(area(i)/fac+thkly*thkly*one_over_12+laypos*laypos)
1045 ELSEIF (igtyp == 51 .OR. igtyp == 52)
THEN
1048 ipmat = ippid + nlay
1049 ipthk = ipang + nlay
1050 ippos = ipthk + nlay
1052 ipos = igeo(99,iprop)
1053 thickt = stack%GEO(1,isubstack)
1054 zshift = geo(199,iprop)
1055 IF(ipos == 2 ) zshift = - zshift /
max(thickt,em20)
1057 IF(idrape == 0)
THEN
1059 scale = thk(i)/thickt
1063 nptt = elbuf_str%BUFLY(ilay)%NPTT
1068 ipid_ly = stack%IGEO(i1,isubstack)
1069 matly = stack%IGEO(i2,isubstack)
1070 iint = igeo(47,iprop)
1072 thickt = stack%GEO(1,isubstack)
1073 thkly = stack%GEO(i3,isubstack)*thickt
1074 laypos = stack%GEO(i4 ,isubstack)*thickt
1077 thk_it(it) = thkly/nptt
1078 ratio_thkly(ipt) = thk_it(it)/thickt
1080 posly(ipt) = zshift + half*ratio_thkly(ipt)
1082 posly(ipt) = posly(ipt-1)
1083 . + half*(ratio_thkly(ipt) + ratio_thkly(ipt-1))
1085 pos_it(it) = posly(ipt)*thk(i)
1087 ELSEIF(iint == 2)
THEN
1088 thickt = stack%GEO(1,isubstack)
1089 thkly = stack%GEO(i3,isubstack)*thickt
1090 laypos = stack%GEO(i4 ,isubstack)*thickt
1093 thk_it(it) = half*thkly*w_gauss(it,nptt)
1094 ratio_thkly(ipt) = thk_it(it)/thickt
1096 posly(ipt) = zshift + half*ratio_thkly(ipt)
1098 posly(ipt) = posly(ipt-1)
1099 . + half*(ratio_thkly(ipt)+ratio_thkly(ipt-1))
1101 pos_it(it) = posly(ipt)*thk
1107 thk_it(it) = scale*thk_it(it)
1108 ms_nptt = pm(89,matly)*thk_it(it)*area(i)*fourth
1109 xil = ms_nptt*(area(i)/fac+thk_it(it)*thk_it(it)*one_over_12+
1110 . pos_it(it)*pos_it(it))
1113 ipt_all = ipt_all + nptt
1123 scale = thk(i)/thickt
1125 nptt = elbuf_str%BUFLY(ilay)%NPTT
1130 ipid_ly = stack%IGEO(i1,isubstack)
1131 matly = stack%IGEO(i2,isubstack)
1134 thickt = stack%GEO(1,isubstack)
1135 thkly = stack%GEO(i3,isubstack)*thickt
1136 laypos = stack%GEO(i4 ,isubstack)*thickt
1139 thk_it(it) = thkly/nptt
1140 ratio_thkly(ipt) = thk_it(it)/thickt
1142 posly(ipt) = zshift + half*ratio_thkly(ipt)
1144 posly(ipt) = posly(ipt-1)
1145 . + half*(ratio_thkly(ipt) + ratio_thkly(ipt-1))
1147 pos_it(it) = posly(ipt)*thk(i)
1149 ELSEIF(iint == 2)
THEN
1150 thickt = stack%GEO(1,isubstack)
1151 thkly = stack%GEO(i3,isubstack)*thickt
1152 laypos = stack%GEO(i4 ,isubstack)*thickt
1155 thk_it(it) = half*thkly*w_gauss(it,nptt)
1156 ratio_thkly(ipt) = thk_it(it)/thickt
1158 posly(ipt) = zshift + half*ratio_thkly(ipt)
1160 posly(ipt) = posly(ipt-1)
1161 . + half*(ratio_thkly(ipt)+ratio_thkly(ipt-1))
1163 pos_it(it) = posly(ipt)*thk(i)
1169 thk_it(it) = scale*thk_it(it)
1170 ms_nptt = pm(89,matly)*thk_it(it)*area(i)*fourth
1171 xil = ms_nptt*(area(i)/fac+thk_it(it)*thk_it(it)*one_over_12+
1172 . pos_it(it)*pos_it(it))
1175 ipt_all = ipt_all + nptt
1178 thick_drape = drape(ie)%THICK
1179 scale = thk(i)/thick_drape
1181 nptt = elbuf_str%BUFLY(ilay)%NPTT
1182 ip = drape(ie)%INDX_PLY(ilay)
1184 drape_ply => drape(ie)%DRAPE_PLY(ip)
1185 nslice = drape_ply%NSLICE
1190 ipid_ly = stack%IGEO(i1,isubstack)
1191 matly = stack%IGEO(i2,isubstack)
1192 iint = igeo(47,iprop)
1194 thickt = stack%GEO(1,isubstack)
1195 thkly = stack%GEO(i3 ,isubstack)*thickt
1196 ipid_ly = stack%IGEO(i1,isubstack)
1197 matly = stack%IGEO(i2,isubstack)
1200 thinning = drape_ply%RDRAPE(it,1)
1201 thk_it(it) = thkly*thinning/nptt
1202 ratio_thkly(ipt) = thk_it(it)/thick_drape
1204 posly(ipt) = zshift + half*ratio_thkly(ipt)
1206 posly(ipt) = posly(ipt-1)
1209 pos_it(it) = posly(ipt)*thk(i)
1211 ELSEIF(iint == 2)
THEN
1212 thickt = stack%GEO(1,isubstack)
1213 thkly = stack%GEO(i3 ,isubstack)*thickt
1216 thinning = drape_ply%RDRAPE(it,1)
1217 thk_it(it) = half*thkly*w_gauss(it,nptt)*thinning
1218 ratio_thkly(ipt) = thk_it(it)/thick_drape
1220 posly(ipt) = zshift + half*ratio_thkly(ipt)
1222 posly(ipt) = posly(ipt-1)
1223 . + half*(ratio_thkly(ipt)+ratio_thkly(ipt
1225 pos_it(it) = posly(ipt)*thk(i)
1230 thk_it(it) = scale * thk_it(it)
1231 ms_nptt = pm(89,matly)*thk_it(it)*area(i)*fourth
1232 xil = ms_nptt*(area(i)/fac+thk_it(it)*thk_it(it)*one_over_12+
1233 . pos_it(it)*pos_it(it))
1237 nptt = elbuf_str%BUFLY(ilay)%NPTT
1242 ipid_ly = stack%IGEO(i1,isubstack)
1243 matly = stack%IGEO(i2,isubstack)
1244 iint = igeo(47,iprop)
1246 thickt = stack%GEO(1,isubstack)
1247 thkly = stack%GEO(i3 ,isubstack)*thickt
1248 ipid_ly = stack%IGEO(i1,isubstack)
1249 matly = stack%IGEO(i2,isubstack)
1252 thk_it(it) = thkly/nptt
1253 ratio_thkly(ipt) = thk_it(it)/thick_drape
1255 posly(ipt) = zshift + half*ratio_thkly(ipt)
1257 posly(ipt) = posly(ipt-1)
1258 . + half*(ratio_thkly(ipt)+ratio_thkly(ipt-1))
1260 pos_it(it) = posly(ipt)*thk(i)
1262 ELSEIF(iint == 2)
THEN
1263 thickt = stack%GEO(1,isubstack)
1264 thkly = stack%GEO(i3 ,isubstack)*thickt
1267 thk_it(it) = half*thkly*w_gauss(it,nptt)
1268 ratio_thkly(ipt) = thk_it(it)/thick_drape
1270 posly(ipt) = zshift + half*ratio_thkly(ipt)
1272 posly(ipt) = posly(ipt-1)
1273 . + half*(ratio_thkly(ipt)+ratio_thkly(ipt-1))
1275 pos_it(it) = posly(ipt)*thk(i)
1280 thk_it(it) = scale*thk_it(it)
1281 ms_nptt = pm(89,matly)*thk_it(it)*area(i)*fourth
1282 xil = ms_nptt*(area(i)/fac+thk_it(it)*thk_it(it)*one_over_12+
1283 . pos_it(it)*pos_it(it))
1287 ipt_all = ipt_all + nptt
1293 zshift = geo(199,iprop)
1294 f_offset= zshift*zshift
1296 xi(i)=ems(i)*(area(i)/fac+thk(i)*thk(i)*(one_over_12+f_offset))
1300 IF (igtyp == 11 .OR. igtyp == 16 .OR. igtyp == 17
1301 . .OR. igtyp == 51)
THEN
1304 ins = ems(i)*(area(i)/fac+thk(i)*thk(i)*one_over_12)
1305 dms = abs(xi(i)-ins)/ins
1307 idprop = igeo(1,iprop)
1311 . msgtype=msgwarning,
1312 . anmode=aninfo_blind_2,
1326 IF (nxref == 0)
THEN
1335 partsav(1,ip)=partsav(1,ip) + four*ems(i)
1336 partsav(2,ip)=partsav(2,ip) + ems(i)*
1337 . (x(1,i1)+x(1,i2)+x(1,i3)+x(1,i4))
1338 partsav(3,ip)=partsav(3,ip) + ems(i)*
1339 . (x(2,i1)+x(2,i2)+x(2,i3)+x(2,i4))
1340 partsav(4,ip)=partsav(4,ip) + ems(i)*
1341 . (x(3,i1)+x(3,i2)+x(3,i3)+x(3,i4))
1342 xx = (x(1,i1)*x(1,i1)+x(1,i2)*x(1,i2)
1343 . +x(1,i3)*x(1,i3)+x(1,i4)*x(1,i4))
1344 xy = (x(1,i1)*x(2,i1)+x(1,i2)*x(2,i2)
1345 . +x(1,i3)*x(2,i3)+x(1,i4)*x(2,i4))
1346 yy = (x(2,i1)*x(2,i1)+x(2,i2)*x(2,i2)
1347 . +x(2,i3)*x(2,i3)+x(2,i4)*x(2,i4))
1348 yz = (x(2,i1)*x(3,i1)+x(2,i2)*x(3,i2)
1349 . +x(2,i3)*x(3,i3)+x(2,i4)*x(3,i4))
1350 zz = (x(3,i1)*x(3,i1)+x(3,i2)*x(3,i2)
1351 . +x(3,i3)*x(3,i3)+x(3,i4)*x(3,i4))
1352 zx = (x(3,i1)*x(1,i1)+x(3,i2)*x(1,i2)
1353 . +x(3,i3)*x(1,i3)+x(3,i4)*x(1,i4))
1355 partsav(5,ip) =partsav(5,ip) + four*xi(i) + ems(i) * (yy+zz)
1356 partsav(6,ip) =partsav(6,ip) + four*xi(i) + ems(i) * (zz+xx)
1357 partsav(7,ip) =partsav(7,ip) + four*xi(i) + ems(i) * (xx+yy)
1358 partsav(8,ip) =partsav(8,ip) - ems(i) * xy
1359 partsav(9,ip) =partsav(9,ip) - ems(i) * yz
1360 partsav(10,ip)=partsav(10,ip) - ems(i) * zx
1362 partsav(11,ip)=partsav(11,ip) + ems(i)*
1363 . (v(1,i1)+v(1,i2)+v(1,i3)+v(1,i4))
1364 partsav(12,ip)=partsav(12,ip) + ems(i)*
1365 . (v(2,i1)+v(2,i2)+v(2,i3)+v(2,i4))
1366 partsav(13,ip)=partsav(13,ip) + ems(i)*
1367 . (v(3,i1)+v(3,i2)+v(3,i3)+v(3,i4))
1369 partsav(14,ip)=partsav(14,ip) + half * ems(i) *
1370 . (v(1,i1)*v(1,i1)+v(2,i1)*v(2,i1)+v(3,i1)*v(3,i1)
1371 . +v(1,i2)*v(1,i2)+v(2,i2)*v(2,i2)+v(3,i2)*v(3,i2)
1372 . +v(1,i3)*v(1,i3)+v(2,i3)*v(2,i3)+v(3,i3)*v(3,i3)
1373 . +v(1,i4)*v(1,i4)+v(2,i4)*v(2,i4)+v(3,i4)*v(3,i4))
1383 partsav(1,ip)=partsav(1,ip) + four*ems(i)
1384 partsav(2,ip)=partsav(2,ip) + ems(i)*
1385 . (xrefc(1,1,i)+xrefc(2,1,i)+xrefc(3,1,i)+xrefc(4,1,i))
1386 partsav(3,ip)=partsav(3,ip) + ems(i)*
1387 . (xrefc(1,2,i)+xrefc(2,2,i)+xrefc(3,2,i)+xrefc(4,2,i))
1388 partsav(4,ip)=partsav(4,ip) + ems(i)*
1389 . (xrefc(1,3,i)+xrefc(2,3,i)+xrefc(3,3,i)+xrefc(4,3,i))
1390 xx = xrefc(1,1,i)**2 + xrefc(2,1,i)**2
1391 . + xrefc(3,1,i)**2 + xrefc(4,1,i)
1392 xy = xrefc(1,1,i)*xrefc(1,2,i) + xrefc(2,1,i)*xrefc(2,2,i)
1393 . + xrefc(3,1,i)*xrefc(3,2,i) + xrefc(4,1,i)*xrefc(4,2,i)
1394 yy = xrefc(1,2,i)**2 + xrefc(2,2,i)**2
1395 . + xrefc(3,2,i)**2 + xrefc(4,2,i)
1396 yz = xrefc(1,2,i)*xrefc(1,3,i) + xrefc(2,2,i)*xrefc(2,3,i)
1397 . + xrefc(3,2,i)*xrefc(3,3,i) + xrefc(4,2,i)*xrefc(4,3,i)
1398 zz = xrefc(1,3,i)**2 + xrefc(2,3,i)**2
1399 . + xrefc(3,3,i)**2 + xrefc(4,3,i)
1400 zx = xrefc(1,3,i)*xrefc(1,1,i) + xrefc(2,3,i)*xrefc(2,1,i)
1401 . + xrefc(3,3,i)*xrefc(3,1,i) + xrefc(4,3,i)*xrefc(4,1,i)
1403 partsav(5,ip) =partsav(5,ip) + four*xi(i) + ems(i)*(yy+zz)
1404 partsav(6,ip) =partsav(6,ip) + four*xi(i) + ems(i)*(zz+xx)
1405 partsav(7,ip) =partsav(7,ip) + four*xi(i) + ems(i)*(xx+yy)
1406 partsav(8,ip) =partsav(8,ip) - ems(i) * xy
1407 partsav(9,ip) =partsav(9,ip) - ems(i) * yz
1408 partsav(10,ip)=partsav(10,ip) - ems(i) * zx
1410 partsav(11,ip)=partsav(11,ip) + ems(i)*
1411 . (v(1,i1)+v(1,i2)+v(1,i3)+v(1,i4))
1412 partsav(12,ip)=partsav(12,ip) + ems(i)*
1413 . (v(2,i1)+v(2,i2)+v(2,i3)+v(2,i4))
1414 partsav(13,ip)=partsav(13,ip) + ems(i)*
1415 . (v(3,i1)+v(3,i2)+v(3,i3)+v(3,i4))
1417 partsav(14,ip)=partsav(14,ip) + half * ems(i) *
1418 . (v(1,i1)*v(1,i1)+v(2,i1)*v(2,i1)+v(3,i1)*v(3,i1)
1419 . +v(1,i2)*v(1,i2)+v(2,i2)*v(2,i2)+v(3,i2)*v(3,i2)
1420 . +v(1,i3)*v(1,i3)+v(2,i3)*v(2,i3)+v(3,i3)*v(3,i3)
1421 . +v(1,i4)*v(1,i4)+v(2,i4)*v(2,i4)+v(3,i4)*v(3,i4))
1424 ELSEIF(istatcnd==0)
THEN
1425 IF (nxref == 0)
THEN
1428 IF(sh4tree(3,n) >= 0)
THEN
1435 partsav(1,ip)=partsav(1,ip) + four*ems(i)
1436 partsav(2,ip)=partsav(2,ip) + ems(i)*
1437 . (x(1,i1)+x(1,i2)+x(1,i3)+x(1,i4))
1438 partsav(3,ip)=partsav(3,ip) + ems(i)*
1439 . (x(2,i1)+x(2,i2)+x(2,i3)+x(2,i4))
1440 partsav(4,ip)=partsav(4,ip) + ems(i)*
1441 . (x(3,i1)+x(3,i2)+x(3,i3)+x(3,i4))
1442 xx = (x(1,i1)*x(1,i1)+x(1,i2)*x(1,i2)
1443 . +x(1,i3)*x(1,i3)+x(1,i4)*x(1,i4))
1444 xy = (x(1,i1)*x(2,i1)+x(1,i2)*x(2,i2)
1445 . +x(1,i3)*x(2,i3)+x(1,i4)*x(2,i4))
1446 yy = (x(2,i1)*x(2,i1)+x(2,i2)*x(2,i2)
1447 . +x(2,i3)*x(2,i3)+x(2,i4)*x(2,i4))
1448 yz = (x(2,i1)*x(3,i1)+x(2,i2)*x(3,i2)
1449 . +x(2,i3)*x(3,i3)+x(2,i4)*x(3,i4))
1450 zz = (x(3,i1)*x(3,i1)+x(3,i2)*x(3,i2)
1451 . +x(3,i3)*x(3,i3)+x(3,i4)*x(3,i4))
1452 zx = (x(3,i1)*x(1,i1)+x(3,i2)*x(1,i2)
1453 . +x(3,i3)*x(1,i3)+x(3,i4)*x(1,i4))
1455 partsav(5,ip) =partsav(5,ip) + four*xi(i) + ems(i)*(yy+zz)
1456 partsav(6,ip) =partsav(6,ip) + four*xi(i) + ems(i)*(zz+xx)
1457 partsav(7,ip) =partsav(7,ip) + four*xi(i) + ems(i)*(xx+yy
1458 partsav(8,ip) =partsav(8,ip) - ems(i) * xy
1459 partsav(9,ip) =partsav(9,ip) - ems(i) * yz
1460 partsav(10,ip)=partsav(10,ip) - ems(i) * zx
1462 partsav(11,ip)=partsav(11,ip) + ems(i)*
1463 . (v(1,i1)+v(1,i2)+v(1,i3)+v(1,i4))
1464 partsav(12,ip)=partsav(12,ip) + ems(i)*
1465 . (v(2,i1)+v(2,i2)+v(2,i3)+v(2,i4))
1466 partsav(13,ip)=partsav(13,ip) + ems(i)*
1467 . (v(3,i1)+v(3,i2)+v(3,i3)+v(3,i4))
1469 partsav(14,ip)=partsav(14,ip) + half * ems(i) *
1470 . (v(1,i1)*v(1,i1)+v(2,i1)*v(2,i1)+v(3,i1)*v(3,i1)
1471 . +v(1,i2)*v(1,i2)+v(2,i2)*v(2,i2)+v(3,i2)*v(3,i2)
1472 . +v(1,i3)*v(1,i3)+v(2,i3)*v(2,i3)+v(3,i3)*v(3,i3)
1473 . +v(1,i4)*v(1,i4)+v(2,i4)*v(2,i4)+v(3,i4)*v(3,i4))
1479 IF(sh4tree(3,n) >= 0)
THEN
1486 partsav(1,ip)=partsav(1,ip) + four*ems(i)
1487 partsav(2,ip)=partsav(2,ip) + ems(i)*
1488 . (xrefc(1,1,i)+xrefc(2,1,i)+xrefc(3,1,i)+xrefc(4,1,i))
1489 partsav(3,ip)=partsav(3,ip) + ems(i)*
1490 . (xrefc(1,2,i)+xrefc(2,2,i)+xrefc(3,2,i)+xrefc(4,2,i))
1491 partsav(4,ip)=partsav(4,ip) + ems(i)*
1492 . (xrefc(1,3,i)+xrefc(2,3,i)+xrefc(3,3,i)+xrefc(4,3,i))
1493 xx = xrefc(1,1,i)**2 + xrefc(2,1,i)**2
1494 . + xrefc(3,1,i)**2 + xrefc(4,1,i)
1495 xy = xrefc(1,1,i)*xrefc(1,2,i) + xrefc(2,1,i)*xrefc(2,2,i)
1496 . + xrefc(3,1,i)*xrefc(3,2,i) + xrefc(4,1,i)*xrefc(4,2,i)
1497 yy = xrefc(1,2,i)**2 + xrefc(2,2,i)**2
1498 . + xrefc(3,2,i)**2 + xrefc(4,2,i)
1499 yz = xrefc(1,2,i)*xrefc(1,3,i) + xrefc(2,2,i)*xrefc(2,3,i)
1500 . + xrefc(3,2,i)*xrefc(3,3,i) + xrefc(4,2,i)*xrefc(4,3,i)
1501 zz = xrefc(1,3,i)**2 + xrefc(2,3,i)**2
1502 . + xrefc(3,3,i)**2 + xrefc(4,3,i)
1503 zx = xrefc(1,3,i)*xrefc(1,1,i) + xrefc(2,3,i)*xrefc(2,1,i)
1504 . + xrefc(3,3,i)*xrefc(3,1,i) + xrefc(4,3,i)*xrefc(4,1,i)
1506 partsav(5,ip) =partsav(5,ip) + four*xi(i) + ems(i)*(yy+zz)
1507 partsav(6,ip) =partsav(6,ip) + four*xi(i) + ems(i)*(zz+xx)
1508 partsav(7,ip) =partsav(7,ip) + four*xi(i) + ems(i)*(xx+yy)
1509 partsav(8,ip) =partsav(8,ip) - ems(i) * xy
1510 partsav(9,ip) =partsav(9,ip) - ems(i) * yz
1511 partsav(10,ip)=partsav(10,ip) - ems(i) * zx
1513 partsav(11,ip)=partsav(11,ip) + ems(i)*
1514 . (v(1,i1)+v(1,i2)+v(1,i3)+v(1,i4))
1515 partsav(12,ip)=partsav(12,ip) + ems(i)*
1516 . (v(2,i1)+v(2,i2)+v(2,i3)+v(2,i4))
1517 partsav(13,ip)=partsav(13,ip) + ems(i)*
1518 . (v(3,i1)+v(3,i2)+v(3,i3)+v(3,i4))
1520 partsav(14,ip)=partsav(14,ip) + half * ems(i) *
1521 . (v(1,i1)*v(1,i1)+v(2,i1)*v(2,i1)+v(3,i1)*v(3,i1)
1522 . +v(1,i2)*v(1,i2)+v(2,i2)*v(2,i2)+v(3,i2
1523 . +v(1,i3)*v(1,i3)+v(2,i3)*v(2,i3)+v(3,i3)*v(3,i3)
1524 . +v(1,i4)*v(1,i4)+v(2,i4)*v(2,i4)+v(3,i4)*v(3,i4))
1529 IF (nxref == 0)
THEN
1532 IF(sh4tree(3,n) == 0 .OR. sh4tree(3,n) == -1)
THEN
1539 partsav(1,ip)=partsav(1,ip) + four*ems(i)
1540 partsav(2,ip)=partsav(2,ip) + ems(i)*
1541 . (x(1,i1)+x(1,i2)+x(1,i3)+x(1,i4))
1542 partsav(3,ip)=partsav(3,ip) + ems(i)*
1543 . (x(2,i1)+x(2,i2)+x(2,i3)+x(2,i4))
1544 partsav(4,ip)=partsav(4,ip) + ems(i)*
1545 . (x(3,i1)+x(3,i2)+x(3,i3)+x(3,i4))
1546 xx = (x(1,i1)*x(1,i1)+x(1,i2)*x(1,i2)
1547 . +x(1,i3)*x(1,i3)+x(1,i4)*x(1,i4))
1548 xy = (x(1,i1)*x(2,i1)+x(1,i2)*x(2,i2)
1549 . +x(1,i3)*x(2,i3)+x(1,i4)*x(2,i4))
1550 yy = (x(2,i1)*x(2,i1)+x(2,i2)*x(2,i2)
1551 . +x(2,i3)*x(2,i3)+x(2,i4)*x(2,i4))
1552 yz = (x(2,i1)*x(3,i1)+x(2,i2)*x(3,i2)
1553 . +x(2,i3)*x(3,i3)+x(2,i4)*x(3,i4))
1554 zz = (x(3,i1)*x(3,i1)+x(3,i2)*x(3,i2)
1555 . +x(3,i3)*x(3,i3)+x(3,i4)*x(3,i4))
1556 zx = (x(3,i1)*x(1,i1)+x(3,i2)*x(1,i2)
1557 . +x(3,i3)*x(1,i3)+x(3,i4)*x(1,i4))
1559 partsav(5,ip) =partsav(5,ip) + four*xi(i) + ems(i)*(yy+zz)
1560 partsav(6,ip) =partsav(6,ip) + four*xi(i) + ems(i)*(zz+xx)
1561 partsav(7,ip) =partsav(7,ip) + four*xi(i) + ems(i)*(xx+yy)
1562 partsav(8,ip) =partsav(8,ip) - ems(i) * xy
1563 partsav(9,ip) =partsav(9,ip) - ems(i) * yz
1564 partsav(10,ip)=partsav(10,ip) - ems(i) * zx
1566 partsav(11,ip)=partsav(11,ip) + ems(i)*
1567 . (v(1,i1)+v(1,i2)+v(1,i3)+v(1,i4))
1568 partsav(12,ip)=partsav(12,ip) + ems(i)*
1569 . (v(2,i1)+v(2,i2)+v(2,i3)+v(2,i4))
1570 partsav(13,ip)=partsav(13,ip) + ems(i)*
1571 . (v(3,i1)+v(3,i2)+v(3,i3)+v(3,i4))
1573 partsav(14,ip)=partsav(14,ip) + half * ems(i) *
1574 . (v(1,i1)*v(1,i1)+v(2,i1)*v(2,i1)+v(3,i1)*v(3,i1)
1575 . +v(1,i2)*v(1,i2)+v(2,i2)*v(2,i2)+v(3,i2)*v(3,i2)
1576 . +v(1,i3)*v(1,i3)+v(2,i3)*v(2,i3)+v(3,i3)*v(3,i3)
1577 . +v(1,i4)*v(1,i4)+v(2,i4)*v(2,i4)+v(3,i4)*v(3,i4))
1583 IF(sh4tree(3,n) == 0 .OR. sh4tree(3,n) == -1)
THEN
1590 partsav(1,ip)=partsav(1,ip) + four*ems(i)
1591 partsav(2,ip)=partsav(2,ip) + ems(i)*
1592 . (xrefc(1,1,i)+xrefc(2,1,i)+xrefc(3,1,i)+xrefc(4,1,i))
1593 partsav(3,ip)=partsav(3,ip) + ems(i)*
1594 . (xrefc(1,2,i)+xrefc(2,2,i)+xrefc(3,2,i)+xrefc(4,2,i))
1595 partsav(4,ip)=partsav(4,ip) + ems(i)*
1596 . (xrefc(1,3,i)+xrefc(2,3,i)+xrefc(3,3,i)+xrefc(4,3,i))
1597 xx = xrefc(1,1,i)**2 + xrefc(2,1,i)**2
1598 . + xrefc(3,1,i)**2 + xrefc(4,1,i)
1599 xy = xrefc(1,1,i)*xrefc(1,2,i) + xrefc(2,1,i)*xrefc(2,2,i)
1600 . + xrefc(3,1,i)*xrefc(3,2,i) + xrefc(4,1,i)*xrefc(4,2,i)
1601 yy = xrefc(1,2,i)**2 + xrefc(2,2,i)**2
1602 . + xrefc(3,2,i)**2 + xrefc(4,2,i)
1603 yz = xrefc(1,2,i)*xrefc(1,3,i) + xrefc(2,2,i)*xrefc(2,3,i)
1604 . + xrefc(3,2,i)*xrefc(3,3,i) + xrefc(4,2,i)*xrefc(4,3,i)
1605 zz = xrefc(1,3,i)**2 + xrefc(2,3,i)**2
1606 . + xrefc(3,3,i)**2 + xrefc(4,3,i)
1607 zx = xrefc(1,3,i)*xrefc(1,1,i) + xrefc(2,3,i)*xrefc(2,1,i)
1608 . + xrefc(3,3,i)*xrefc(3,1,i) + xrefc(4,3,i)*xrefc(4,1,i)
1610 partsav(5,ip) =partsav(5,ip) + four*xi(i) + ems(i)*(yy+zz)
1611 partsav(6,ip) =partsav(6,ip) + four*xi(i) + ems(i)*(zz+xx)
1612 partsav(7,ip) =partsav(7,ip) + four*xi(i) + ems(i)*(xx+yy)
1613 partsav(8,ip) =partsav(8,ip) - ems(i) * xy
1614 partsav(9,ip) =partsav(9,ip) - ems(i) * yz
1615 partsav(10,ip)=partsav(10,ip) - ems(i) * zx
1617 partsav(11,ip)=partsav(11,ip) + ems(i)*
1618 . (v(1,i1)+v(1,i2)+v(1,i3)+v(1,i4))
1619 partsav(12,ip)=partsav(12,ip) + ems(i)*
1620 . (v(2,i1)+v(2,i2)+v(2,i3)+v(2,i4))
1621 partsav(13,ip)=partsav(13,ip) + ems(i)*
1622 . (v(3,i1)+v(3,i2)+v(3,i3)+v(3,i4))
1624 partsav(14,ip)=partsav(14,ip) + half * ems(i) *
1625 . (v(1,i1)*v(1,i1)+v(2,i1)*v(2,i1)+v(3,i1)*v(3,i1)
1626 . +v(1,i2)*v(1,i2)+v(2,i2)*v(2,i2)+v(3,i2)*v(3,i2)
1627 . +v(1,i3)*v(1,i3)+v(2,i3)*v(2,i3)+v(3,i3)*v(3,i3)
1628 . +v(1,i4)*v(1,i4)+v(2,i4)*v(2,i4)+v(3,i4)*v(3,i4))
1637 IF (igtyp == 52 .OR. ((igtyp == 17 .OR. igtyp == 51) .AND. igmat > 0))
THEN
1642 nshnod(ix1(i))=nshnod(ix1(i))+1
1643 nshnod(ix2(i))=nshnod(ix2(i))+1
1644 nshnod(ix3(i))=nshnod(ix3(i))+1
1645 nshnod(ix4(i))=nshnod(ix4(i))+1
1648 ELSEIF(igtyp == 11 .AND. igmat > 0)
THEN
1652 et=geo(ipgmat +2 ,iprop)*thk(i)
1654 nshnod(ix1(i))=nshnod(ix1(i))+1
1655 nshnod(ix2(i))=nshnod(ix2(i))+1
1656 nshnod(ix3(i))=nshnod(ix3(i))+1
1657 nshnod(ix4(i))=nshnod(ix4(i))+1
1663 et=pm(20,imid)*thk(i)
1665 nshnod(ix1(i))=nshnod(ix1(i))+1
1666 nshnod(ix2(i))=nshnod(ix2(i))+1
1667 nshnod(ix3(i))=nshnod(ix3(i))+1
1668 nshnod(ix4(i))=nshnod(ix4(i))+1
1672 DEALLOCATE(posly,ratio_thkly,thk_it,pos_it )