68 TYPE(t_region
) :: region
69 INTEGER :: ibegv, iendv, ibegg, iendg
70 REAL(RFREAL),
POINTER :: var(:,:),
gradi(:,:),
gradj(:,:), gradk(:,:)
73 INTEGER ::
i,
j,
k, ipatch
82 'RFLO_CalcGradVector.F90' )
86 ilev = region%currLevel
103 DO ipatch=1,region%nPatches
105 iconbc,ibegv,iendv,ibegg,iendg,var, &
108 ibegv,iendv,ibegg,iendg,var,
gradi,
gradj,gradk )
113 DO ipatch=1,region%nPatches
142 INTEGER :: nvar, ngrd, istop
146 nvar = iendv - ibegv+1
147 ngrd = iendg - ibegg+1
150 IF ((nvar<1) .OR. (ngrd<1) .OR. (mod(ngrd,nvar)/=0)) istop = 1
152 CALL
errorstop( region%global,err_grad_index,__line__, &
153 'Gradient indices are not consistent' )
169 #include "Indexing.h"
172 INTEGER :: ijkc,ijkn,icoff,inoff,ijcoff,ijnoff
173 INTEGER :: ip1jkn,ijp1kn,ijkp1n,ip1jp1kn,ip1jkp1n,ijp1kp1n,ip1jp1kp1n
174 INTEGER ::
m,l, mindx(9),iermax(9,3),jermax(9,3),kermax(9,3)
175 REAL(RFREAL) :: xc, yc, zc
176 REAL(RFREAL) :: diff(9,3), errmax(9,3), rval(9)
183 mindx(1)=1 ;rval(1)=0._rfreal
184 mindx(2)=2 ;rval(2)=0._rfreal
185 mindx(3)=3 ;rval(3)=0._rfreal
186 mindx(4)=5 ;rval(4)=0._rfreal
187 mindx(5)=6 ;rval(5)=0._rfreal
188 mindx(6)=7 ;rval(6)=0._rfreal
189 mindx(7)=9 ;rval(7)=0._rfreal
190 mindx(8)=10 ;rval(8)=0._rfreal
191 mindx(9)=11 ;rval(9)=0._rfreal
193 errmax(
m,1)=0.0_rfreal
194 errmax(
m,2)=0.0_rfreal
195 errmax(
m,3)=0.0_rfreal
198 ijkn = indijk(
i ,
j ,
k ,inoff,ijnoff)
199 ip1jkn = indijk(
i+1,
j ,
k ,inoff,ijnoff)
200 ijp1kn = indijk(
i ,
j+1,
k ,inoff,ijnoff)
201 ijkp1n = indijk(
i ,
j ,
k+1,inoff,ijnoff)
202 ip1jp1kn = indijk(
i+1,
j+1,
k ,inoff,ijnoff)
203 ip1jkp1n = indijk(
i+1,
j ,
k+1,inoff,ijnoff)
204 ijp1kp1n = indijk(
i ,
j+1,
k+1,inoff,ijnoff)
205 ip1jp1kp1n= indijk(
i+1,
j+1,
k+1,inoff,ijnoff)
206 ijkc = indijk(
i ,
j ,
k ,icoff,ijcoff)
207 xc=(region%levels(ilev)%grid%xyz(xcoord,ijkn)+ &
208 region%levels(ilev)%grid%xyz(xcoord,ip1jkn)+ &
209 region%levels(ilev)%grid%xyz(xcoord,ijp1kn)+ &
210 region%levels(ilev)%grid%xyz(xcoord,ijkp1n)+ &
211 region%levels(ilev)%grid%xyz(xcoord,ip1jp1kn)+ &
212 region%levels(ilev)%grid%xyz(xcoord,ijp1kp1n)+ &
213 region%levels(ilev)%grid%xyz(xcoord,ip1jkp1n)+ &
214 region%levels(ilev)%grid%xyz(xcoord,ip1jp1kp1n))/8._rfreal
215 yc=(region%levels(ilev)%grid%xyz(ycoord,ijkn)+ &
216 region%levels(ilev)%grid%xyz(ycoord,ip1jkn)+ &
217 region%levels(ilev)%grid%xyz(ycoord,ijp1kn)+ &
218 region%levels(ilev)%grid%xyz(ycoord,ijkp1n)+ &
219 region%levels(ilev)%grid%xyz(ycoord,ip1jp1kn)+ &
220 region%levels(ilev)%grid%xyz(ycoord,ijp1kp1n)+ &
221 region%levels(ilev)%grid%xyz(ycoord,ip1jkp1n)+ &
222 region%levels(ilev)%grid%xyz(ycoord,ip1jp1kp1n))/8._rfreal
223 zc=(region%levels(ilev)%grid%xyz(zcoord,ijkn)+ &
224 region%levels(ilev)%grid%xyz(zcoord,ip1jkn)+ &
225 region%levels(ilev)%grid%xyz(zcoord,ijp1kn)+ &
226 region%levels(ilev)%grid%xyz(zcoord,ijkp1n)+ &
227 region%levels(ilev)%grid%xyz(zcoord,ip1jp1kn)+ &
228 region%levels(ilev)%grid%xyz(zcoord,ijp1kp1n)+ &
229 region%levels(ilev)%grid%xyz(zcoord,ip1jkp1n)+ &
230 region%levels(ilev)%grid%xyz(zcoord,ip1jp1kp1n))/8._rfreal
238 diff(
m,1) =
gradi(mindx(
m),ijkn)-rval(
m)
239 diff(
m,2) =
gradj(mindx(
m),ijkn)-rval(
m)
240 diff(
m,3) = gradk(mindx(
m),ijkn)-rval(
m)
242 IF (abs(diff(
m,1)) > errmax(
m,1))
THEN
243 errmax(
m,1) = abs(diff(
m,1))
248 IF (abs(diff(
m,2)) > errmax(
m,2))
THEN
249 errmax(
m,2) = abs(diff(
m,2))
254 IF (abs(diff(
m,3)) > errmax(
m,3))
THEN
255 errmax(
m,3) = abs(diff(
m,3))
270 WRITE(stdout,*)
i,
j,
k,gradk(1,ijkn),gradk(2,ijkn),gradk(3,ijkn)
271 WRITE(stdout,*)
i,
j,
k,gradk(5,ijkn),gradk(6,ijkn),gradk(7,ijkn)
272 WRITE(stdout,*)
i,
j,
k,gradk(9,ijkn),gradk(10,ijkn),gradk(11,ijkn)
276 WRITE(stdout,*)
'region:',region%localNumber
279 WRITE(stdout,*)
'max error in grad',l,
'(ux) in i,j,k = ', &
280 errmax(1,l),iermax(1,l),jermax(1,l),kermax(1,l)
281 WRITE(stdout,*)
'max error in grad',l,
'(vx) in i,j,k = ', &
282 errmax(2,l),iermax(2,l),jermax(2,l),kermax(2,l)
283 WRITE(stdout,*)
'max error in grad',l,
'(wx) in i,j,k = ', &
284 errmax(3,l),iermax(3,l),jermax(3,l),kermax(3,l)
285 WRITE(stdout,*)
'max error in grad',l,
'(uy) in i,j,k = ', &
286 errmax(4,l),iermax(4,l),jermax(4,l),kermax(4,l)
287 WRITE(stdout,*)
'max error in grad',l,
'(vy) in i,j,k = ', &
288 errmax(5,l),iermax(5,l),jermax(5,l),kermax(5,l)
289 WRITE(stdout,*)
'max error in grad',l,
'(wy) in i,j,k = ', &
290 errmax(6,l),iermax(6,l),jermax(6,l),kermax(6,l)
291 WRITE(stdout,*)
'max error in grad',l,
'(uz) in i,j,k = ', &
292 errmax(7,l),iermax(7,l),jermax(7,l),kermax(7,l)
293 WRITE(stdout,*)
'max error in grad',l,
'(vz) in i,j,k = ', &
294 errmax(8,l),iermax(8,l),jermax(8,l),kermax(8,l)
295 WRITE(stdout,*)
'max error in grad',l,
'(wz) in i,j,k = ', &
296 errmax(9,l),iermax(9,l),jermax(9,l),kermax(9,l)
299 IF (region%localNumber == region%global%nRegions)
stop
301 END SUBROUTINE checkgrad
subroutine rflo_calcgradphysbc(region, patch, iBegV, iEndV, iBegG, iEndG, var, gradi, gradj, gradk)
subroutine rflo_copyedgefacenorm(region, iFBeg, iFEnd, fvari, fvarj, fvark)
subroutine registerfunction(global, funName, fileName)
**********************************************************************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 jdnbeg
**********************************************************************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 idnend
subroutine rflo_getnodeoffset(region, iLev, iNodeOffset, ijNodeOffset)
**********************************************************************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 jdnend
**********************************************************************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 idnbeg
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 iEndG gradi(:,:)
subroutine rflo_calcgraddummy(region, patch, iBegV, iEndV, iBegG, iEndG, gradi, gradj, gradk)
subroutine rflo_getdimensdummynodes(region, iLev, idnbeg, idnend, jdnbeg, jdnend, kdnbeg, kdnend)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine rflo_copyedgefaceparal(region, iFBeg, iFEnd, fvari, fvarj, fvark)
subroutine deregisterfunction(global)
subroutine rflo_calcgradconnbc(region, patch, iConBc, iBegV, iEndV, iBegG, iEndG, var, gradi, gradj, gradk)
subroutine checkindxrange
subroutine rflo_getdimensphys(region, iLev, ipcbeg, ipcend, jpcbeg, jpcend, kpcbeg, kpcend)
**********************************************************************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 kdnbeg
**********************************************************************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 iEndG gradj(:,:)
subroutine rflo_calcgradvector(region, iBegV, iEndV, iBegG, iEndG, var, gradi, gradj, gradk)
subroutine rflo_calcgradfaces(region, ilev, iBegV, iEndV, iBegG, iEndG, var, gradi, gradj, gradk)