Debian Codegraph @

packages/seacas/applications/gen3d/g3_newnps.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 NEWNPS (IDFRO, IDBCK,
9 & IDNPS, NNNPS, NNNP3, IXNNPS, IXNNP3,
10 & LTNNPS, LTNNP3, FACNPS, FACNP3,
11 & IXNP, NRNP)
12 C=======================================================================
13
14 C --*** NEWNPS *** (GEN3D) Calculate 3D node sets
15 C -- Written by Amy Gilkey - revised 05/05/86
16 C --
17 C --NEWNPS calculates the node set information for the 3D database.
18 C --The front and back node sets are not calculated (since they
19 C --are easily derived), and they are not included in the length tally.
20 C --
21 C --Parameters:
22 C -- IDFRO - IN - ids for front surface node sets; (0) = length
23 C -- IDBCK - IN - ids for back surface node sets; (0) = length
24 C -- IDNPS - IN - the 2D node sets ids
25 C -- NNNPS - IN - the number of nodes for each 2D set
26 C -- NNNP3 - OUT - the number of nodes for each 3D set
27 C -- IXNNPS - IN - the index of the first node for each 2D set
28 C -- IXNNP3 - OUT - the index of the first node for each 3D set
29 C -- LTNNPS - IN - the nodes for all 2D sets
30 C -- LTNNP3 - OUT - the nodes for all 3D sets
31 C -- FACNPS - IN - the distribution factors for all 2D sets
32 C -- FACNP3 - OUT - the distribution factors for all 3D sets
33 C -- IXNP - IN - the new index for each node
34 C -- NRNP - IN - the number of new nodes generated for each node
35 C --
36 C --Common Variables:
37 C -- Uses NDBOUT of /DBASE/
38 C -- Uses NUMNPS, LNPSNL of /DBNUMS/
39 C -- Sets LNPSNO of /DBNUM3/
40 C -- Uses NNREPL of /PARAMS/
41
42 INCLUDE 'g3_dbtitl.blk'
43 INCLUDE 'g3_dbnums.blk'
44 INCLUDE 'g3_dbnum3.blk'
45 INCLUDE 'g3_params.blk'
46
47 INTEGER IDFRO(0:*)
48 INTEGER IDBCK(0:*)
49 INTEGER IDNPS(*)
50 INTEGER NNNPS(*), NNNP3(*)
51 INTEGER IXNNPS(*), IXNNP3(*)
52 INTEGER LTNNPS(*), LTNNP3(*)
53 REAL FACNPS(*), FACNP3(*)
54 INTEGER IXNP(*), NRNP(*)
55
56 C --Node set ids - unchanged
57
58 CONTINUE
59
60 C --Node set nodes and distribution factors - add on nodes for each
61 C --plate/slice
62
63 N = 0
64 DO 30 NPS = 1, NUMNPS
65 C --Index of each node set nodes
66 IXNNP3(NPS) = N + 1
67
68 IP0 = IXNNPS(NPS) - 1
69 DO 20 I = 1, NNNPS(NPS)
70 INP = LTNNPS(IP0+I)
71 JNP = IXNP(INP)
72 DO 10 NR = 1, NRNP(INP)
73 N = N + 1
74 LTNNP3(N) = JNP + NR-1
75 FACNP3(N) = FACNPS(IP0+I)
76 10 CONTINUE
77 20 CONTINUE
78
79 C --Number of nodes in each set
80 NNNP3(NPS) = N - IXNNP3(NPS) + 1
81 30 CONTINUE
82
83 C --Number of nodes in all sets
84 LNPSNO = N
85
86 RETURN
87 END