65 TYPE(t_region
),
POINTER :: regions(:)
67 INTEGER,
INTENT(IN) :: ireg
70 INTEGER ::
i,
j,
k,
icorner, iedge, iface, ijk, ir, ldir
73 INTEGER :: ilev, iregsrc,
icell, ibuff, ndim, dest,
tag
74 INTEGER :: nbuffsize, ncorners,
nedges, ndir
75 INTEGER ::
nfaces, nfacecentroidsize, nfacenormalsize
76 INTEGER :: icoffsrc, ijcoffsrc
77 INTEGER :: ijkccsrc, ijkecsrc
78 INTEGER :: iccsrc, jccsrc, kccsrc
79 INTEGER :: iecsrc, jecsrc, kecsrc
80 INTEGER :: ndumcellssrc
81 INTEGER :: inoff, ijnoff
82 INTEGER :: inoffsrc, ijnoffsrc, ijkn, ijkcnsrc, ijkensrc
83 INTEGER :: icnsrc, jcnsrc, kcnsrc
84 INTEGER :: iensrc, jensrc, kensrc
85 INTEGER :: nodecornsrc, nodeedgesrc
86 INTEGER :: idirsrc, jdirsrc, kdirsrc, ldirsrc, ifacesrc
87 INTEGER :: srcdir(3),srcface(6)
88 INTEGER :: srcindexmapmat(3,4)
90 REAL(RFREAL),
DIMENSION(3,3) :: sfacecorn, sfaceedge
91 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: psi, psj, psk
92 REAL(RFREAL),
POINTER,
DIMENSION(:,:,:) :: pfc
94 TYPE(t_region
),
POINTER :: pregion
95 TYPE(t_level
),
POINTER :: plevel
96 TYPE(t_dcelltransf
),
POINTER :: psendeccell
97 TYPE(t_plag),
POINTER :: pplag
102 global => regions(ireg)%global
105 'PLAG_RFLO_SendMetrics.F90' )
109 ilev = regions(ireg)%currLevel
118 nfacecentroidsize = zcoord*kcoord
119 nfacenormalsize = 3*kcoord
120 nbuffsize = (nfacecentroidsize + nfacenormalsize)
124 pregion => regions(ireg)
125 pplag => regions(ireg)%levels(ilev)%plag
126 pfc => regions(ireg)%levels(ilev)%plag%fc
127 psi => regions(ireg)%levels(ilev)%plag%si
128 psj => regions(ireg)%levels(ilev)%plag%sj
129 psk => regions(ireg)%levels(ilev)%plag%sk
137 DO ir=1,global%nRegions
138 IF (regions(ir)%procid /= global%myProcid)
THEN
139 IF (regions(ireg)%levels(ilev)%sendEcCells(ir)%nCells > 0)
THEN
141 psendeccell => regions(ireg)%levels(ilev)%sendEcCells(ir)
142 plevel => regions(ir)%levels(ilev)
143 ndim = psendeccell%nCells*
nfaces
152 IF( .NOT. plevel%edgeCells(iedge)%interact ) goto 1999
156 IF( plevel%edgeCells(iedge)%degenrt /= degenerat_none ) goto 1999
160 DO ijk=1,ubound(plevel%edgeCells(iedge)%cells,1)
161 iregsrc = plevel%edgeCells(iedge)%cells(ijk)%srcRegion
163 IF ( iregsrc == ireg )
THEN
164 ijkecsrc = plevel%edgeCells(iedge)%cells(ijk)%srcCell
165 ndumcellssrc = regions(iregsrc)%nDumCells
168 CALL
getijk( ijkecsrc,icoffsrc,ijcoffsrc,ndumcellssrc, &
169 iecsrc,jecsrc,kecsrc )
172 ijkensrc = indijk(iecsrc,jecsrc,kecsrc,inoffsrc,ijnoffsrc)
176 srcindexmapmat= plevel%edgeCells(iedge)%cells(ijk)%srcIndexMapMat
180 idirsrc = srcdir(1); jdirsrc = srcdir(2); kdirsrc = srcdir(3);
188 ifacesrc = srcface(iface)
189 SELECT CASE (ifacesrc)
191 nodeedgesrc = indijk(iecsrc,jecsrc,kecsrc,inoffsrc,ijnoffsrc)
194 nodeedgesrc = indijk(iecsrc+1,jecsrc,kecsrc,inoffsrc,ijnoffsrc)
197 nodeedgesrc = indijk(iecsrc,jecsrc+1,kecsrc,inoffsrc,ijnoffsrc)
200 nodeedgesrc = indijk(iecsrc,jecsrc,kecsrc+1,inoffsrc,ijnoffsrc)
207 SELECT CASE (ldirsrc)
209 sfaceedge(xcoord:zcoord,ldirsrc) = psi(xcoord:zcoord,nodeedgesrc)
212 sfaceedge(xcoord:zcoord,ldirsrc) = psj(xcoord:zcoord,nodeedgesrc)
215 sfaceedge(xcoord:zcoord,ldirsrc) = psk(xcoord:zcoord,nodeedgesrc)
221 psendeccell%buffMetrics(ibuff ) = pfc(xcoord,idirsrc,nodeedgesrc)
222 psendeccell%buffMetrics(ibuff+ ndim) = pfc(xcoord,jdirsrc,nodeedgesrc)
223 psendeccell%buffMetrics(ibuff+ 2*ndim) = pfc(xcoord,kdirsrc,nodeedgesrc)
225 psendeccell%buffMetrics(ibuff+ 3*ndim) = pfc(ycoord,idirsrc,nodeedgesrc)
226 psendeccell%buffMetrics(ibuff+ 4*ndim) = pfc(ycoord,jdirsrc,nodeedgesrc)
227 psendeccell%buffMetrics(ibuff+ 5*ndim) = pfc(ycoord,kdirsrc,nodeedgesrc)
229 psendeccell%buffMetrics(ibuff+ 6*ndim) = pfc(zcoord,idirsrc,nodeedgesrc)
230 psendeccell%buffMetrics(ibuff+ 7*ndim) = pfc(zcoord,jdirsrc,nodeedgesrc)
231 psendeccell%buffMetrics(ibuff+ 8*ndim) = pfc(zcoord,kdirsrc,nodeedgesrc)
235 psendeccell%buffMetrics(ibuff+ 9*ndim) = sfaceedge(xcoord,icoord)
236 psendeccell%buffMetrics(ibuff+10*ndim) = sfaceedge(ycoord,icoord)
237 psendeccell%buffMetrics(ibuff+11*ndim) = sfaceedge(zcoord,icoord)
239 psendeccell%buffMetrics(ibuff+12*ndim) = sfaceedge(xcoord,jcoord)
240 psendeccell%buffMetrics(ibuff+13*ndim) = sfaceedge(ycoord,jcoord)
241 psendeccell%buffMetrics(ibuff+14*ndim) = sfaceedge(zcoord,jcoord)
243 psendeccell%buffMetrics(ibuff+15*ndim) = sfaceedge(xcoord,kcoord)
244 psendeccell%buffMetrics(ibuff+16*ndim) = sfaceedge(ycoord,kcoord)
245 psendeccell%buffMetrics(ibuff+17*ndim) = sfaceedge(zcoord,kcoord)
258 IF (.NOT. plevel%cornerCells(
icorner)%interact) goto 2999
262 IF( plevel%cornerCells(
icorner)%degenrt /= degenerat_none ) goto 2999
266 DO ijk=1,ubound(plevel%cornerCells(
icorner)%cells,1)
267 iregsrc = plevel%cornerCells(
icorner)%cells(ijk)%srcRegion
268 IF ( iregsrc == ireg )
THEN
269 ijkccsrc = plevel%cornerCells(
icorner)%cells(ijk)%srcCell
270 ndumcellssrc = regions(iregsrc)%nDumCells
273 CALL
getijk( ijkccsrc,icoffsrc,ijcoffsrc,ndumcellssrc, &
274 iccsrc,jccsrc,kccsrc )
277 ijkcnsrc = indijk(iccsrc,jccsrc,kccsrc,inoffsrc,ijnoffsrc)
281 srcindexmapmat= plevel%cornerCells(
icorner)%cells(ijk)%srcIndexMapMat
285 idirsrc = srcdir(1); jdirsrc = srcdir(2); kdirsrc = srcdir(3);
293 ifacesrc = srcface(iface)
294 SELECT CASE (ifacesrc)
296 nodecornsrc = indijk(iccsrc,jccsrc,kccsrc,inoffsrc,ijnoffsrc)
299 nodecornsrc = indijk(iccsrc+1,jccsrc,kccsrc,inoffsrc,ijnoffsrc)
302 nodecornsrc = indijk(iccsrc,jccsrc+1,kccsrc,inoffsrc,ijnoffsrc)
305 nodecornsrc = indijk(iccsrc,jccsrc,kccsrc+1,inoffsrc,ijnoffsrc)
312 SELECT CASE (ldirsrc)
314 sfacecorn(xcoord:zcoord,ldirsrc) = psi(xcoord:zcoord,nodecornsrc)
317 sfacecorn(xcoord:zcoord,ldirsrc) = psj(xcoord:zcoord,nodecornsrc)
320 sfacecorn(xcoord:zcoord,ldirsrc) = psk(xcoord:zcoord,nodecornsrc)
326 psendeccell%buffMetrics(ibuff ) = pfc(xcoord,idirsrc,nodecornsrc)
327 psendeccell%buffMetrics(ibuff+ ndim) = pfc(xcoord,jdirsrc,nodecornsrc)
328 psendeccell%buffMetrics(ibuff+ 2*ndim) = pfc(xcoord,kdirsrc,nodecornsrc)
330 psendeccell%buffMetrics(ibuff+ 3*ndim) = pfc(ycoord,idirsrc,nodecornsrc)
331 psendeccell%buffMetrics(ibuff+ 4*ndim) = pfc(ycoord,jdirsrc,nodecornsrc)
332 psendeccell%buffMetrics(ibuff+ 5*ndim) = pfc(ycoord,kdirsrc,nodecornsrc)
334 psendeccell%buffMetrics(ibuff+ 6*ndim) = pfc(zcoord,idirsrc,nodecornsrc)
335 psendeccell%buffMetrics(ibuff+ 7*ndim) = pfc(zcoord,jdirsrc,nodecornsrc)
336 psendeccell%buffMetrics(ibuff+ 8*ndim) = pfc(zcoord,kdirsrc,nodecornsrc)
340 psendeccell%buffMetrics(ibuff+ 9*ndim) = sfacecorn(xcoord,icoord)
341 psendeccell%buffMetrics(ibuff+10*ndim) = sfacecorn(ycoord,icoord)
342 psendeccell%buffMetrics(ibuff+11*ndim) = sfacecorn(zcoord,icoord)
344 psendeccell%buffMetrics(ibuff+12*ndim) = sfacecorn(xcoord,jcoord)
345 psendeccell%buffMetrics(ibuff+13*ndim) = sfacecorn(ycoord,jcoord)
346 psendeccell%buffMetrics(ibuff+14*ndim) = sfacecorn(zcoord,jcoord)
348 psendeccell%buffMetrics(ibuff+15*ndim) = sfacecorn(xcoord,kcoord)
349 psendeccell%buffMetrics(ibuff+16*ndim) = sfacecorn(ycoord,kcoord)
350 psendeccell%buffMetrics(ibuff+17*ndim) = sfacecorn(zcoord,kcoord)
363 dest = regions(ir)%procid
364 tag = regions(ir)%localNumber+ plag_tag_shift +mpi_patchoff +10
365 IF(
tag .gt. global%mpiTagMax)
tag = mod(
tag,global%mpiTagMax)
366 CALL mpi_isend( psendeccell%buffMetrics,nbuffsize*ndim,mpi_rfreal, &
367 dest,
tag,global%mpiComm, &
368 pplag%requestsMetrics(psendeccell%iRequestMetrics),&
370 IF ( global%mpierr /= err_none ) &
371 CALL
errorstop( global,err_mpi_trouble,__line__ )
subroutine plag_rflo_getfacemapping(mapMat, srcDir, srcFace)
subroutine rflo_getedgecellsindices(region, iLev, iedge, iebeg, ieend, jebeg, jeend, kebeg, keend)
subroutine registerfunction(global, funName, fileName)
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
subroutine rflo_getcelloffset(region, iLev, iCellOffset, ijCellOffset)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE icorner
subroutine rflo_getcornercellsindices(region, iLev, icorner, icbeg, icend, jcbeg, jcend, kcbeg, kcend)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE icell
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)
subroutine getijk(ijk, iOffset, ijOffset, nDumCells, i, j, k)
subroutine plag_rflo_sendmetrics(regions, iReg)