Debian Codegraph @

packages/seacas/applications/blot/maksu2.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 MAKSU2 (LENL, LINSET, MAXMSH, DODEAD, IDN2B, NPSURF)
9 C=======================================================================
10
11 C --*** MAKSU2 *** (MESH) Determine which nodes are on surface (2D)
12 C -- Written by Amy Gilkey - revised 03/10/88
13 C --
14 C --MAKSU2 calculates the nodes-on-surface indicator (NPSURF).
15 C --
16 C --Parameters:
17 C -- LENL - IN/OUT - the cumulative line counts by element block
18 C -- LINSET - IN/OUT - the sorted line set
19 C -- MAXMSH - IN - the maximum mesh line types to be displayed
20 C -- (as in MSHLIN of /MSHOPT/)
21 C -- DODEAD - IN - add in dead nodes from IDN2B iff true
22 C -- IDN2B - IN - the element block for each dead node; dead if >= 0
23 C -- NPSURF - OUT - the node numbers of the mesh boundary nodes
24 C --
25 C --Common Variables:
26 C -- Uses NDIM, NELBLK of /DBNUMS/
27 C -- Sets NNPSUR, NUMNPF of /D3NUMS/
28
29 PARAMETER (MSHNON=0, MSHBOR=1, MSHDIV=2, MSHSEL=3, MSHALL=4)
30
31 include 'dbnums.blk'
32 include 'd3nums.blk'
33
34 INTEGER LENL(-2:NELBLK), LINSET(LLNSET,*)
35 LOGICAL DODEAD
36 INTEGER IDN2B(NUMNPF)
37 INTEGER NPSURF(NUMNPF)
38
39 C --Determine nodes to be included
40
41 IF (MAXMSH .LE. MSHBOR) THEN
42 NODSUR = -1
43 ELSE IF (MAXMSH .LE. MSHDIV) THEN
44 NODSUR = 0
45 ELSE IF (MAXMSH .LE. MSHALL) THEN
46 NODSUR = NELBLK
47 END IF
48
49 CALL INIINT (NUMNPF, 0, NPSURF)
50
51 C --Mark all nodes in the selected line sets
52
53 DO 110 IL = 1, LENL(NODSUR)
54 DO 100 K = 1, 2
55 NPSURF(LINSET(K,IL)) = 1
56 100 CONTINUE
57 110 CONTINUE
58
59 C --Add in dead nodes
60
61 IF (DODEAD) THEN
62 DO 120 INP = 1, NUMNPF
63 IF (IDN2B(INP) .GE. 0) NPSURF(INP) = 1
64 120 CONTINUE
65 END IF
66
67 C --Make up the list of selected nodes
68
69 NNPSUR = 0
70 DO 130 INP = 1, NUMNPF
71 IF (NPSURF(INP) .GT. 0) THEN
72 NNPSUR = NNPSUR + 1
73 NPSURF(NNPSUR) = INP
74 END IF
75 130 CONTINUE
76
77 RETURN
78 END