| 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 MAKSUR (LENF, NLNKF, LINKF, DODEAD, IDN2B, NPSURF) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** MAKSUR *** (MESH) Determine which nodes are on surface |
| 12 |
C -- Written by Amy Gilkey - revised 03/10/88 |
| 13 |
C -- |
| 14 |
C --MAKSUR calculates the nodes-on-surface indicator (NPSURF). |
| 15 |
C -- |
| 16 |
C --Parameters: |
| 17 |
C -- LENF - IN - the cumulative face counts by element block |
| 18 |
C -- NLNKF - IN - the number of nodes per face |
| 19 |
C -- LINKF - IN - the connectivity for all faces |
| 20 |
C -- DODEAD - IN - add in dead nodes from IDN2B iff true |
| 21 |
C -- IDN2B - IN - the element block for each dead node; dead if >= 0 |
| 22 |
C -- NPSURF - OUT - the node numbers of the surface nodes |
| 23 |
C -- |
| 24 |
C --Common Variables: |
| 25 |
C -- Uses NDIM, NELBLK of /DBNUMS/ |
| 26 |
C -- Sets NNPSUR, NUMNPF of /D3NUMS/ |
| 27 |
|
| 28 |
include 'dbnums.blk' |
| 29 |
include 'd3nums.blk' |
| 30 |
|
| 31 |
INTEGER LENF(0:NELBLK+2) |
| 32 |
INTEGER NLNKF(NELBLK) |
| 33 |
INTEGER LINKF(*) |
| 34 |
LOGICAL DODEAD |
| 35 |
INTEGER IDN2B(NUMNPF) |
| 36 |
INTEGER NPSURF(*) |
| 37 |
|
| 38 |
CALL INIINT (NUMNPF, 0, NPSURF) |
| 39 |
|
| 40 |
C --Mark all nodes that are in surface faces |
| 41 |
|
| 42 |
DO 120 IELB = 1, NELBLK |
| 43 |
IXL0 = IDBLNK (IELB, 0, LENF, NLNKF) - 1 |
| 44 |
DO 110 IFAC = LENF(IELB-1)+1, LENF(IELB) |
| 45 |
DO 100 K = 1, NLNKF(IELB) |
| 46 |
NPSURF(LINKF(IXL0+K)) = 1 |
| 47 |
100 CONTINUE |
| 48 |
IXL0 = IXL0 + NLNKF(IELB) |
| 49 |
110 CONTINUE |
| 50 |
120 CONTINUE |
| 51 |
|
| 52 |
C --Add in dead nodes |
| 53 |
|
| 54 |
IF (DODEAD) THEN |
| 55 |
DO 130 INP = 1, NUMNPF |
| 56 |
IF (IDN2B(INP) .GE. 0) NPSURF(INP) = 1 |
| 57 |
130 CONTINUE |
| 58 |
END IF |
| 59 |
|
| 60 |
C --Make up the list of surface nodes |
| 61 |
|
| 62 |
NNPSUR = 0 |
| 63 |
DO 140 INP = 1, NUMNPF |
| 64 |
IF (NPSURF(INP) .GT. 0) THEN |
| 65 |
NNPSUR = NNPSUR + 1 |
| 66 |
NPSURF(NNPSUR) = INP |
| 67 |
END IF |
| 68 |
140 CONTINUE |
| 69 |
|
| 70 |
RETURN |
| 71 |
END |