Debian Codegraph @

packages/seacas/applications/blot/mslins.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 MSLINS (A, LENF, NLNKF, LINKF, IF2EL, LENL, KLNSET)
9 C=======================================================================
10
11 C --*** MSLINS *** (MESH) Create line set from surface faces
12 C -- Written by Amy Gilkey - revised 03/29/88
13 C --
14 C --MSLINS creates a line set of all lines making up the surface faces.
15 C --The lines are classified and sorted into the following parts:
16 C -- -1) Edge
17 C -- 0) Element block boundary
18 C -- n) Interior within element block 'n'
19 C --
20 C --Parameters:
21 C -- A - IN - the dynamic memory base array
22 C -- LENF - IN - the cumulative face counts by element block
23 C -- NLNKF - IN - the number of nodes per face
24 C -- LINKF - IN - the connectivity for all surface faces
25 C -- IF2EL - IN - the element number of each face
26 C -- LENL - OUT - the cumulative line counts by element block
27 C -- KLNSET - OUT - the dynamic memory index of sorted line set,
28 C -- for surface faces only
29 C --
30 C --Common Variables:
31 C -- Uses NELBLK of /DBNUMS/
32 C -- Uses IS3DIM, NUMNPF of /D3NUMS/
33
34 include 'dbnums.blk'
35 include 'd3nums.blk'
36
37 DIMENSION A(*)
38 INTEGER LENF(0:*)
39 INTEGER NLNKF(*)
40 INTEGER LINKF(*)
41 INTEGER IF2EL(*)
42 INTEGER LENL(-2:NELBLK)
43
44 C --Invalidate the linset array before reassigning to prevent the
45 C --movement of worthless data
46 CALL MDLONG ('LINSET', KLNSET, 0)
47
48 IF (.NOT. IS3DIM) THEN
49 LLNSET = 2
50 CALL CNTLNK (NELBLK, LENF, NLNKF, MAXLIN, IDUM)
51 CALL MDLONG ('LINSET', KLNSET, LLNSET * MAXLIN)
52 CALL MDRSRV ('IEBSET', KEBSET, MAXLIN)
53 CALL MDRSRV ('LINDEF', KLNDEF, (1+LLNSET) * MAXLIN)
54 CALL MDRSRV ('NREF', KNREF, NUMNPF)
55 CALL MDRSRV ('LREF', KLREF, NUMNPF)
56 CALL MDSTAT (NERR, MEM)
57 IF (NERR .GT. 0) GOTO 100
58
59 CALL GEOM2D (LENF, NLNKF, LINKF, IF2EL,
60 & LENL, A(KLNSET), A(KEBSET), A(KLNDEF),
61 & A(KNREF), A(KLREF))
62 MAXLIN = LENL(NELBLK)
63
64 CALL MDDEL ('IEBSET')
65 CALL MDDEL ('LINDEF')
66 CALL MDDEL ('NREF')
67 CALL MDDEL ('LREF')
68
69 ELSE
70 LLNSET = 3
71 CALL CNTLNK (NELBLK, LENF, NLNKF, MAXLIN, IDUM)
72 CALL MDLONG ('LINSET', KLNSET, LLNSET * MAXLIN)
73 CALL MDRSRV ('LINDEF', KLNDEF, 6 * MAXLIN)
74 CALL MDRSRV ('LREF', KLREF, NUMNPF)
75 CALL MDSTAT (NERR, MEM)
76 IF (NERR .GT. 0) GOTO 100
77
78 CALL GEOM3D (LENF, NLNKF, LINKF, IF2EL,
79 & LENL, A(KLNSET), A(KLNDEF), A(KLREF))
80 MAXLIN = LENL(NELBLK)
81
82 CALL MDDEL ('LREF')
83 CALL MDDEL ('LINDEF')
84 END IF
85
86 CALL MDLONG ('LINSET', KLNSET, LLNSET * MAXLIN)
87 CALL MDSTAT (NERR, MEM)
88 IF (NERR .GT. 0) GOTO 100
89
90 100 CONTINUE
91 RETURN
92 END