| 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 GETALV (A, NALVAR, ALIVAL, ISTEP, LENE, ISEVOK, |
| 9 |
* ALIVE, VAR) |
| 10 |
C======================================================================= |
| 11 |
|
| 12 |
C --*** GETALV *** (MESH) Read birth/death variable |
| 13 |
C -- Written by Amy Gilkey - revised 10/28/87 |
| 14 |
C -- |
| 15 |
C --GETALV reads the values for the requested birth/death variable and |
| 16 |
C --returns the element state. |
| 17 |
C -- |
| 18 |
C --The element is alive iff the input variable is 0.0. |
| 19 |
C -- |
| 20 |
C --Parameters: |
| 21 |
C -- A - IN - the dynamic memory base array |
| 22 |
C -- NALVAR - IN - the variable sequence number |
| 23 |
C -- ALIVAL - IN - the value to indicate element is fully alive |
| 24 |
C -- ISTEP - IN - the time step number |
| 25 |
C -- LENE - IN - the cumulative element counts by element block |
| 26 |
C -- ISEVOK - IN - the element block variable truth table; |
| 27 |
C -- variable i of block j exists iff ISEVOK(j,i) |
| 28 |
C -- ALIVE - OUT - true iff the element i is alive |
| 29 |
C -- VAR - SCRATCH - the birth/death variable array; may be ALIVE |
| 30 |
C -- |
| 31 |
C --Common Variables: |
| 32 |
C -- Uses NUMEL, NELBLK of /DBNUMS/ |
| 33 |
|
| 34 |
include 'dbnums.blk' |
| 35 |
|
| 36 |
DIMENSION A(*) |
| 37 |
INTEGER LENE(0:*) |
| 38 |
LOGICAL ISEVOK(NELBLK,NVAREL) |
| 39 |
LOGICAL ALIVE(NUMEL) |
| 40 |
REAL VAR(NUMEL) |
| 41 |
|
| 42 |
CHARACTER CDUM |
| 43 |
|
| 44 |
CALL GETVAR (A, NALVAR, -1, ISTEP, NUMEL, VAR) |
| 45 |
|
| 46 |
CALL DBVTYP_BL (NALVAR, CDUM, IDALV) |
| 47 |
DO 120 IELB = 1, NELBLK |
| 48 |
IF (ISEVOK(IELB,IDALV)) THEN |
| 49 |
DO 100 IEL = LENE(IELB-1)+1, LENE(IELB) |
| 50 |
ALIVE(IEL) = (VAR(IEL) .EQ. ALIVAL) |
| 51 |
100 CONTINUE |
| 52 |
ELSE |
| 53 |
DO 110 IEL = LENE(IELB-1)+1, LENE(IELB) |
| 54 |
ALIVE(IEL) = .TRUE. |
| 55 |
110 CONTINUE |
| 56 |
END IF |
| 57 |
120 CONTINUE |
| 58 |
|
| 59 |
RETURN |
| 60 |
END |