Debian Codegraph @

packages/seacas/applications/blot/fixelb.f

raw
1 C Copyright(C) 1999-2020 National Technology & Engineering Solutions
2 C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 C NTESS, the U.S. Government retains certain rights in this software.
4 C
5 C See packages/seacas/LICENSE for details
6
7 C=======================================================================
8 SUBROUTINE FIXELB (IELBST, LENF, IF2EL, IF2EL2, IE2ELB, NEWELB)
9 C=======================================================================
10
11 C --*** FIXELB *** (MESH) Turn on/off element blocks (3D)
12 C -- Written by Amy Gilkey - revised 03/10/88
13 C --
14 C --FIXELB adjusts the face array to reflect the new ON element blocks.
15 C --Faces in OFF element blocks are moved to the LENF(NELBLK+4) set.
16 C --
17 C --Parameters:
18 C -- IELBST - IN - the element block status (>=0 if ON)
19 C -- LENF - IN - the cumulative face counts by element block (3D only)
20 C -- IF2EL - IN - the element number of each face
21 C -- IF2EL2 - IN - the secondary element number of each face
22 C -- IE2ELB - IN - the element block for each element
23 C -- NEWELB - OUT - size = LENF(NELBLK+1)
24 C --
25 C --Common Variables:
26 C -- Uses NELBLK of /DBNUMS/
27
28 include 'dbnums.blk'
29 include 'd3nums.blk'
30
31 INTEGER IELBST(NELBLK)
32 INTEGER LENF(0:NELBLK+4)
33 INTEGER IF2EL(*), IF2EL2(*)
34 INTEGER IE2ELB(NUMEL)
35 INTEGER NEWELB(*)
36
37 C --Check each face by its defining elements, and move face if necessary
38
39 DO 110 IELB = 1, NELBLK+4
40 DO 100 IFAC = LENF(IELB-1)+1, LENF(IELB)
41
42 C --Determine the number of elements with ON element blocks
43
44 NON = 0
45 IF (IELBST(IE2ELB(IF2EL(IFAC))) .GE. 0) NON = NON + 1
46 IEL = IF2EL2(IFAC)
47 IF (IEL .GT. 0) THEN
48 IF (IELBST(IE2ELB(IEL)) .GE. 0) NON = NON + 1
49 END IF
50
51 IF (NON .EQ. 0) THEN
52
53 C --If none ON, change to an OFF face
54 NEWELB(IFAC) = NELBLK+4
55
56 ELSE IF (NON .EQ. 1) THEN
57
58 C --If one face ON, change to a surface face
59 IF (IELBST(IE2ELB(IF2EL(IFAC))) .GE. 0) THEN
60 NEWELB(IFAC) = IE2ELB(IF2EL(IFAC))
61 ELSE
62 C --Swap nodes to simulate surface being defined by facing element
63 NEWELB(IFAC) = - IE2ELB(IF2EL2(IFAC))
64 END IF
65
66 ELSE
67
68 C --If both element blocks ON, change to an interior face
69 NEWELB(IFAC) = NELBLK+1
70
71 END IF
72
73 100 CONTINUE
74 110 CONTINUE
75
76 RETURN
77 END