Debian Codegraph @

packages/seacas/applications/explore/exp_cknps.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 C=======================================================================
7 SUBROUTINE CKNPS (NUMNPS, LNPSNL, NUMNP,
8 & IDNPS, NNNPS, IXNNPS, LTNNPS, FACNPS, ICHECK)
9 C=======================================================================
10
11 C --*** CKNPS *** (EXPLORE) Check database nodal point sets
12 C --
13 C --CKNPS checks the nodal point set information.
14 C --An error message is displayed if the end of file is read.
15 C --
16 C --Parameters:
17 C -- NUMNPS - IN - the number of nodal point sets
18 C -- LNPSNL - IN - the number of nodes for all sets
19 C -- NUMNP - IN - the number of nodes
20 C -- IDNPS - IN - the nodal point set ID for each set
21 C -- NNNPS - IN - the number of nodes for each set
22 C -- IXNNPS - IN - the index of the first node for each set
23 C -- LTNNPS - IN - the nodes for all sets
24 C -- FACNPS - IN - the distribution factors for all sets
25 C -- ICHECK - SCRATCH - size = MAX (NUMNPS, LNPSNL)
26
27 INTEGER IDNPS(*)
28 INTEGER NNNPS(*)
29 INTEGER IXNNPS(*)
30 INTEGER LTNNPS(*)
31 REAL FACNPS(*)
32 INTEGER ICHECK(*)
33
34 CHARACTER*5 STRA
35
36 C --Check for unique identifier
37
38 DO 100 INPS = 1, NUMNPS
39 IF (LOCINT (IDNPS(INPS), INPS-1, IDNPS) .GT. 0) THEN
40 CALL INTSTR (1, 0, IDNPS(INPS), STRA, LSTRA)
41 CALL PRTERR ('CMDSPEC', 'Nodal point set ID '
42 & // STRA(:LSTRA) // ' is not unique')
43 END IF
44 100 CONTINUE
45
46 C --Check number of nodes in nodal point sets
47
48 NNPS = 0
49 DO 110 INPS = 1, NUMNPS
50 NNPS = MAX (NNPS, IXNNPS(INPS) + NNNPS(INPS) - 1)
51 110 CONTINUE
52
53 IF (NNPS .NE. LNPSNL) THEN
54 CALL PRTERR ('WARNING', 'Maximum node index' //
55 & ' in all nodal point sets does not match total')
56 END IF
57
58 C --Check all nodes in node point sets are within node range
59
60 CALL CHKRNG (LTNNPS, LNPSNL, NUMNP, NZERO, NERR)
61 IF (NERR .GT. 0) THEN
62 CALL PRTERR ('FATAL',
63 & 'Nodal point set node ids are out of range')
64 END IF
65 IF (NZERO .GT. 0) THEN
66 CALL PRTERR ('FATAL',
67 & 'Nodal point set node ids are zero')
68 END IF
69
70 RETURN
71 END