| 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 DONRM2 (NODES, ISBND, COSIN, NUMEL, LINK, X, Y, |
| 9 |
$ NLINK, NUMNP) |
| 10 |
C======================================================================= |
| 11 |
integer NODES(*) |
| 12 |
logical isbnd(*) |
| 13 |
REAL X(*), Y(*), COSIN(2,*) |
| 14 |
INTEGER LINK(NLINK, *) |
| 15 |
parameter (tol = 1.0e-6) |
| 16 |
|
| 17 |
do 10 inod = 1, numnp |
| 18 |
nodes(inod) = 0 |
| 19 |
10 continue |
| 20 |
|
| 21 |
do 30 ilnk = 1, nlink |
| 22 |
do 20 iel = 1, numel |
| 23 |
nodes(link(ilnk, iel)) = 1 |
| 24 |
20 continue |
| 25 |
30 continue |
| 26 |
|
| 27 |
do 60 iel = 1, numel |
| 28 |
do 50 iseg=1,nlink |
| 29 |
if (iseg .eq. nlink) then |
| 30 |
isegp1 = 1 |
| 31 |
else |
| 32 |
isegp1 = iseg + 1 |
| 33 |
end if |
| 34 |
|
| 35 |
XI = x( link(ISEG,iel) ) |
| 36 |
YI = y( link(ISEG,iel) ) |
| 37 |
|
| 38 |
XJ = x( link(ISEGp1,iel) ) |
| 39 |
YJ = y( link(isegp1,iel) ) |
| 40 |
|
| 41 |
DX = XI - XJ |
| 42 |
DY = YI - YJ |
| 43 |
RMAG = SQRT ( DX**2 + DY**2) |
| 44 |
|
| 45 |
cosin(1, link(iseg, iel)) = cosin(1, link(iseg, iel)) - |
| 46 |
$ dy / rmag |
| 47 |
cosin(2, link(iseg, iel)) = cosin(2, link(iseg, iel)) + |
| 48 |
$ dx / rmag |
| 49 |
|
| 50 |
cosin(1, link(isegp1, iel)) = cosin(1, link(isegp1, iel)) - |
| 51 |
$ dy / rmag |
| 52 |
cosin(2, link(isegp1, iel)) = cosin(2, link(isegp1, iel)) + |
| 53 |
$ dx / rmag |
| 54 |
50 continue |
| 55 |
60 continue |
| 56 |
|
| 57 |
do 70 inod = 1, numnp |
| 58 |
if (nodes(inod) .ne. 0) then |
| 59 |
if (abs(cosin(1, inod)) .gt. tol .or. |
| 60 |
$ abs(cosin(2, inod)) .gt. tol) then |
| 61 |
nodes(inod) = -1 |
| 62 |
isbnd(inod) = .TRUE. |
| 63 |
end if |
| 64 |
end if |
| 65 |
70 continue |
| 66 |
|
| 67 |
RETURN |
| 68 |
END |