1 subroutine AsIMFG (y, ac, x, xmudmi, shp, 2 & shgl, ien, mater, 3 & res, rmes, BDiag, qres, rerr) 4c 5c---------------------------------------------------------------------- 6c 7c This routine computes and assembles the data corresponding to the 8c interior elements. 9c 10c Zdenek Johan, Winter 1991. (Fortran 90) 11c---------------------------------------------------------------------- 12c 13 use rlssave ! Use the resolved Leonard stresses at the nodes. 14 15 include "common.h" 16c 17 dimension y(nshg,ndofl), ac(nshg,ndofl), 18 & x(numnp,nsd), 19 & shp(nshl,MAXQPT), 20 & shgl(nsd,nshl,MAXQPT), 21 & ien(npro,nshl), 22 & mater(npro), res(nshg,nflow), 23 & rmes(nshg,nflow), BDiag(nshg,nflow,nflow), 24 & qres(nshg,idflx) 25 26c 27 dimension ycl(npro,nshl,ndofl), acl(npro,nshl,ndofl), 28 & xl(npro,nenl,nsd), 29 & rl(npro,nshl,nflow), rml(npro,nshl,nflow), 30 & BDiagl(npro,nshl,nflow,nflow), 31 & ql(npro,nshl,idflx) 32c 33 dimension rlsl(npro,nshl,6) 34 dimension xmudmi(npro,ngauss) 35 dimension sgn(npro,nshl) 36c 37 real*8 rerrl(npro,nshl,6), rerr(nshg,10) 38c 39c 40c.... create the matrix of mode signs for the hierarchic basis 41c functions. 42c 43 if (ipord .gt. 1) then 44 call getsgn(ien,sgn) 45 endif 46c 47c.... gather the variables 48c 49 call localy(y, ycl, ien, ndofl, 'gather ') 50 call localy(ac, acl, ien, ndofl, 'gather ') 51 call localx(x, xl, ien, nsd, 'gather ') 52 53 if (idiff >= 1 .or. isurf .eq. 1) 54 & call local (qres, ql, ien, idflx, 'gather ') 55 56 if( (iLES.gt.10).and.(iLES.lt.20)) then ! bardina 57 call local (rls, rlsl, ien, 6, 'gather ') 58 else 59 rlsl = zero 60 endif 61c 62c.... get the element residuals and preconditioner 63c 64 rl = zero 65 rml = zero 66 BDiagl = zero 67 EGmassd= one ! just a dummy real since we don't have a LHS with MFI 68 if(ierrcalc.eq.1) rerrl = zero 69 70 ttim(31) = ttim(31) - secs(0.0) 71! pass the memory location of ycl to both yl and ycl in e3b. This may 72! seem dangerous since yl in e3b is :,nflow and ycl is :,ndof but they 73! do not write to yl (at least not out of bounds), only use the data 74! there so both will access data 75! properly from this location. 76 77 call e3 (ycl, ycl, acl, shp, 78 & shgl, xl, rl, rml, xmudmi, 79 & BDiagl, ql, sgn, rlsl, EGmassd, 80 & rerrl) 81 82 ttim(31) = ttim(31) + secs(0.0) 83c 84c.... assemble the residual and the modified residual 85c 86 87 call local (res, rl, ien, nflow, 'scatter ') 88 call local (rmes, rml, ien, nflow, 'scatter ') 89c 90c res is G_A obtained using local A_{e=1}^n_e G^e_a 91c 92 if ( ierrcalc .eq. 1 ) then 93 call local (rerr, rerrl, ien, 6, 'scatter ') 94 endif 95c 96c.... assemble the Block-Diagonal 97c 98 if (iprec .ne. 0) 99 & call local (BDiag, BDiagl, ien, nflow*nflow, 'scatter ') 100 101c 102c.... end 103c 104 return 105 end 106 107 108 109 110 111