1!$Id:$
2      subroutine cfunc(shp,xl,ixl,ndm,x)
3
4!      * * F E A P * * A Finite Element Analysis Program
5
6!....  Copyright (c) 1984-2017: Regents of the University of California
7!                               All rights reserved
8
9!-----[--.----+----.----+----.-----------------------------------------]
10!      Purpose: Compute coordinates for point defined by local arrays.
11
12!      Inputs:
13!         shp(3,*)  - Shape function array
14!         xl(ndm,*) - Array of element coordinates
15!         ixl(*)    - Element node numbers
16!         ndm       - Spatial dimension of mesh
17
18!      Outputs:
19!         x(ndm)    - Coordinates of point
20
21!-----[--.----+----.----+----.-----------------------------------------]
22      implicit  none
23
24      integer   k,l,ndm
25
26      integer   ixl(*)
27      real*8    shp(3,*),xl(3,*),x(*)
28
29      do l = 1,ndm
30        x(l) = 0.0d0
31      end do
32
33      do k = 1,9
34        if(ixl(k).gt.0) then
35          do l = 1,ndm
36            x(l) = x(l) + shp(3,ixl(k))*xl(l,ixl(k))
37          end do
38        end if
39      end do
40
41      end
42