85 numnp,nstart,nend,numel,mattype,nummattype,enhanced_map,mixed_map,nummatvol)
100 integer :: nummattype
103 REAL*8,
DIMENSION(1:3,1:numnp) :: coor
105 INTEGER,
DIMENSION(1:8,1:NumEl) :: elconnvol
106 INTEGER,
DIMENSION(1:NumEl) :: mattype
108 REAL*8,
DIMENSION(1:6,1:6,NumMatType) :: ci
110 REAL*8,
DIMENSION(1:3*numnp) :: r_in
112 REAL*8,
DIMENSION(1:3*numnp) :: disp
115 INTEGER :: n1,n2,n3,n4,n5,n6,n7,n8,n9,n10
117 INTEGER :: k1n1,k1n2,k1n3,k1n4,k1n5,k1n6,k1n7,k1n8
118 INTEGER :: k2n1,k2n2,k2n3,k2n4,k2n5,k2n6,k2n7,k2n8
119 INTEGER :: k3n1,k3n2,k3n3,k3n4,k3n5,k3n6,k3n7,k3n8
121 REAL*8,
DIMENSION(1:3,1:8) ::
coord
124 REAL*8 :: element_volume
125 INTEGER :: ielem, imat
127 REAL*8 nnn(8), dn(8,3), jac(3,3), jacinv(3,3), &
128 dn20(20,3),nnn20(20),&
130 dmat(9,9), bmat(9,24), bmat2(1:8,1:9,1:24), &
131 grad(9,24), tmp38(3,8), coeff(8),&
132 tkront(9,9), tkrontinv(9,9),&
134 gsm(12,24), gbg(12,12), bmat_avg(9,24),&
135 bu(9,24), ba(9,9), bsm(12,24),&
136 kuu(24,24), kau(9,24), kaa(9,9),atol, bavec(1:9,1:9,1:8), buvec(1:9,1:24,1:8),&
137 tmp249(24,9),tmp91(9,1),kaa_copy(9,9),enh2(9),dnorm,bmatigs(1:8,1:9,1:24),&
138 stresstmp(9,1), tmp9(9),dmatinf(5,9,9)
142 REAL*8,
DIMENSION(1:8) :: wi = &
143 (/1.000000000000000,1.000000000000000,1.000000000000000, &
144 1.000000000000000,1.000000000000000,1.000000000000000, &
145 1.000000000000000,1.000000000000000/)
149 REAL*8,
DIMENSION(1:3,1:8) :: ri = reshape( &
150 (/-0.577350269189626,-0.577350269189626,-0.577350269189626, &
151 0.577350269189626,-0.577350269189626,-0.577350269189626, &
152 0.577350269189626, 0.577350269189626,-0.577350269189626, &
153 -0.577350269189626, 0.577350269189626,-0.577350269189626, &
154 -0.577350269189626,-0.577350269189626, 0.577350269189626, &
155 0.577350269189626,-0.577350269189626, 0.577350269189626, &
156 0.577350269189626, 0.577350269189626, 0.577350269189626, &
157 -0.577350269189626, 0.577350269189626, 0.577350269189626/),(/3,8/) )
159 REAL*8,
DIMENSION(1:9,1:9) :: sop = reshape( &
160 (/1.000000000000000,0.000000000000000,0.000000000000000, &
161 0.000000000000000,0.000000000000000,0.000000000000000, &
162 0.000000000000000,0.000000000000000,0.000000000000000, &
163 0.000000000000000,0.500000000000000,0.000000000000000, &
164 0.500000000000000,0.000000000000000,0.000000000000000, &
165 0.000000000000000,0.000000000000000,0.000000000000000, &
166 0.000000000000000,0.000000000000000,0.500000000000000, &
167 0.000000000000000,0.000000000000000,0.000000000000000, &
168 0.500000000000000,0.000000000000000,0.000000000000000, &
169 0.000000000000000,0.500000000000000,0.000000000000000, &
170 0.500000000000000,0.000000000000000,0.000000000000000, &
171 0.000000000000000,0.000000000000000,0.000000000000000, &
172 0.000000000000000,0.000000000000000,0.000000000000000, &
173 0.000000000000000,1.000000000000000,0.000000000000000, &
174 0.000000000000000,0.000000000000000,0.000000000000000, &
175 0.000000000000000,0.000000000000000,0.000000000000000, &
176 0.000000000000000,0.000000000000000,0.500000000000000, &
177 0.000000000000000,0.500000000000000,0.000000000000000, &
178 0.000000000000000,0.000000000000000,0.500000000000000, &
179 0.000000000000000,0.000000000000000,0.000000000000000, &
180 0.500000000000000,0.000000000000000,0.000000000000000, &
181 0.000000000000000,0.000000000000000,0.000000000000000, &
182 0.000000000000000,0.000000000000000,0.500000000000000, &
183 0.000000000000000,0.500000000000000,0.000000000000000, &
184 0.000000000000000,0.000000000000000,0.000000000000000, &
185 0.000000000000000,0.000000000000000,0.000000000000000, &
186 0.000000000000000,0.000000000000000,1.000000000000000/),(/9,9/) )
188 REAL*8,
DIMENSION(1:3,1:3) :: dident = reshape( &
189 (/1.000000000000000,0.000000000000000,0.000000000000000, &
190 0.000000000000000,1.000000000000000,0.000000000000000, &
191 0.000000000000000,0.000000000000000,1.000000000000000/),(/3,3/) )
193 REAL*8 ::
zero = 0.0, one = 1.0, detj,det, three = 3.
195 REAL*8 :: alpha2,
alpha
196 REAL*8,
DIMENSION(1:9) :: fenh
197 REAL*8,
DIMENSION(1:9,1:9) :: e_enhanced
198 REAL*8 :: maxdisp, con1, tp,
sum
199 REAL*8 :: threeeighth = 3./8.
202 REAL*8,
DIMENSION(8) :: xi, eta, zeta
203 REAL*8,
DIMENSION(8) :: xie, etae, zetae
204 REAL(KIND=8),
DIMENSION(1:8,1:9,1:12) :: mixed_map
205 REAL(KIND=8),
DIMENSION(1:8,1:9,1:9) :: enhanced_map
206 REAL(KIND=8),
DIMENSION(1:8,1:8) :: shapefun,shapefune
207 INTEGER :: otdev,mcrd,nnode
208 INTEGER,
parameter :: ngpts = 8
209 REAL(KIND=8) :: strainenh(1:ngpts,1:9,1:numel)
212 INTEGER :: nstart, nend
214 REAL(KIND=8),
DIMENSION(1:24,1:24) :: amatrx
222 INTEGER :: dof1, dof2
223 INTEGER :: ldof1, ldof2
224 INTEGER :: gdof1, gdof2
226 REAL(kind=wp) :: tempval
230 CALL
numknnz(numnp,numel,elconnvol,nnz_k)
231 ALLOCATE(rp_k(1:3*gnumnp+1))
232 ALLOCATE(cval_k(1:nnz_k))
233 ALLOCATE(aval_k(1:nnz_k))
234 CALL
initk(numnp,numel,elconnvol,nnz_k,rp_k,cval_k,aval_k)
237 DO ielem = nstart, nend
239 imat = mattype(ielem)
243 n1 = elconnvol(1,ielem)
244 n2 = elconnvol(2,ielem)
245 n3 = elconnvol(3,ielem)
246 n4 = elconnvol(4,ielem)
247 n5 = elconnvol(5,ielem)
248 n6 = elconnvol(6,ielem)
249 n7 = elconnvol(7,ielem)
250 n8 = elconnvol(8,ielem)
279 coord(1,1) = coor(1,n1)
280 coord(2,1) = coor(2,n1)
281 coord(3,1) = coor(3,n1)
283 coord(1,2) = coor(1,n2)
284 coord(2,2) = coor(2,n2)
285 coord(3,2) = coor(3,n2)
287 coord(1,3) = coor(1,n3)
288 coord(2,3) = coor(2,n3)
289 coord(3,3) = coor(3,n3)
291 coord(1,4) = coor(1,n4)
292 coord(2,4) = coor(2,n4)
293 coord(3,4) = coor(3,n4)
295 coord(1,5) = coor(1,n5)
296 coord(2,5) = coor(2,n5)
297 coord(3,5) = coor(3,n5)
299 coord(1,6) = coor(1,n6)
300 coord(2,6) = coor(2,n6)
301 coord(3,6) = coor(3,n6)
303 coord(1,7) = coor(1,n7)
304 coord(2,7) = coor(2,n7)
305 coord(3,7) = coor(3,n7)
307 coord(1,8) = coor(1,n8)
308 coord(2,8) = coor(2,n8)
309 coord(3,8) = coor(3,n8)
348 bmat_avg(1:9,1:24) = 0.
497 element_volume = element_volume + coeff(igpt)
499 t(1:3,1:3) = t(1:3,1:3) + jac * coeff(igpt)
503 CALL
tensormul(jacinv,3,3,
't',dn,8,3,
't',tmp38,3,one,
zero)
505 CALL
tensormul(sop,9,9,
'n',grad,9,24,
'n',bmat,9,one,
zero)
507 bmat2(igpt,:,:) = bmat(:,:)
509 bmat_avg(:,:) = bmat_avg(:,:) + bmat(:,:) * coeff(igpt)
513 t(1:3,1:3) = t(1:3,1:3) / element_volume
514 tinv(1:3,1:3) = t(1:3,1:3)
518 bmat_avg = bmat_avg / element_volume
536 e_mixed(1:9,1:12) = mixed_map(igpt,1:9,1:12)
537 CALL
tensormul(e_mixed,9,12,
't',e_mixed,9,12,
'n',gbg,12,one,one)
540 bmat(1:9,1:24) = bmat2(igpt,1:9,1:24) - bmat_avg(1:9,1:24)
541 CALL
tensormul(tkront,9,9,
't',bmat,9,24,
'n',grad,9,one,
zero)
545 CALL
tensormul(e_mixed,9,12,
't',grad,9,24,
'n',gsm,12,alpha2,one)
553 bsm(1,1:24) = gsm(1,1:24)*threeeighth
554 bsm(2,1:24) = gsm(2,1:24)*threeeighth
555 bsm(3,1:24) = gsm(3,1:24)* three*threeeighth
556 bsm(4,1:24) = gsm(4,1:24)*threeeighth
557 bsm(5,1:24) = gsm(5,1:24)*threeeighth
558 bsm(6,1:24) = gsm(6,1:24)* three*threeeighth
559 bsm(7,1:24) = gsm(7,1:24)*threeeighth
560 bsm(8,1:24) = gsm(8,1:24)*threeeighth
561 bsm(9,1:24) = gsm(9,1:24)* three*threeeighth
562 bsm(10,1:24) = gsm(10,1:24)*threeeighth*0.5
563 bsm(11,1:24) = gsm(11,1:24)*threeeighth*0.5
564 bsm(12,1:24) = gsm(12,1:24)*threeeighth*0.5
580 e_mixed(1:9,1:12) = mixed_map(igpt,1:9,1:12)
583 e_enhanced(1:9,1:9) = enhanced_map(igpt,1:9,1:9)
587 CALL
tensormul(e_mixed,9,12,
'n',bsm,12,24,
'n',grad,9,one,
zero)
588 CALL
tensormul(tkrontinv,9,9,
't',grad,9,24,
'n',bu,9,one,
zero)
589 bu(1:9,1:24) = bu(1:9,1:24) / detj + bmat_avg(1:9,1:24)
593 CALL
tensormul(tkrontinv,9,9,
't',e_enhanced,9,9,
'n',ba,9,one,
zero)
598 ba(1:9,1:9) = ba(1:9,1:9) /detj
605 CALL
tensormul(dmat(:,:),9,9,
'n',bu,9,24,
'n',grad,9,one,
zero)
607 CALL
tensormul(bu,9,24,
't',grad,9,24,
'n',kuu,24,detj,one)
609 CALL
tensormul(ba,9,9,
't',grad,9,24,
'n',kau,9,detj,one)
611 CALL
tensormul(dmat(:,:),9,9,
'n',ba,9,9,
'n',tkront,9,one,
zero)
613 CALL
tensormul(ba,9,9,
't',tkront,9,9,
'n',kaa,9,detj,one)
626 CALL
tensormul(kaa,9,9,
'n',kau,9,24,
'n',grad,9,one,
zero)
627 call
tensormul(kau,9,24,
't',grad,9,24,
'n',amatrx,24,-one,one)
631 atol = abs(amatrx(
i,
j)-amatrx(
j,
i))
632 IF(atol.GE.1.0e-03)
THEN
633 WRITE(7,*)
'>>> amatrx is UNSYMMETRIC, fatal error', &
634 ' i =',
i,
' j =',
j,
' diff =', atol
646 gdof1 = 3 * local2global(elconnvol(
i,ielem)) - 3 + dof1
647 ldof1 = 3 *
i - 3 + dof1
649 ldof2 = 3 *
j - 3 + dof2
650 gdof2 = 3 * local2global(elconnvol(
j,ielem)) - 3 + dof2
653 IF ( ldof1 <= ldof2 )
THEN
654 tempval = amatrx(ldof1,ldof2)
656 tempval = amatrx(ldof2,ldof1)
660 IF (tempval /= 0.0)
THEN
662 DO m = rp_k(gdof1)+1, rp_k(gdof1+1)
663 IF (cval_k(
m) == gdof2-1)
THEN
664 aval_k(
m) = aval_k(
m) + tempval
668 if(counter==0)
print*,
'WARNING: Unable to add value to K matrix at (',gdof1,
',',gdof2, &
669 ') on processor ',myid
671 print*,myid,
'ZERO DETECTED IN LOCAL STIFFNESS MATRIX!',gdof1,gdof2
709 ALLOCATE(rp_temp(1:3*gnumnp+1),cval_temp(1:nnz_k),aval_temp(1:nnz_k))
714 DEALLOCATE(rp_k,cval_k,aval_k)
723 REAL*8,
DIMENSION(1:6,1:6) :: ci
724 REAL*8,
DIMENSION(1:9,1:9) :: dmat
subroutine numknnz(NumNp, NumEl, ElConnVol, nnz)
Tfloat sum() const
Return the sum of all the pixel values in an image.
void zero()
Sets all entries to zero (more efficient than assignement).
subroutine invert(a, nrow, det)
subroutine tensormul(a, lda, n, achar, b, ldb, m, bchar, c, ldc, alpha, beta)
int coord[NPANE][NROW *NCOL][3]
subroutine kronecker_product(a, lda, nda, b, ldb, ndb, c, ldc)
subroutine invert3x3(a, det)
subroutine get_jacobien(coords, mcrd, nnode, dn, jac, jacinv, detj, error)
subroutine initk(NumNp, NumEl, ElConnVol, nnz, rp, cval, aval)
subroutine map_ci2dmat(ci, dmat)
unsigned char alpha() const
subroutine implicit_v3d8_me_k(coor, ElConnVol, ci, numnp, nstart, nend, NumEL, MatType, NumMatType, enhanced_map, mixed_map, NumMatVol)
subroutine get_shape(r, n, dn, igpt)