62 TYPE(t_region
),
POINTER :: pregion
66 INTEGER :: c1g,c2g,c3g,c4g,errorflag,hloc,iint,ic1l,ic2l,ic3l,ic4l,ifc, &
67 ifcp,ifun,ifunnz,
j,
k,
key,l,loopcounter,
m,ncells,nfun,nfunnz, &
69 REAL(RFREAL) :: normfact,normfactterm
71 TYPE(t_grid),
POINTER :: pgrid
79 'RFLU_ComputeIntegral5OLES.F90')
81 IF ( global%myProcid == masterproc .AND. &
82 global%verbLevel > verbose_low )
THEN
83 WRITE(stdout,
'(A,3X,A)') solver_name,
'Computing integral 5...'
105 errabsreq = 10.0_rfreal*epsilon(1.0_rfreal)
106 errrelreq = 1.0e-2_rfreal
112 maxcalls = max_calls_limit
117 ALLOCATE(integral(nfun),stat=errorflag)
118 global%error = errorflag
119 IF ( global%error /= err_none )
THEN
120 CALL
errorstop(global,err_allocate,__line__,
'integral')
123 ALLOCATE(workarray(workarraysize),stat=errorflag)
124 global%error = errorflag
125 IF ( global%error /= err_none )
THEN
126 CALL
errorstop(global,err_allocate,__line__,
'workArray')
133 normfactterm = 1.0_rfreal/(pgrid%deltaOLES**12)
146 ifc = pgrid%fp2fOLES(ifcp)
152 ncells =
SIZE(pgrid%fsOLES,1)
155 c1g = pgrid%fsOLES(ic1l,ifc)
157 lowlim(1) = pgrid%intLimOLES(int_lim_low,xcoord,c1g)
158 lowlim(2) = pgrid%intLimOLES(int_lim_low,ycoord,c1g)
159 lowlim(3) = pgrid%intLimOLES(int_lim_low,zcoord,c1g)
161 upplim(1) = pgrid%intLimOLES(int_lim_upp,xcoord,c1g)
162 upplim(2) = pgrid%intLimOLES(int_lim_upp,ycoord,c1g)
163 upplim(3) = pgrid%intLimOLES(int_lim_upp,zcoord,c1g)
166 c2g = pgrid%fsOLES(ic2l,ifc)
168 lowlim(4) = pgrid%intLimOLES(int_lim_low,xcoord,c2g)
169 lowlim(5) = pgrid%intLimOLES(int_lim_low,ycoord,c2g)
170 lowlim(6) = pgrid%intLimOLES(int_lim_low,zcoord,c2g)
172 upplim(4) = pgrid%intLimOLES(int_lim_upp,xcoord,c2g)
173 upplim(5) = pgrid%intLimOLES(int_lim_upp,ycoord,c2g)
174 upplim(6) = pgrid%intLimOLES(int_lim_upp,zcoord,c2g)
178 c3g = pgrid%fsOLES(ic3l,ifc)
180 lowlim(7) = pgrid%intLimOLES(int_lim_low,xcoord,c3g)
181 lowlim(8) = pgrid%intLimOLES(int_lim_low,ycoord,c3g)
182 lowlim(9) = pgrid%intLimOLES(int_lim_low,zcoord,c3g)
184 upplim(7) = pgrid%intLimOLES(int_lim_upp,xcoord,c3g)
185 upplim(8) = pgrid%intLimOLES(int_lim_upp,ycoord,c3g)
186 upplim(9) = pgrid%intLimOLES(int_lim_upp,zcoord,c3g)
189 c4g = pgrid%fsOLES(ic4l,ifc)
191 lowlim(10) = pgrid%intLimOLES(int_lim_low,xcoord,c4g)
192 lowlim(11) = pgrid%intLimOLES(int_lim_low,ycoord,c4g)
193 lowlim(12) = pgrid%intLimOLES(int_lim_low,zcoord,c4g)
195 upplim(10) = pgrid%intLimOLES(int_lim_upp,xcoord,c4g)
196 upplim(11) = pgrid%intLimOLES(int_lim_upp,ycoord,c4g)
197 upplim(12) = pgrid%intLimOLES(int_lim_upp,zcoord,c4g)
203 maxcalls = max_calls_start
206 integral(:) = 0.0_rfreal
207 integralnz(:) = 0.0_rfreal
209 DO loopcounter = 1,dcuhre_loop_limit
210 IF ( iint == 1 )
THEN
211 CALL dcuhre(ndim,nfunnz,lowlim,upplim,min_calls,maxcalls, &
213 key,workarraysize,restartflag,integralnz, &
214 errabsest,neval,errorflag,workarray)
215 ELSE IF ( iint == 2 )
THEN
216 CALL dcuhre(ndim,nfunnz,lowlim,upplim,min_calls,maxcalls, &
218 key,workarraysize,restartflag,integralnz, &
219 errabsest,neval,errorflag,workarray)
220 ELSE IF ( iint == 3 )
THEN
221 CALL dcuhre(ndim,nfunnz,lowlim,upplim,min_calls,maxcalls, &
223 key,workarraysize,restartflag,integralnz, &
224 errabsest,neval,errorflag,workarray)
227 IF ( errorflag == 0 .OR. loopcounter == dcuhre_loop_limit )
THEN
229 ELSE IF ( errorflag == 1 )
THEN
231 maxcalls = max_calls_factor*maxcalls
236 IF ( workarraysizenew > workarraysize )
THEN
240 CALL
errorstop(global,err_dcuhre_output,__line__)
246 IF ( iint == 1 )
THEN
247 normfact = normfactterm
248 ELSE IF ( iint == 2 )
THEN
249 normfact = normfactterm*const_kolmogorov/ &
250 (6.0_rfreal*pgrid%rhoOLES(ifc)**(2.0_rfreal/3.0_rfreal))
251 ELSE IF ( iint == 3 )
THEN
252 normfact = normfactterm*const_kolmogorov*const_kolmogorov/ &
253 (36.0_rfreal*pgrid%rhoOLES(ifc)**(4.0_rfreal/3.0_rfreal))
257 ifun = mapfunnz2funcorr44(ifunnz)
258 integral(ifun) = normfact*integralnz(ifunnz)
269 IF ( iint == 1 )
THEN
270 pgrid%int50OLES(ifcp,vloc,hloc) = integral(ifun)
271 ELSE IF ( iint == 2 )
THEN
272 pgrid%int51OLES(ifcp,vloc,hloc) = integral(ifun)
274 pgrid%int52OLES(ifcp,vloc,hloc) = integral(ifun)
288 #ifdef CHECK_DATASTRUCT
290 WRITE(stdout,
'(A)') solver_name
291 WRITE(stdout,
'(A,1X,A)') solver_name,
'### START CHECK OUTPUT ###'
292 WRITE(stdout,
'(A,1X,A)') solver_name,
'Optimal LES I50 integral matrix'
294 WRITE(stdout,
'(A,3X,A,1X,I2)') solver_name,
'Face:',ifcp
295 DO vloc = 1,9*ncells*ncells
296 WRITE(stdout,
'(A,1X,I6,36(1X,E11.4))') solver_name,vloc, &
297 pgrid%int50OLES(ifcp,vloc,1:9*ncells*ncells)
300 WRITE(stdout,
'(A,1X,A)') solver_name,
'Optimal LES I51 integral matrix'
302 WRITE(stdout,
'(A,3X,A,1X,I2)') solver_name,
'Face:',ifcp
303 DO vloc = 1,9*ncells*ncells
304 WRITE(stdout,
'(A,1X,I6,36(1X,E11.4))') solver_name,vloc, &
305 pgrid%int51OLES(ifcp,vloc,1:9*ncells*ncells)
308 WRITE(stdout,
'(A,1X,A)') solver_name,
'Optimal LES I52 integral matrix'
310 WRITE(stdout,
'(A,3X,A,1X,I2)') solver_name,
'Face:',ifcp
311 DO vloc = 1,9*ncells*ncells
312 WRITE(stdout,
'(A,1X,I6,36(1X,E11.4))') solver_name,vloc, &
313 pgrid%int52OLES(ifcp,vloc,1:9*ncells*ncells)
316 WRITE(stdout,
'(A,1X,A)') solver_name,
'### END CHECK OUTPUT ###'
317 WRITE(stdout,
'(A)') solver_name
327 DEALLOCATE(integral,stat=errorflag)
328 global%error = errorflag
329 IF ( global%error /= err_none )
THEN
330 CALL
errorstop(global,err_deallocate,__line__,
'integral')
333 DEALLOCATE(workarray,stat=errorflag)
334 global%error = errorflag
335 IF ( global%error /= err_none )
THEN
336 CALL
errorstop(global,err_deallocate,__line__,
'workArray')
subroutine rflu_computedcuhreinfo(global, NDIM, NF, KEY, MAXCLS, NW)
subroutine rflu_computeintegral5oles(pRegion)
subroutine registerfunction(global, funName, fileName)
subroutine rflu_allocatedcuhrearrays(nDim, nFunNZ, nFun)
subroutine, public rflu_setmapfunnz2funcorr44(nFunNZ)
subroutine, public rflu_definecorrelation542(nDim, z, nFunNZ, f)
subroutine, public rflu_definecorrelation540(nDim, z, nFunNZ, f)
subroutine, public rflu_mapm2ijkl(m, i, j, k, l)
subroutine rflu_deallocatedcuhrearrays
subroutine, public rflu_definecorrelation541(nDim, z, nFunNZ, f)
INTEGER function, public rflu_geti4posoles(l, m, d, e, nCells)
subroutine errorstop(global, errorCode, errorLine, addMessage)
INTEGER function, public rflu_getqposoles(j, k, b, g, nCells)
subroutine deregisterfunction(global)