Debian Codegraph @

packages/seacas/applications/grepos/gp_smogs2.f

raw
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 SMOGS2 (xscr, yscr, isbnd, x, y, numel,
9 $ link, nlink, numnp, nscr)
10 C=======================================================================
11
12 C***********************************************************************
13
14 C SUBROUTINE SMOGS = MESH SMOOTHING BY LAPLACE-S USING GAUSS-SEIDEL
15
16 C***********************************************************************
17
18 real x(*), y(*), xscr(*), yscr(*)
19 integer numel, nlink, link(nlink, *)
20 logical isbnd(*)
21 integer nscr(*)
22
23 if (nlink .ne. 4) return
24 do 20 iel = 1, numel
25 n1 = link(1, iel)
26 n2 = link(2, iel)
27 n3 = link(3, iel)
28 n4 = link(4, iel)
29
30 if (.not. isbnd(n1)) then
31 xscr(n1) = xscr(n1) + x(n2) + x(n4)
32 yscr(n1) = yscr(n1) + y(n2) + y(n4)
33 nscr(n1) = nscr(n1) + 2
34 end if
35
36 if (.not. isbnd(n2)) then
37 xscr(n2) = xscr(n2) + x(n1) + x(n3)
38 yscr(n2) = yscr(n2) + y(n1) + y(n3)
39 nscr(n2) = nscr(n2) + 2
40 end if
41
42 if (.not. isbnd(n3)) then
43 xscr(n3) = xscr(n3) + x(n2) + x(n4)
44 yscr(n3) = yscr(n3) + y(n2) + y(n4)
45 nscr(n3) = nscr(n3) + 2
46 end if
47
48 if (.not. isbnd(n4)) then
49 xscr(n4) = xscr(n4) + x(n1) + x(n3)
50 yscr(n4) = yscr(n4) + y(n1) + y(n3)
51 nscr(n4) = nscr(n4) + 2
52 end if
53
54 20 continue
55 return
56 end