xref: /phasta/phSolver/incompressible/asbmfg.f (revision 595995161822a203c8467e0e4a253d7bd7d6df32)
1      subroutine AsBMFG (u,       y,       ac,      x,
2     &                   shpb,    shglb,
3     &                   ienb,    materb,  iBCB,    BCB,
4     &                   res,     xKebe)
5c
6c----------------------------------------------------------------------
7c
8c This routine computes and assembles the data corresponding to the
9c  boundary elements.
10c
11c Zdenek Johan, Winter 1991.  (Fortran 90)
12c Alberto Figueroa, Winter 2004.  CMM-FSI
13c Irene Vignon, Spring 2004.
14c----------------------------------------------------------------------
15c
16      use turbSA                ! access to d2wall
17      include "common.h"
18c
19        dimension y(nshg,ndofl),           x(numnp,nsd),
20     &            ac(nshg,ndofl),          u(nshg,nsd),
21     &            shpb(nshl,ngaussb),
22     &            shglb(nsd,nshl,ngaussb),
23     &            ienb(npro,nshl),         materb(npro),
24     &            iBCB(npro,ndiBCB),       BCB(npro,nshlb,ndBCB),
25     &            res(nshg,nflow),        dwl(npro,nenl)
26c
27        dimension yl(npro,nshl,ndofl),     xlb(npro,nenl,nsd),
28     &            rl(npro,nshl,nflow),     sgn(npro,nshl),
29     &            ul(npro,nshl,nsd),       acl(npro,nshl,ndofl)
30c
31        dimension xKebe(npro,9,nshl,nshl)
32
33c
34c.... get the matrix of mode signs for the hierarchic basis functions
35c
36        if (ipord .gt. 1) then
37           call getsgn(ienb,sgn)
38        endif
39c
40c.... gather the variables
41c
42        call localy(y,      yl,     ienb,   ndofl,  'gather  ')
43        call localy(ac,     acl,    ienb,   ndofl,  'gather  ')
44        call localx(x,      xlb,    ienb,   nsd,    'gather  ')
45        call localx(u,      ul,     ienb,   nsd,    'gather  ')
46        if(iRANS.eq.-2) then
47           call local(d2wall, dwl, ienb, 1, 'gather  ')
48        endif
49
50c
51c.... zero the matrices if they are being recalculated
52c
53       if (lhs. eq. 1)  then
54           xKebe = zero
55        endif
56
57c
58c.... get the boundary element residuals
59c
60        rl  = zero
61c
62c.... 3D
63c
64        call e3b  (ul,      yl,      acl,     iBCB,    BCB,
65     &             shpb,    shglb,
66     &             xlb,     rl,      sgn,     dwl,     xKebe)
67c
68c.... assemble the residual and the modified residual
69c
70        call local (res,    rl,     ienb,   nflow,  'scatter ')
71
72c
73c.... end
74c
75        return
76        end
77
78
79c
80c----------------------------------------------------------------------
81c
82c     This routine computes and assembles the data corresponding to the
83c     boundary elements for the temperature equation
84c
85c----------------------------------------------------------------------
86c
87      subroutine AsBSclr (y,       x,       shpb,    shglb,
88     &                   ienb,    materb,  iBCB,    BCB,
89     &                   res)
90      use turbSA ! access to d2wall
91        include "common.h"
92c
93        dimension y(nshg,ndofl),           x(numnp,nsd),
94     &            shpb(nshl,*),
95     &            shglb(nsd,nshl,*),
96     &            ienb(npro,nshl),         materb(npro),
97     &            iBCB(npro,ndiBCB),       BCB(npro,nshlb,ndBCB),
98     &            res(nshg)
99c
100        dimension yl(npro,nshl,ndofl),     xlb(npro,nenl,nsd),
101     &            rl(npro,nshl),     sgn(npro,nshl)
102        real*8 dwl(npro,nshl)
103c
104c.... get the matrix of mode signs for the hierarchic basis functions
105c
106        if (ipord .gt. 1) then
107           call getsgn(ienb,sgn)
108        endif
109c
110c.... gather the variables
111c
112        call localy(y,      yl,     ienb,   ndofl,  'gather  ')
113        call localx(x,      xlb,    ienb,   nsd,    'gather  ')
114        if(iRANS.eq.-2) then
115           call local(d2wall, dwl, ienb, 1, 'gather  ')
116        endif
117c
118c.... get the boundary element residuals
119c
120        rl  = zero
121
122        call e3bSclr  (yl,      iBCB,    BCB,     shpb,    shglb,
123     &                 xlb,     rl,      sgn,     dwl)
124c
125c.... assemble the residual and the modified residual
126c
127        call local (res,    rl,     ienb,   1,  'scatter ')
128c
129c.... end
130c
131        return
132        end
133
134
135