| 1 |
C Copyright(C) 1999-2020, 2023 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 AVG(IGLND,INVCN,MAXLN,INVLEN,SOLEA,SOLENA,ITT,iblk) |
| 9 |
|
| 10 |
C************************************************************************ |
| 11 |
|
| 12 |
C Subroutine AVG provides for translating nodal values of element |
| 13 |
C variables back to the element centroids for the special case where |
| 14 |
C too few elements can be associated with a node. Element variable |
| 15 |
C data is simply averaged at that node. |
| 16 |
|
| 17 |
C Called by ELTON1 |
| 18 |
|
| 19 |
C************************************************************************ |
| 20 |
|
| 21 |
C IGLND INT The global node number |
| 22 |
C INVCN INT The inverse connectivity (1:maxln,1:numnda) |
| 23 |
C MAXLN INT The maximum number of elements connected to any node |
| 24 |
C INVLEN INT The number of elements connected to this node |
| 25 |
C SOLEA REAL Element variables (1:numeba,1:nvarel) |
| 26 |
C SOLENA REAL Element variables at nodes" (1:nodesa,1:nvarel) |
| 27 |
C NDLSTA INT The array that identifies the local element block node |
| 28 |
C number with the global mesh node number (1:numnda) |
| 29 |
C ITT INT Truth table |
| 30 |
C iblk INT Block number being processed (not block ID) |
| 31 |
|
| 32 |
C************************************************************************ |
| 33 |
|
| 34 |
include 'aexds1.blk' |
| 35 |
include 'amesh.blk' |
| 36 |
include 'ebbyeb.blk' |
| 37 |
|
| 38 |
DIMENSION INVCN(MAXLN,*),SOLEA(NUMEBA,*), |
| 39 |
& SOLENA(NODESA,NVAREL), ITT(NVAREL,*) |
| 40 |
|
| 41 |
C************************************************************************ |
| 42 |
|
| 43 |
DO 10 IVAR = 1, NVAREL |
| 44 |
IF (ITT(IVAR,iblk) .EQ. 0)GO TO 10 |
| 45 |
SUM = 0. |
| 46 |
DO 20 J = 1, INVLEN |
| 47 |
SUM = SUM + SOLEA(INVCN(J,IGLND),IVAR) |
| 48 |
20 CONTINUE |
| 49 |
SOLENA(IGLND,IVAR) = SUM / INVLEN |
| 50 |
10 CONTINUE |
| 51 |
RETURN |
| 52 |
END |