63 TYPE(t_region
) :: region
68 INTEGER :: ipatch, ipcls
71 CHARACTER(CHRLEN) :: rcsidentstring
73 INTEGER :: bctype, ilev, npatches, npcls
74 INTEGER :: ipclsregionin, ipclsregionbuf, npclsprev
78 INTEGER :: npclsbeg, npclsend
80 INTEGER :: ipatchcountersum
82 INTEGER,
POINTER,
DIMENSION(:,:) :: paiv, paivold
83 INTEGER,
ALLOCATABLE,
DIMENSION(:) ::patchcounter
85 LOGICAL :: lboundskip(6)
87 REAL(RFREAL),
POINTER,
DIMENSION(:,:) :: parv, parvold, pcv, pcvold, &
88 pdv, ptv, prhs, prhssum
90 TYPE(t_patch),
POINTER :: ppatch
91 TYPE(t_plag),
POINTER :: pplag
98 '$RCSfile: PLAG_PatchLoadDataBuffers.F90,v $ $Revision: 1.3 $'
100 global => region%global
103 'PLAG_PatchLoadDataBuffers.F90' )
107 ilev = region%currLevel
108 npcls = region%levels(ilev)%plag%nPcls
110 IF (npcls == 0) goto 999
112 npatches = region%nPatches
116 pplag => region%levels(ilev)%plag
123 prhssum => pplag%rhsSum
125 paivold => pplag%aivOld
126 parvold => pplag%arvOld
127 pcvold => pplag%cvOld
136 ALLOCATE( patchcounter(npatches), stat=errorflag )
137 global%error = errorflag
138 IF ( global%error /= err_none ) &
139 CALL
errorstop( global,err_allocate,__line__ )
145 patchcounter(1:npatches) = 0
151 icplag = paiv(aiv_plag_indexi,ipcls)
152 jcplag = paiv(aiv_plag_indexj,ipcls)
153 kcplag = paiv(aiv_plag_indexk,ipcls)
159 kpcbeg <= kcplag .AND. kcplag <= kpcend )
THEN
163 ipclsregionin = ipclsregionin + 1
165 IF ( ipclsregionin /= ipcls )
THEN
166 paiv( :,ipclsregionin) = paiv( :,ipcls)
167 parv( :,ipclsregionin) = parv( :,ipcls)
168 pcv( :,ipclsregionin) = pcv( :,ipcls)
169 pdv( :,ipclsregionin) = pdv( :,ipcls)
170 ptv( :,ipclsregionin) = ptv( :,ipcls)
171 prhs( :,ipclsregionin) = prhs( :,ipcls)
172 prhssum(:,ipclsregionin) = prhssum(:,ipcls)
174 paivold(:,ipclsregionin) = paivold(:,ipcls)
175 parvold(:,ipclsregionin) = parvold(:,ipcls)
176 pcvold( :,ipclsregionin) = pcvold( :,ipcls)
183 lboundskip(1:6) = .true.
185 IF ( icplag <
ipcbeg)
THEN
186 lboundskip(1) = .false.
187 ELSE IF (icplag >
ipcend)
THEN
188 lboundskip(2) = .false.
191 IF ( jcplag <
jpcbeg)
THEN
192 lboundskip(3) = .false.
193 ELSE IF (jcplag >
jpcend)
THEN
194 lboundskip(4) = .false.
197 IF ( kcplag <
kpcbeg)
THEN
198 lboundskip(5) = .false.
199 ELSE IF (kcplag > kpcend)
THEN
200 lboundskip(6) = .false.
209 ppatch => region%levels(ilev)%patches(ipatch)
210 IF (lboundskip(ppatch%lbound)) cycle
212 bctype = ppatch%bcType
216 IF ((bctype>=bc_regionconf .AND. bctype<=bc_regionconf+bc_range) .OR. &
217 (bctype>=bc_tra_peri .AND. bctype<=bc_tra_peri +bc_range) .OR. &
218 (bctype>=bc_rot_peri .AND. bctype<=bc_rot_peri +bc_range))
THEN
228 kbeg -
kdir <= kcplag .AND. kcplag <= kend -
kdir )
THEN
234 patchcounter(ipatch) = patchcounter(ipatch)+1
235 ipclsregionbuf = patchcounter(ipatch)
237 pbuffplag => ppatch%bufferPlag
239 pbuffplag%aiv( :,ipclsregionbuf) = paiv( :,ipcls)
240 pbuffplag%arv( :,ipclsregionbuf) = parv( :,ipcls)
241 pbuffplag%cv( :,ipclsregionbuf) = pcv( :,ipcls)
242 pbuffplag%dv( :,ipclsregionbuf) = pdv( :,ipcls)
243 pbuffplag%tv( :,ipclsregionbuf) = ptv( :,ipcls)
244 pbuffplag%rhs( :,ipclsregionbuf) = prhs( :,ipcls)
245 pbuffplag%rhsSum(:,ipclsregionbuf) = prhssum(:,ipcls)
247 pbuffplag%aivOld(:,ipclsregionbuf) = paivold(:,ipcls)
248 pbuffplag%arvOld(:,ipclsregionbuf) = parvold(:,ipcls)
249 pbuffplag%cvOld( :,ipclsregionbuf) = pcvold( :,ipcls)
252 IF( pbuffplag%nBuffSize /= 0 )&
253 WRITE(stdout,
'(A,4I4)') &
254 ' PLAG_PatchLoadDataBuffers-iReg: nBuffSize,iPatch,patchCounter', &
255 ireg,pbuffplag%nBuffSize,ipatch,patchcounter(ipatch)
266 npclsprev = pplag%nPcls
267 pplag%nPcls = ipclsregionin
268 ipatchcountersum =
sum(patchcounter)
271 IF(npclsprev /= pplag%nPcls) &
272 WRITE(stdout,
'(A,I4,2I8,I4)') &
273 ' PLAG_PatchLoadDataBuffers: iReg,nPclsPrev,nPclsCurr,iPatchCounterSum ',&
274 ireg,npclsprev,pplag%nPcls,ipatchcountersum
281 IF ( ipatchcountersum /=0 .AND. pplag%nPcls == 0)
THEN
282 npclsbeg =
max(1,pplag%nPcls+1)
285 pplag%aiv(: ,npclsbeg:npclsend) = 0
286 pplag%aivOld(:,npclsbeg:npclsend) = 0
287 pplag%arv(: ,npclsbeg:npclsend) = 0.0_rfreal
288 pplag%arvOld(:,npclsbeg:npclsend) = 0.0_rfreal
289 pplag%cv(: ,npclsbeg:npclsend) = 0.0_rfreal
290 pplag%cvOld(: ,npclsbeg:npclsend) = 0.0_rfreal
291 pplag%rhs(: ,npclsbeg:npclsend) = 0.0_rfreal
292 pplag%rhsSum(:,npclsbeg:npclsend) = 0.0_rfreal
295 WRITE(stdout,
'(A,I4,2I6)') &
296 ' PLAG_PatchLoadDataBuffers: iReg,nPclsBeg,nPclsEnd = ',&
297 ireg,npclsbeg,npclsend
303 DEALLOCATE( patchcounter, stat=errorflag )
304 global%error = errorflag
305 IF ( global%error /= err_none ) &
306 CALL
errorstop( global,err_deallocate,__line__ )
**********************************************************************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 ibeg
Tfloat sum() const
Return the sum of all the pixel values in an image.
subroutine rflo_getpatchdirection(patch, idir, jdir, kdir)
**********************************************************************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 kpcbeg
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
subroutine plag_patchloaddatabuffers(region, iReg)
subroutine registerfunction(global, funName, fileName)
subroutine rflo_getpatchindices(region, patch, iLev, ibeg, iend, jbeg, jend, kbeg, kend)
**********************************************************************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 jpcbeg
**********************************************************************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 ipcend
**********************************************************************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 jdir
**********************************************************************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 knode iend
**********************************************************************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 ipcbeg
**********************************************************************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 idir
**********************************************************************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 jpcend
**********************************************************************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 knode jend
**********************************************************************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 kdir
subroutine errorstop(global, errorCode, errorLine, addMessage)
**********************************************************************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 knode jbeg
**********************************************************************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 knode kbeg
subroutine deregisterfunction(global)
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)