| 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 SPDSEG (A, NENUM, IE2ELB, ISEVOK, |
| 9 |
& NSEGV, IXSEGV, KSEGEL) |
| 10 |
C======================================================================= |
| 11 |
|
| 12 |
C --*** SPDSEG *** (SPLOT) Identify variables with undefined elements |
| 13 |
C -- Written by Amy Gilkey - revised 05/05/88 |
| 14 |
C -- |
| 15 |
C --SPDSEG identifies plot variables that must be drawn in segments. |
| 16 |
C --These are element variables whose value is not defined for some |
| 17 |
C --selected elements. For each segmented variable, a list of the |
| 18 |
C --defined element indices is returned. |
| 19 |
C -- |
| 20 |
C --Parameters: |
| 21 |
C -- A - IN/OUT - the dynamic memory base array |
| 22 |
C -- NENUM - IN - the list of nodes/elements |
| 23 |
C -- IE2ELB - IN - the element block for each element |
| 24 |
C -- ISEVOK - IN - the element block variable truth table; |
| 25 |
C -- variable i of block j exists iff ISEVOK(j,i) |
| 26 |
C -- NSEGV - OUT - the number of "segmented" variables |
| 27 |
C -- IXSEGV - OUT - the index into ISEGEL for "segmented" variables; |
| 28 |
C -- 0 if all selected elements are defined |
| 29 |
C -- KSEGEL - OUT - the dynamic memory index of ISEGEL - the NENUM indices |
| 30 |
C -- of the defined elements |
| 31 |
C -- |
| 32 |
C --Common Variables: |
| 33 |
C -- Uses NNENUM of /SELNE/ |
| 34 |
C -- Uses NSPVAR of /SPVARS/ |
| 35 |
|
| 36 |
include 'params.blk' |
| 37 |
include 'dbnums.blk' |
| 38 |
include 'selne.blk' |
| 39 |
include 'spvars.blk' |
| 40 |
|
| 41 |
DIMENSION A(*) |
| 42 |
INTEGER NENUM(*) |
| 43 |
INTEGER IE2ELB(*) |
| 44 |
LOGICAL ISEVOK(NELBLK,NVAREL) |
| 45 |
INTEGER IXSEGV(*) |
| 46 |
|
| 47 |
CHARACTER CDUM |
| 48 |
|
| 49 |
IF (NODVAR) THEN |
| 50 |
NSEGV = 0 |
| 51 |
CALL INIINT (NSPVAR, 0, IXSEGV) |
| 52 |
KSEGEL = 1 |
| 53 |
|
| 54 |
ELSE |
| 55 |
CALL MDRSRV ('ISEGEL', KSEGEL, 0) |
| 56 |
CALL MDSTAT (NERR, MEM) |
| 57 |
IF (NERR .GT. 0) GOTO 110 |
| 58 |
NSEGV = 0 |
| 59 |
|
| 60 |
DO 100 N = 1, NSPVAR |
| 61 |
IXSEGV(N) = 0 |
| 62 |
|
| 63 |
CALL DBVTYP_BL (ISVID(N), CDUM, ID) |
| 64 |
IF (NUMEQL (.FALSE., NELBLK, ISEVOK(1,ID)) .GT. 0) THEN |
| 65 |
CALL MDLONG ('ISEGEL', KSEGEL, (NSEGV+1) * (1+NNENUM)) |
| 66 |
CALL MDSTAT (NERR, MEM) |
| 67 |
IF (NERR .GT. 0) GOTO 110 |
| 68 |
|
| 69 |
CALL SPDSG1 (NNENUM, NENUM, IE2ELB, ISEVOK(1,ID), |
| 70 |
& NEL, A(KSEGEL)) |
| 71 |
|
| 72 |
IF (NEL .LT. NNENUM) THEN |
| 73 |
NSEGV = NSEGV + 1 |
| 74 |
IXSEGV(N) = NSEGV |
| 75 |
END IF |
| 76 |
END IF |
| 77 |
100 CONTINUE |
| 78 |
|
| 79 |
IF (NSEGV .LE. 0) THEN |
| 80 |
CALL MDDEL ('ISEGEL') |
| 81 |
CALL MDSTAT (NERR, MEM) |
| 82 |
IF (NERR .GT. 0) GOTO 110 |
| 83 |
KSEGEL = 1 |
| 84 |
END IF |
| 85 |
END IF |
| 86 |
|
| 87 |
110 CONTINUE |
| 88 |
RETURN |
| 89 |
END |