62 TYPE(t_region
),
POINTER :: pregion
66 INTEGER :: c1g,c2g,errorflag,hloc,iint,ic1l,ic2l,ifc,ifcp,ifun,ifunnz,
j, &
67 key,l,loopcounter,
m,
n,ncells,nfun,nfunnz,restartflag,vloc
68 REAL(RFREAL) :: normfact,normfactterm
70 TYPE(t_grid),
POINTER :: pgrid
77 global => pregion%global
80 'RFLU_ComputeIntegral2OLES.F90')
82 IF ( global%myProcid == masterproc .AND. &
83 global%verbLevel > verbose_low )
THEN
84 WRITE(stdout,
'(A,3X,A)') solver_name,
'Computing integral 2...'
101 normfactterm = 1.0_rfreal/pgrid%deltaOLES**6
112 errabsreq = 10.0_rfreal*epsilon(1.0_rfreal)
113 errrelreq = 2.0e-3_rfreal
119 maxcalls = max_calls_limit
124 ALLOCATE(workarray(workarraysize),stat=errorflag)
125 global%error = errorflag
126 IF ( global%error /= err_none )
THEN
127 CALL
errorstop(global,err_allocate,__line__,
'workArray')
130 ALLOCATE(integral(nfun),stat=errorflag)
131 global%error = errorflag
132 IF ( global%error /= err_none )
THEN
133 CALL
errorstop(global,err_allocate,__line__,
'integral')
136 integral(:) = 0.0_rfreal
137 integralnz(:) = 0.0_rfreal
150 ifc = pgrid%fp2fOLES(ifcp)
152 ncells =
SIZE(pgrid%fsOLES,1)
159 c1g = pgrid%fsOLES(ic1l,ifc)
161 lowlim(1) = pgrid%intLimOLES(int_lim_low,xcoord,c1g)
162 lowlim(2) = pgrid%intLimOLES(int_lim_low,ycoord,c1g)
163 lowlim(3) = pgrid%intLimOLES(int_lim_low,zcoord,c1g)
165 upplim(1) = pgrid%intLimOLES(int_lim_upp,xcoord,c1g)
166 upplim(2) = pgrid%intLimOLES(int_lim_upp,ycoord,c1g)
167 upplim(3) = pgrid%intLimOLES(int_lim_upp,zcoord,c1g)
170 c2g = pgrid%fsOLES(ic2l,ifc)
172 lowlim(4) = pgrid%intLimOLES(int_lim_low,xcoord,c2g)
173 lowlim(5) = pgrid%intLimOLES(int_lim_low,ycoord,c2g)
174 lowlim(6) = pgrid%intLimOLES(int_lim_low,zcoord,c2g)
176 upplim(4) = pgrid%intLimOLES(int_lim_upp,xcoord,c2g)
177 upplim(5) = pgrid%intLimOLES(int_lim_upp,ycoord,c2g)
178 upplim(6) = pgrid%intLimOLES(int_lim_upp,zcoord,c2g)
184 maxcalls = max_calls_start
187 DO loopcounter = 1,dcuhre_loop_limit
188 IF ( iint == 1 )
THEN
189 CALL dcuhre(ndim,nfunnz,lowlim,upplim,min_calls,maxcalls, &
191 key,workarraysize,restartflag,integralnz, &
192 errabsest,neval,errorflag,workarray)
194 CALL dcuhre(ndim,nfunnz,lowlim,upplim,min_calls,maxcalls, &
196 key,workarraysize,restartflag,integralnz, &
197 errabsest,neval,errorflag,workarray)
200 IF ( errorflag == 0 .OR. loopcounter == dcuhre_loop_limit )
THEN
202 ELSE IF ( errorflag == 1 )
THEN
204 maxcalls = max_calls_factor*maxcalls
209 IF ( workarraysizenew > workarraysize )
THEN
213 CALL
errorstop(global,err_dcuhre_output,__line__)
219 IF ( iint == 1 )
THEN
220 normfact = normfactterm
222 normfact = normfactterm*const_kolmogorov/ &
223 (6.0_rfreal*pgrid%rhoOLES(ifc)**(2.0_rfreal/3.0_rfreal))
227 ifun = mapfunnz2funcorr22(ifunnz)
228 integral(ifun) = normfact*integralnz(ifunnz)
239 IF ( iint == 1 )
THEN
240 pgrid%int20OLES(ifcp,vloc,hloc) = integral(ifun)
242 pgrid%int21OLES(ifcp,vloc,hloc) = integral(ifun)
252 #ifdef CHECK_DATASTRUCT
254 WRITE(stdout,
'(A)') solver_name
255 WRITE(stdout,
'(A,1X,A)') solver_name,
'### START CHECK OUTPUT ###'
256 WRITE(stdout,
'(A,1X,A)') solver_name,
'Optimal LES I20 integral matrix'
258 WRITE(stdout,
'(A,3X,A,1X,I2)') solver_name,
'Face:',ifcp
260 WRITE(stdout,
'(A,1X,I6,6(1X,E11.4))') solver_name,vloc, &
261 pgrid%int20OLES(ifcp,vloc,1:3*ncells)
264 WRITE(stdout,
'(A,1X,A)') solver_name,
'Optimal LES I21 integral matrix'
266 WRITE(stdout,
'(A,3X,A,1X,I2)') solver_name,
'Face:',ifcp
268 WRITE(stdout,
'(A,1X,I6,6(1X,E11.4))') solver_name,vloc, &
269 pgrid%int21OLES(ifcp,vloc,1:3*ncells)
272 WRITE(stdout,
'(A,1X,A)') solver_name,
'### END CHECK OUTPUT ###'
273 WRITE(stdout,
'(A)') solver_name
282 DEALLOCATE(integral,stat=errorflag)
283 global%error = errorflag
284 IF ( global%error /= err_none )
THEN
285 CALL
errorstop(global,err_deallocate,__line__,
'integral')
288 DEALLOCATE(workarray,stat=errorflag)
289 global%error = errorflag
290 IF ( global%error /= err_none )
THEN
291 CALL
errorstop(global,err_deallocate,__line__,
'workArray')
subroutine rflu_computedcuhreinfo(global, NDIM, NF, KEY, MAXCLS, NW)
subroutine, public rflu_definecorrelation221(nDim, z, nFunNZ, f)
subroutine registerfunction(global, funName, fileName)
INTEGER function, public rflu_geti1posoles(l, d)
subroutine rflu_allocatedcuhrearrays(nDim, nFunNZ, nFun)
INTEGER function, public rflu_getlposoles(j, a)
subroutine, public rflu_mapk2ij(k, i, j)
subroutine, public rflu_setmapfunnz2funcorr22(nFunNZ)
subroutine rflu_deallocatedcuhrearrays
subroutine rflu_computeintegral2oles(pRegion)
subroutine, public rflu_definecorrelation220(nDim, z, nFunNZ, f)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)