54 s11ev, s22ev, s33ev, s12ev, s23ev, s13ev, &
55 numelneigh,elconn,
alpha, ahat,&
57 nprocs,totnumndcomm,totnumneighprocs,neighproclist,numndcomm,neigh_lst,&
58 mpi_status_size,mpi_comm_rocfrac,mpi_double_precision, &
59 reqrcv,reqsnd,statrcv, statsnd)
67 INTEGER :: totnumneighprocs, nprocs,totnumndcomm
68 INTEGER,
DIMENSION(1:TotNumNeighProcs) :: neighproclist
69 INTEGER,
DIMENSION(1:TotNumNeighProcs) :: numndcomm
70 REAL*8,
pointer,
DIMENSION(:) :: buf
72 TYPE(rcv_buf),
pointer,
DIMENSION(:) :: recvdatafrm
73 TYPE(send_buf),
DIMENSION(1:TotNumNeighProcs) :: neigh_lst
78 INTEGER :: numnp, numel
79 REAL*8,
DIMENSION(1:numnp) :: ahat
80 REAL*8,
DIMENSION(1:numnp*3) :: disp, rnet
81 REAL*8,
DIMENSION(1:3,1:numnp) :: coor
82 INTEGER,
DIMENSION(1:numnp) ::numelneigh
83 INTEGER,
DIMENSION(1:numnp,1:40) :: elconn
84 INTEGER,
DIMENSION(1:4,1:numel) :: nodes
85 REAL*8,
DIMENSION(1:4,1:numel) ::
alpha
87 REAL*8,
DIMENSION(1:numel) :: s11ev, s22ev, s33ev, s12ev, s23ev, s13ev
88 REAL*8 :: s11e, s22e, s33e, s12e, s23e, s13e, s21e, s31e, s32e
91 REAL*8 :: onethird = 1.d0/3.d0
96 REAL*8 :: x1,x2,x3,x4,y1,y2,y3,y4,z1,z2,z3,z4
97 REAL*8 :: x1d,x2d,x3d,x4d,y1d,y2d,y3d,y4d,z1d,z2d,z3d,z4d
98 INTEGER :: k1n1,k1n2,k1n3,k1n4,k2n1,k2n2,k2n3,k2n4
99 INTEGER :: k3n1,k3n2,k3n3,k3n4
105 REAL*8 :: u1,u2,u3,u4,v1,v2,v3,v4,w1,w2,w3,w4
107 REAL*8 :: dudx,dvdy,dwdz,dudy,dvdx,dvdz,dwdy,dudz,dwdx
110 REAL*8 :: x14, x24, x34, y14, y24, y34, z14, z24, z34
113 REAL*8 :: z12, z13,x12,x13,y12,y13
114 REAL*8 :: c11, c12, c13, c21, c22, c23, c31, c32, c33
115 REAL*8 :: sh1, sh2, sh3, sh4, sh5, sh6, sh7, sh8, sh9, sh10, sh11, sh12
116 REAL*8 :: sh13, sh14, sh15
120 REAL*8 :: b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12
122 REAL*8 :: e11,e22,e33,e12,e23,e13
123 REAL*8 :: b13, b14, b15
124 REAL*8 :: sums11n,sums22n,sums33n,sums12n,sums23n,sums13n
125 REAL*8 :: sume11n,sume22n,sume33n,sume12n,sume23n,sume13n
127 REAL*8 :: e11n, e22n, e33n, e12n, e23n, e13n
128 INTEGER :: k3i,k2i,k1i
130 INTEGER :: n1, n2, n3, n4
131 REAL*8 :: volel, volel0,vx6inv,vol
134 REAL*8 :: coeff1, coeff2
135 REAL*8 :: jacob, detfa
136 REAL*8 :: f11, f12, f13, f21, f22, f23, f31, f32, f33
137 REAL*8,
DIMENSION(1:numnp) :: f11v, f12v, f13v, f21v, f22v, f23v, f31v, f32v, f33v, voldefv
138 REAL*8 :: vx6def, vx6invdef, voldef
140 REAL*8,
DIMENSION(1:numnp) :: pa
141 REAL*8 :: cnode(1:3,1:3)
142 REAL*8 :: iiic, doubleproduct, pc
143 REAL*8,
DIMENSION(1:numnp) :: s11n, s22n, s33n, s12n, s23n, s13n, s21n, s31n,s32n
145 INTEGER :: k1, j1, k2
147 integer :: mpi_status_size,mpi_comm_rocfrac,mpi_double_precision
150 INTEGER,
DIMENSION(1:TotNumNeighProcs) :: reqrcv, reqsnd
151 INTEGER,
DIMENSION(1:MPI_STATUS_SIZE,1:TotNumNeighProcs) :: statrcv, statsnd
176 DO j = 1, numelneigh(
i)
253 c11 = y24*z34 - z24*y34
254 c21 = -( x24*z34 - z24*x34 )
255 c31 = x24*y34 - y24*x34
257 vx6 = -( x14*c11 + y14*c21 + z14*c31 )
266 b1 = (y34*z24 - y24*z34) * vx6inv
267 b2 = (z34*x24 - z24*x34) * vx6inv
268 b3 = (x34*y24 - x24*y34) * vx6inv
269 b4 = (y13*z14 - y14*z13) * vx6inv
270 b5 = (z13*x14 - z14*x13) * vx6inv
271 b6 = (x13*y14 - x14*y13) * vx6inv
272 b7 = (y14*z12 - y12*z14) * vx6inv
273 b8 = (z14*x12 - z12*x14) * vx6inv
274 b9 = (x14*y12 - x12*y14) * vx6inv
275 b10 = (y12*z13 - y13*z12) * vx6inv
276 b11 = (z12*x13 - z13*x12) * vx6inv
277 b12 = (x12*y13 - x13*y12) * vx6inv
281 f11 = f11 +
alpha(ix,ielnum)*volel0*(1.d0 + ( b1*u1 + b4*u2 + b7*u3 + b10*u4 ))
282 f22 = f22 +
alpha(ix,ielnum)*volel0*(1.d0 + ( b2*v1 + b5*v2 + b8*v3 + b11*v4 ))
283 f33 = f33 +
alpha(ix,ielnum)*volel0*(1.d0 + ( b3*w1 + b6*w2 + b9*w3 + b12*w4 ))
284 f12 = f12 +
alpha(ix,ielnum)*volel0*(b2*u1 + b5*u2 + b8*u3 + b11*u4)
285 f21 = f21 +
alpha(ix,ielnum)*volel0*(b1*v1 + b4*v2 + b7*v3 + b10*v4)
286 f23 = f23 +
alpha(ix,ielnum)*volel0*(b3*v1 + b6*v2 + b9*v3 + b12*v4)
287 f32 = f32 +
alpha(ix,ielnum)*volel0*(b2*w1 + b5*w2 + b8*w3 + b11*w4)
288 f13 = f13 +
alpha(ix,ielnum)*volel0*(b3*u1 + b6*u2 + b9*u3 + b12*u4)
289 f31 = f31 +
alpha(ix,ielnum)*volel0*(b1*w1 + b4*w2 + b7*w3 + b10*w4)
314 c11 = y24*z34 - z24*y34
315 c21 = -( x24*z34 - z24*x34 )
316 c31 = x24*y34 - y24*x34
318 vx6def = -( x14*c11 + y14*c21 + z14*c31 )
321 voldef = voldef +
alpha(ix,ielnum)*vx6def/6.d0
340 ALLOCATE(recvdatafrm(0:nprocs-1))
345 ALLOCATE(buf(1:totnumndcomm/3*10))
347 DO j1 = 1, totnumneighprocs
348 k = neighproclist(j1)
349 ALLOCATE(recvdatafrm(
k)%rcvbuf(1:numndcomm(j1)*10))
350 DO j = 1, numndcomm(j1)
351 k2 = neigh_lst(j1)%NdId(
j)
362 buf(k1+9) = voldefv(k2)
369 DO j1 = 1, totnumneighprocs
370 k = neighproclist(j1)
371 CALL mpi_irecv(recvdatafrm(
k)%rcvbuf(1),numndcomm(j1)*10, &
372 mpi_double_precision,
k, 10,mpi_comm_rocfrac,reqrcv(j1),ierr)
378 DO j1 = 1, totnumneighprocs
379 k = neighproclist(j1)
382 CALL mpi_isend(buf(k2),numndcomm(j1)*10,&
383 mpi_double_precision,
k,10,mpi_comm_rocfrac,reqsnd(j1),ierr)
384 k2 = k2 + numndcomm(j1)*10
389 IF(totnumneighprocs.GT.0)
THEN
390 CALL mpi_waitall(totnumneighprocs,reqrcv,statrcv,ierr)
391 CALL mpi_waitall(totnumneighprocs,reqsnd,statsnd,ierr)
398 DO j1 = 1, totnumneighprocs
399 k = neighproclist(j1)
402 DO j = 1, numndcomm(j1)
403 k2 = neigh_lst(j1)%NdId(
j)
404 f11v(k2) = f11v(k2) + recvdatafrm(
k)%rcvbuf(k1)
405 f12v(k2) = f12v(k2) + recvdatafrm(
k)%rcvbuf(k1+1)
406 f13v(k2) = f13v(k2) + recvdatafrm(
k)%rcvbuf(k1+2)
407 f21v(k2) = f21v(k2) + recvdatafrm(
k)%rcvbuf(k1+3)
408 f22v(k2) = f22v(k2) + recvdatafrm(
k)%rcvbuf(k1+4)
409 f23v(k2) = f23v(k2) + recvdatafrm(
k)%rcvbuf(k1+5)
410 f31v(k2) = f31v(k2) + recvdatafrm(
k)%rcvbuf(k1+6)
411 f32v(k2) = f32v(k2) + recvdatafrm(
k)%rcvbuf(k1+7)
412 f33v(k2) = f33v(k2) + recvdatafrm(
k)%rcvbuf(k1+8)
413 voldefv(k2) = voldefv(k2) + recvdatafrm(
k)%rcvbuf(k1+9)
418 DEALLOCATE(recvdatafrm)
442 IF( jacob.LE.0.d0)
THEN
447 pa(
i) = xkappa*(jacob - 1.d0)
451 detfa = f11*(f22*f33-f23*f32)+f12*(f31*f23-f21*f33)+f13*(-f31*f22+f21*f32)
460 coeff1 = xmu*detfa**(-2.d0/3.d0)
464 doubleproduct = f11**2+f21**2+f31**2+f12**2+f22**2+f32**2+f13**2+f23**2+f33**2
466 cnode(1,1) = (f22*f33-f23*f32)/detfa*doubleproduct
467 cnode(1,2) = -(f21*f33-f23*f31)/detfa*doubleproduct
468 cnode(1,3) = (f32*f21-f31*f22)/detfa*doubleproduct
469 cnode(2,1) = -(f12*f33-f13*f32)/detfa*doubleproduct
470 cnode(2,2) = (f11*f33-f13*f31)/detfa*doubleproduct
471 cnode(2,3) = -(f11*f32-f31*f12)/detfa*doubleproduct
472 cnode(3,1) = (f12*f23-f22*f13)/detfa*doubleproduct
473 cnode(3,2) = -(f11*f23-f21*f13)/detfa*doubleproduct
474 cnode(3,3) = (f11*f22-f12*f21)/detfa*doubleproduct
476 s11n(
i) = coeff1*(f11 - onethird*cnode(1,1))
477 s12n(
i) = coeff1*(f12 - onethird*cnode(1,2))
478 s13n(
i) = coeff1*(f13 - onethird*cnode(1,3))
479 s21n(
i) = coeff1*(f21 - onethird*cnode(2,1))
480 s22n(
i) = coeff1*(f22 - onethird*cnode(2,2))
481 s23n(
i) = coeff1*(f23 - onethird*cnode(2,3))
482 s31n(
i) = coeff1*(f31 - onethird*cnode(3,1))
483 s32n(
i) = coeff1*(f32 - onethird*cnode(3,2))
484 s33n(
i) = coeff1*(f33 - onethird*cnode(3,3))
571 c11 = y24*z34 - z24*y34
572 c21 = -( x24*z34 - z24*x34 )
573 c31 = x24*y34 - y24*x34
575 vx6def = -( x14*c11 + y14*c21 + z14*c31 )
577 vx6invdef = 1.d0 / vx6def
582 IF(voldef.LE.0.d0)
THEN
601 s11e = s11e +
alpha(
k,ielnum)*s11n(nodes(
k,ielnum))
602 s12e = s12e +
alpha(
k,ielnum)*s12n(nodes(
k,ielnum))
603 s13e = s13e +
alpha(
k,ielnum)*s13n(nodes(
k,ielnum))
604 s21e = s21e +
alpha(
k,ielnum)*s21n(nodes(
k,ielnum))
605 s22e = s22e +
alpha(
k,ielnum)*s22n(nodes(
k,ielnum))
606 s23e = s23e +
alpha(
k,ielnum)*s23n(nodes(
k,ielnum))
607 s31e = s31e +
alpha(
k,ielnum)*s31n(nodes(
k,ielnum))
608 s32e = s32e +
alpha(
k,ielnum)*s32n(nodes(
k,ielnum))
609 s33e = s33e +
alpha(
k,ielnum)*s33n(nodes(
k,ielnum))
610 pc = pc +
alpha(
k,ielnum)*pa(nodes(
k,ielnum))
613 sh1 = (y34*z24 - y24*z34) * vx6invdef
614 sh2 = (z34*x24 - z24*x34) * vx6invdef
615 sh3 = (x34*y24 - x24*y34) * vx6invdef
616 sh4 = (y13*z14 - y14*z13) * vx6invdef
617 sh5 = (z13*x14 - z14*x13) * vx6invdef
618 sh6 = (x13*y14 - x14*y13) * vx6invdef
619 sh7 = (y14*z12 - y12*z14) * vx6invdef
620 sh8 = (z14*x12 - z12*x14) * vx6invdef
621 sh9 = (x14*y12 - x12*y14) * vx6invdef
622 sh10 = (y12*z13 - y13*z12) * vx6invdef
623 sh11 = (z12*x13 - z13*x12) * vx6invdef
624 sh12 = (x12*y13 - x13*y12) * vx6invdef
629 rnet(k1n1) = rnet(k1n1) - voldef*pc*sh1
630 rnet(k2n1) = rnet(k2n1) - voldef*pc*sh2
631 rnet(k3n1) = rnet(k3n1) - voldef*pc*sh3
633 rnet(k1n2) = rnet(k1n2) - voldef*pc*sh4
634 rnet(k2n2) = rnet(k2n2) - voldef*pc*sh5
635 rnet(k3n2) = rnet(k3n2) - voldef*pc*sh6
637 rnet(k1n3) = rnet(k1n3) - voldef*pc*sh7
638 rnet(k2n3) = rnet(k2n3) - voldef*pc*sh8
639 rnet(k3n3) = rnet(k3n3) - voldef*pc*sh9
641 rnet(k1n4) = rnet(k1n4) - voldef*pc*sh10
642 rnet(k2n4) = rnet(k2n4) - voldef*pc*sh11
643 rnet(k3n4) = rnet(k3n4) - voldef*pc*sh12
674 c11 = y24*z34 - z24*y34
675 c21 = -( x24*z34 - z24*x34 )
676 c31 = x24*y34 - y24*x34
678 vx6 = -( x14*c11 + y14*c21 + z14*c31 )
687 b1 = (y34*z24 - y24*z34) * vx6inv
688 b2 = (z34*x24 - z24*x34) * vx6inv
689 b3 = (x34*y24 - x24*y34) * vx6inv
690 b4 = (y13*z14 - y14*z13) * vx6inv
691 b5 = (z13*x14 - z14*x13) * vx6inv
692 b6 = (x13*y14 - x14*y13) * vx6inv
693 b7 = (y14*z12 - y12*z14) * vx6inv
694 b8 = (z14*x12 - z12*x14) * vx6inv
695 b9 = (x14*y12 - x12*y14) * vx6inv
696 b10 = (y12*z13 - y13*z12) * vx6inv
697 b11 = (z12*x13 - z13*x12) * vx6inv
698 b12 = (x12*y13 - x13*y12) * vx6inv
700 rnet(k1n1) = rnet(k1n1) - volel0* &
701 ( s11e*b1 + s12e*b2 + s13e*b3 )
702 rnet(k2n1) = rnet(k2n1) - volel0* &
703 ( s21e*b1 + s22e*b2 + s23e*b3 )
704 rnet(k3n1) = rnet(k3n1) - volel0* &
705 ( s31e*b1 + s32e*b2 + s33e*b3 )
707 rnet(k1n2) = rnet(k1n2) - volel0* &
708 ( s11e*b4 + s12e*b5 + s13e*b6 )
709 rnet(k2n2) = rnet(k2n2) - volel0* &
710 ( s21e*b4 + s22e*b5 + s23e*b6 )
711 rnet(k3n2) = rnet(k3n2) - volel0* &
712 ( s31e*b4 + s32e*b5 + s33e*b6 )
714 rnet(k1n3) = rnet(k1n3) - volel0* &
715 ( s11e*b7 + s12e*b8 + s13e*b9 )
716 rnet(k2n3) = rnet(k2n3) - volel0* &
717 ( s21e*b7 + s22e*b8 + s23e*b9 )
718 rnet(k3n3) = rnet(k3n3) - volel0* &
719 ( s31e*b7 + s32e*b8 + s33e*b9 )
721 rnet(k1n4) = rnet(k1n4) - volel0* &
722 ( s11e*b10 + s12e*b11 + s13e*b12 )
723 rnet(k2n4) = rnet(k2n4) - volel0* &
724 ( s21e*b10 + s22e*b11 + s23e*b12 )
725 rnet(k3n4) = rnet(k3n4) - volel0* &
726 ( s31e*b10 + s32e*b11 + s33e*b12 )
731 100
FORMAT(
' Negative Jacobian for element: ',i10)
732 200
FORMAT(
' Negative Jacobian for element (undef): ',i10)
subroutine v3d4n_neohookeanincompress(numnp, numel, coor, disp, nodes, Rnet, S11ev, S22ev, S33ev, S12ev, S23ev, S13ev, NumElNeigh, ElConn, alpha, Ahat, xmu, xkappa, myid, nprocs, TotNumNdComm, TotNumNeighProcs, NeighProcList, NumNdComm, neigh_lst, MPI_STATUS_SIZE, MPI_COMM_ROCFRAC, MPI_DOUBLE_PRECISION, ReqRcv, ReqSnd, StatRcv, StatSnd)
unsigned char alpha() const