56 cooroverlay, elconnoverlay, &
58 sd_subface_parents2, &
60 sd_subface_nat_coors, &
61 sd_subface_nat_coors_mate, &
69 deltan, deltat, sigmax, taumax, sinit, &
70 rnet, disp, sthresh, nummatcoh,matid,signflag)
77 INTEGER :: nsubn2, nsubf2
82 REAL*8,
DIMENSION(1:3,1:nsubn) :: cooroverlay
83 INTEGER,
DIMENSION(1:3,1:nsubf) :: elconnoverlay
84 INTEGER,
DIMENSION(1:nsubf) :: sd_subface_parents
85 INTEGER,
DIMENSION(1:nsubf) :: sd_subface_mate
86 INTEGER,
DIMENSION(1:nsubf2) :: sd_subface_parents2
87 REAL*4,
DIMENSION(1:6,1:nsubf) :: sd_subface_nat_coors
88 REAL*4,
DIMENSION(1:6,1:nsubf2) :: sd_subface_nat_coors_mate
89 INTEGER,
DIMENSION(1:nf) :: mapfaceel2vol
90 INTEGER,
DIMENSION(1:nf) :: faceofvolel
91 INTEGER,
DIMENSION(1:nf2) :: mapfaceel2vol2
92 INTEGER,
DIMENSION(1:nf2) :: faceofvolel2
94 REAL*8,
DIMENSION(1:3,1:nsubf) :: sthresh
99 INTEGER,
DIMENSION(1:4,1:NumEL) :: elconn
102 INTEGER,
DIMENSION(1:NumEL) :: map2volnd
104 REAL*8 :: rnet(3*numnp)
105 REAL*8 :: disp(3*numnp)
106 REAL*8 :: deltan(nummatcoh)
107 REAL*8 :: deltat(nummatcoh)
108 REAL*8 :: sigmax(nummatcoh)
109 REAL*8 :: taumax(nummatcoh)
110 REAL*8 :: sinit(nummatcoh)
112 REAL*8 :: nn1,nn2,nn3
113 REAL*8 :: deltn, deltt
117 INTEGER :: n1,n2,n3,n4,n5,n6
120 REAL*8 ::
g(3),weight(3)
121 REAL*8,
DIMENSION(1:3,1:18) :: nn
126 REAL*8,
DIMENSION(1:18) :: rcohloc
127 REAL*8 :: v12(3),v13(3)
129 REAL*8 :: tangential(3)
134 INTEGER :: face1, face2
137 INTEGER :: nd1_overlay,nd2_overlay,nd3_overlay
140 INTEGER :: ii,faceel_counterparts
143 weight(1)=0.33333333333333d0
144 weight(2)=0.33333333333333d0
145 weight(3)=0.33333333333333d0
153 deltn = 1.d0/deltan(matid)
154 deltt = 1.d0/deltat(matid)
159 nd1_overlay = elconnoverlay(1,
i)
160 nd2_overlay = elconnoverlay(2,
i)
161 nd3_overlay = elconnoverlay(3,
i)
167 v12(
j) = cooroverlay(
j,nd2_overlay)-cooroverlay(
j,nd1_overlay)
168 v13(
j) = cooroverlay(
j,nd3_overlay)-cooroverlay(
j,nd1_overlay)
172 &(v12(1)*v13(3)-v12(3)*v13(1))**2+ &
173 &(v12(1)*v13(2)-v12(2)*v13(1))**2)
178 normal(1) = (v12(2)*v13(3)-v12(3)*v13(2))
179 normal(2) = -(v12(1)*v13(3)-v12(3)*v13(1))
180 normal(3) = (v12(1)*v13(2)-v12(2)*v13(1))
202 faceel = sd_subface_parents(
i)
204 volel = mapfaceel2vol(faceel)
206 side = faceofvolel(faceel)
209 n1 = 1; n2 = 2; n3 = 3
210 ELSE IF(
side.eq.2)
THEN
211 n1 = 1; n2 = 2; n3 = 4
212 ELSE IF(
side.eq.3)
THEN
213 n1 = 2; n2 = 3; n3 = 4
214 ELSE IF(
side.eq.4)
THEN
215 n1 = 4; n2 = 3; n3 = 1
218 n1 = elconn(n1,volel)
219 n2 = elconn(n2,volel)
220 n3 = elconn(n3,volel)
223 faceel_counterparts = sd_subface_parents2(sd_subface_mate(
i))
225 volel = mapfaceel2vol2(faceel_counterparts)
227 side = faceofvolel2(faceel_counterparts)
231 n4 = 1; n5 = 2; n6 = 3
232 ELSE IF(
side.eq.2)
THEN
233 n4 = 1; n5 = 2; n6 = 4
234 ELSE IF(
side.eq.3)
THEN
235 n4 = 2; n5 = 3; n6 = 4
236 ELSE IF(
side.eq.4)
THEN
237 n4 = 4; n5 = 3; n6 = 1
241 n4 = elconn(n4,volel)
242 n5 = elconn(n5,volel)
243 n6 = elconn(n6,volel)
245 dloc(1) = disp(n1*3-2)
246 dloc(2) = disp(n1*3-1)
248 dloc(4) = disp(n2*3-2)
249 dloc(5) = disp(n2*3-1)
251 dloc(7) = disp(n3*3-2)
252 dloc(8) = disp(n3*3-1)
254 dloc(10) = disp(n4*3-2)
255 dloc(11) = disp(n4*3-1)
256 dloc(12) = disp(n4*3)
257 dloc(13) = disp(n5*3-2)
258 dloc(14) = disp(n5*3-1)
259 dloc(15) = disp(n5*3)
260 dloc(16) = disp(n6*3-2)
261 dloc(17) = disp(n6*3-1)
262 dloc(18) = disp(n6*3)
274 nn1 = 1.d0 - dble(sd_subface_nat_coors(ii,
i))-dble(sd_subface_nat_coors(ii+1,
i))
275 nn2 = dble(sd_subface_nat_coors(ii,
i))
276 nn3 = dble(sd_subface_nat_coors(ii+1,
i))
293 nn1 = 1.d0 - dble(sd_subface_nat_coors_mate(ii,faceel_counterparts))- &
294 dble(sd_subface_nat_coors_mate(ii+1,faceel_counterparts))
295 nn2 = dble(sd_subface_nat_coors_mate(ii,faceel_counterparts))
296 nn3 = dble(sd_subface_nat_coors_mate(ii+1,faceel_counterparts))
313 delta = matmul(nn,dloc)
328 delta1(2) =
sqrt(tangential(1)**2+tangential(2)**2+tangential(3)**2)
332 x = 1.d0-
sqrt((delta1(1)*deltn)**2+(delta1(2)*deltt)**2)
341 IF (delta1(1)>=0.d0)
THEN
342 tn=sthresh(
k,
i)/(1.d0-sthresh(
k,
i))*sig*delta1(1)*deltn/sinit(matid)
344 tn=sig*delta1(1)*deltn/(1.d0-sinit(matid))
347 tt=sthresh(
k,
i)/(1.d0-sthresh(
k,
i))*tau*delta1(2)*deltt/sinit(matid)
357 aa = matmul(transpose(nn),t)
362 rcohloc(
j) = rcohloc(
j) - area*aa(
j)*weight(
k)
371 rnet(n1*3-2) = rnet(n1*3-2) + rcohloc(1)
372 rnet(n1*3-1) = rnet(n1*3-1) + rcohloc(2)
373 rnet(n1*3) = rnet(n1*3) + rcohloc(3)
374 rnet(n2*3-2) = rnet(n2*3-2) + rcohloc(4)
375 rnet(n2*3-1) = rnet(n2*3-1) + rcohloc(5)
376 rnet(n2*3) = rnet(n2*3) + rcohloc(6)
377 rnet(n3*3-2) = rnet(n3*3-2) + rcohloc(7)
378 rnet(n3*3-1) = rnet(n3*3-1) + rcohloc(8)
379 rnet(n3*3) = rnet(n3*3) + rcohloc(9)
382 rnet(n4*3-2) = rnet(n4*3-2) + rcohloc(10)
383 rnet(n4*3-1) = rnet(n4*3-1) + rcohloc(11)
384 rnet(n4*3) = rnet(n4*3) + rcohloc(12)
385 rnet(n5*3-2) = rnet(n5*3-2) + rcohloc(13)
386 rnet(n5*3-1) = rnet(n5*3-1) + rcohloc(14)
387 rnet(n5*3) = rnet(n5*3) + rcohloc(15)
388 rnet(n6*3-2) = rnet(n6*3-2) + rcohloc(16)
389 rnet(n6*3-1) = rnet(n6*3-1) + rcohloc(17)
390 rnet(n6*3) = rnet(n6*3) + rcohloc(18)
444 x3 = y1 * z2 - z1 * y2
445 y3 = z1 * x2 - x1 * z2
446 z3 = x1 * y2 - y1 * x2
subroutine c3d6nm(nsubn, nsubf, nsubn2, nsubf2, CoorOverlay, ElConnOverlay, sd_subface_parents, sd_subface_parents2, sd_subface_mate, sd_subface_nat_coors, sd_subface_nat_coors_mate, FaceOfVolEl, FaceOfVolEl2, NumNp, NumEl, ElConn, nf, nf2, MapFaceEl2Vol, MapFaceEl2Vol2, deltan, deltat, sigmax, taumax, Sinit, Rnet, Disp, Sthresh, NumMatCoh, MatID, SignFlag)
subroutine crossprod_3d(x1, y1, z1, x2, y2, z2, x3, y3, z3)
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
Tfloat magnitude(const int magnitude_type=2) const
Return the norm of the current vector/matrix. ntype = norm type (0=L2, 1=L1, -1=Linf).
Vector_3< Real > normal() const
Get the normal of the incident facet.
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
long double dot_product(pnt vec1, pnt vec2)