1!$Id:$
2      subroutine plface(ix,ip,x,ndm,nen1,numnp,numel,iln,ct)
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: Driver routine to display visible faces of elements
11!               in perspective views.
12
13!      Inputs:
14!         ix(nen1,*)- Nodal connection list
15!         ip(*)     - Sorted order for symmetry plots
16!         x(ndm,*)  - Nodal coordinates for plot
17!         nen1      - Dimension of ix array
18!         numnp     - Number of nodes
19!         numel     - Number of elements/faces
20!         iln(*)    - Line type data
21!         ct        - Option to plot faces with negative normals
22
23!      Outputs:
24!         none      - Plot outputs to screen/file
25!-----[--.----+----.----+----.-----------------------------------------]
26
27      implicit  none
28
29      include  'pdata4.h'
30
31      integer   n, ndm, nen1, numnp, numel, nface, iln(2)
32
33      integer   ix(nen1,numel), ip(numel)
34      real*8    x(ndm,numnp),ct
35
36      save
37
38!     Plot faces which are visible
39
40      nface = 0
41      do n = 1,numel
42        if(ix(nen1,n).gt.0) then
43          ip(n) = n
44          call pfacev(ix(1,n),x,ndm,iln,ct,ip(n),nface)
45        else
46          ip(n) = 0
47        endif
48      end do
49
50!     Pack ip array
51
52      nface = 0
53      do n = 1,numel
54        if(ip(n).gt.0 .and. ix(nen1,n).gt.0) then
55          nface = nface + 1
56          ip(nface) = ip(n)
57          if(n.gt.nface) then
58            ip(n) = 0
59          endif
60        endif
61      end do
62      nfac = nface
63
64!     Set line type to original
65
66      call plline(iln)
67
68      end
69