| 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 CNTLNK (NELBLK, LENE, NLNKE, LENLNK, NELEMS) |
| 9 |
C======================================================================= |
| 10 |
|
| 11 |
C --*** CNTLNK *** (MESH) Return link array length and number elements |
| 12 |
C -- Written by Amy Gilkey - revised 03/04/88 |
| 13 |
C -- |
| 14 |
C --CNTLNK returns the length of the connectivity array and the number |
| 15 |
C --of elements defined. |
| 16 |
C -- |
| 17 |
C --Parameters: |
| 18 |
C -- NELBLK - IN - the number of element blocks |
| 19 |
C -- LENE - IN - the cumulative element counts by element block |
| 20 |
C -- NLNKE - IN - the number of nodes per element |
| 21 |
C -- LENLNK - OUT - the length of the connectivity array |
| 22 |
C -- NELEMS - OUT - the number of elements |
| 23 |
|
| 24 |
INTEGER LENE(0:*) |
| 25 |
INTEGER NLNKE(*) |
| 26 |
|
| 27 |
NELEMS = 0 |
| 28 |
LENLNK = 0 |
| 29 |
DO 100 IELB = 1, NELBLK |
| 30 |
NUME = LENE(IELB) - LENE(IELB-1) |
| 31 |
NELEMS = NELEMS + NUME |
| 32 |
LENLNK = LENLNK + NUME * NLNKE(IELB) |
| 33 |
100 CONTINUE |
| 34 |
|
| 35 |
RETURN |
| 36 |
END |