33
34
35
36 USE elbufdef_mod
37
38
39
40#include "implicit_f.inc"
41
42
43
44#include "com01_c.inc"
45#include "com04_c.inc"
46#include "param_c.inc"
47#include "task_c.inc"
48
49
50
51 my_real :: mas(*) ,pm(npropm,*),geo(npropg,*),x(3,*), d(3,*)
52 INTEGER IPARG(NPARG,*),IXT(NIXT,*),IXP(NIXP,*),IXR(NIXR,*),EL2FA(*),NBF
53
54 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
55
56
57
59 . off, p, vonm2, vonm, s1, s2, s12, s3, VALUE,thk0,a0,al0,
60 . rho0,xx1,xx2,xx3,yy1,yy2,yy3,zz1,zz2,zz3
61 INTEGER I, NG, NEL, NFT, IAD, ITY, LFT, NPT, ISS, ISC,
62 . IADD, N, J, LLT, MLW, NB1, NB2, NB3, NB4, NB5,NB6,
63 . NB7, NB8, NB9, NB10, NB11, NB12, NB13, NB14, NB15, NB16,
64 . ISTRAIN,NN, K1, K2,JTURB,MT,JALE, IMID, IALEL,IPID,
65 . N1,N2,N3,N4,
66 . ,NN2,NN3,NN4,NN5,NN6,NN7,NN8,NN9,NN10,
67 . OFFSET,NEL_OLD,ITY_OLD,NFT_FA,N_FA,
68 . NUVAR
69 REAL R4
70C
71 TYPE(G_BUFEL_) ,POINTER :: GBUF
72
73 nn1 = 1
74 nn2 = 1
75 nn3 = 1
76 nn4 = nn3
77 nn5 = nn4
78 nn6 = nn5
79 nn7 = nn6 + numelt
80 nn8 = nn7 + numelp
81 nn9 = nn8 + numelr
82 nn10= nn9
83
84 nel_old = 0
85 ity_old = 0
86 DO ng=1,ngroup
87 mlw =iparg(1,ng)
88 nel =iparg(2,ng)
89 ity =iparg(5,ng)
90 gbuf => elbuf_tab(ng)%GBUF
91 IF (ispmd == 0) THEN
92 IF (ity /= ity_old) THEN
93 nel_old = 0
94 ity_old= ity
95 ENDIF
96 nft_fa = nel_old
97 nel_old = nel_old + nel
98 ENDIF
99 nft =iparg(3,ng)
100 iad =iparg(4,ng)
101 lft=1
102 llt=nel
103 IF (ispmd == 0) THEN
104 nft_fa = nel_old - nel
105 ELSE
106 nft_fa = nft
107 ENDIF
108
109
110
111 IF (ity == 4) THEN
112 DO i=lft,llt
113 n = i + nft
114 n_fa = i + nft_fa
115 rho0 = pm(1,ixt(1,n))
116 a0 = geo(1,ixt(4,n))
117 n1 = ixt(2,n)
118 n2 = ixt(3,n)
119 xx1 = x(1,n2)-d(1,n2)-x(1,n1)+d(1,n1)
120 yy1 = x(2,n2)-d(2,n2)-x(2,n1)+d(2,n1)
121 zz1 = x(3,n2)-d(3,n2)-x(3,n1)+d(3,n1)
122 al0 = sqrt(xx1*xx1 + yy1*yy1 + zz1*zz1)
123 mas(el2fa(nn6+n_fa)) = rho0*al0*a0
124 ENDDO
125
126
127
128 ELSEIF (ity == 5) THEN
129 DO i=lft,llt
130 n = i + nft
131 n_fa = i + nft_fa
132 rho0 = pm(1,ixp(1,n))
133 a0 = geo(1,ixp(5,n))
134 n1 = ixp(2,n)
135 n2 = ixp(3,n)
136 xx1 = x(1,n2)-d(1,n2)-x(1,n1)+d(1,n1)
137 yy1 = x(2,n2)-d(2,n2)-x(2,n1)+d(2,n1)
138 zz1 = x(3,n2)-d(3,n2)-x(3,n1)+d(3,n1)
139 al0 = sqrt(xx1*xx1 + yy1*yy1 + zz1*zz1)
140 mas(el2fa(nn7+n_fa)) = rho0*al0*a0
141 ENDDO
142
143
144
145 ELSEIF (ity == 6) THEN
146 IF(mlw==3)THEN
147 DO i=lft,llt
148 n = i + nft
149 n_fa = i + nft_fa
150 mas(el2fa(nn8+n_fa)) = half*geo(1,ixr(1,n))
151 mas(el2fa(nn8+n_fa)+1) = half*geo(1,ixr(1,n))
152 ENDDO
153 ELSEIF (mlw == 5) THEN
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171 DO i=lft,llt
172 n = i + nft
173 n_fa = i + nft_fa
174 mas(el2fa(nn8+n_fa)) = gbuf%MASS(i)
175
176 ENDDO
177 ELSE
178 DO i=lft,llt
179 n = i + nft
180 n_fa = i + nft_fa
181 mas(el2fa(nn8+n_fa)) = geo(1,ixr(1,n))
182 ENDDO
183 ENDIF
184 ENDIF
185
186
187
188 ENDDO
189
190 RETURN