xref: /phasta/phSolver/common/shp10t.f (revision 595995161822a203c8467e0e4a253d7bd7d6df32)
1        subroutine shp10T (QuadPt, nQpt,   shp,    shgl,   wght)
2c
3c----------------------------------------------------------------------
4c
5c  This subroutine generates shape functions for the 10-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
42        call error ('shape   ','not-impl',10)
43c
44c.... loop through quadrature points
45c
46        do m = 1, nQpt
47c
48c.... generate the local-shape-functions
49c
50          shp(1,m) = one - QuadPt(1,m) - QuadPt(2,m) - QuadPt(3,m)
51          shp(2,m) = QuadPt(1,m)
52          shp(3,m) = QuadPt(2,m)
53          shp(4,m) = QuadPt(3,m)
54c
55c.... generate the grad-local-shape-functions
56c
57          shgl(1,1,m) = -pt5
58          shgl(2,1,m) = -pt5
59          shgl(3,1,m) = -pt5
60          shgl(1,2,m) =  pt5
61          shgl(2,2,m) =  zero
62          shgl(3,2,m) =  zero
63          shgl(1,3,m) =  zero
64          shgl(2,3,m) =  pt5
65          shgl(3,3,m) =  zero
66          shgl(1,4,m) =  zero
67          shgl(2,4,m) =  zero
68          shgl(3,4,m) =  pt5
69c
70c.... copy the weight
71c
72          wght(m) = QuadPt(4,m)
73c
74c.... end of shape-function loop
75c
76        enddo
77c
78c.... return
79c
80        return
81        end
82