1 subroutine shp4T (QuadPt, nQpt, shp, shgl, wght) 2c 3c---------------------------------------------------------------------- 4c 5c This subroutine generates shape functions for the 4-node 6c tetrahedra. 7c 8c input: 9c QuadPt (4,nQpt) : quadrature points' local coord's 10c QuadPt(1,*) : r 11c QuadPt(2,*) : s 12c QuadPt(3,*) : t 13c QuadPt(4,*) : wght 14c nQpt : number of quadrature points 15c 16c output: 17c shp (nen,nQpt) : shape functions 18c shgl (nsd,nen,nQpt) : local-gradient of shape function 19c wght (nQpt) : quadrature weights 20c 21c 22c shape-functions: 23c N1 = 1 - r - s - t 24c N2 = r 25c N3 = s 26c N4 = t 27c 28c Note: To be compatible with design of Tau and DC, the local 29c gradients are divided by 2. This is equivalent to having 30c r=[-1,1], s=[-1,1] and t=[-1,1], without really changing 31c r, s and t points (i.e., Qpt is for r=[0,1], s=[0,1] and 32c t=[0,1] range) 33c 34c Zdenek Johan, Summer 1990. 35c---------------------------------------------------------------------- 36c 37 include "common.h" 38c 39 dimension QuadPt(4,*), shp(nen,*), 40 & shgl(nsd,nen,*), wght(*) 41c 42c.... loop through quadrature points 43c 44 do m = 1, nQpt 45c 46c.... generate the local-shape-functions 47c 48 shp(1,m) = one - QuadPt(1,m) - QuadPt(2,m) - QuadPt(3,m) 49 shp(2,m) = QuadPt(1,m) 50 shp(3,m) = QuadPt(2,m) 51 shp(4,m) = QuadPt(3,m) 52c 53c.... generate the grad-local-shape-functions 54c 55 shgl(1,1,m) = -pt5 56 shgl(2,1,m) = -pt5 57 shgl(3,1,m) = -pt5 58 shgl(1,2,m) = pt5 59 shgl(2,2,m) = zero 60 shgl(3,2,m) = zero 61 shgl(1,3,m) = zero 62 shgl(2,3,m) = pt5 63 shgl(3,3,m) = zero 64 shgl(1,4,m) = zero 65 shgl(2,4,m) = zero 66 shgl(3,4,m) = pt5 67c 68c.... copy the weight 69c 70 wght(m) = QuadPt(4,m) 71c 72c.... end of shape-function loop 73c 74 enddo 75c 76c.... return 77c 78 return 79 end 80