62 TYPE(t_region
),
POINTER :: pregion
66 INTEGER :: c1g,errorflag,
i,ic1l,ifc,ifcp,ifun,ifunnz,
key,l, &
67 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_ComputeIntegral1OLES.F90')
82 IF ( global%myProcid == masterproc .AND. &
83 global%verbLevel > verbose_low )
THEN
84 WRITE(stdout,
'(A,3X,A)') solver_name,
'Computing integral 1...'
102 errabsreq = 10.0_rfreal*epsilon(1.0_rfreal)
103 errrelreq = 5.0e-3_rfreal
109 maxcalls = max_calls_limit
114 ALLOCATE(integral(nfun),stat=errorflag)
115 global%error = errorflag
116 IF ( global%error /= err_none )
THEN
117 CALL
errorstop(global,err_allocate,__line__,
'integral')
120 integral(:) = 0.0_rfreal
122 ALLOCATE(workarray(workarraysize),stat=errorflag)
123 global%error = errorflag
124 IF ( global%error /= err_none )
THEN
125 CALL
errorstop(global,err_allocate,__line__,
'workArray')
132 normfact = 1.0_rfreal/(15.0_rfreal*pgrid%deltaOLES**6)
145 ifc = pgrid%fp2fOLES(ifcp)
151 c1g = pgrid%f2c(1,ifc)
153 dummy = maxloc(abs(pgrid%fn(1:3,ifc)))
155 nzval = pgrid%fc(nzloc,ifc)
156 nzsgn = nint(pgrid%fn(nzloc,ifc))
161 IF (
m /= nzloc )
THEN
164 lowlim(
n) = pgrid%intLimOLES(int_lim_low,
m,c1g)
165 upplim(
n) = pgrid%intLimOLES(int_lim_upp,
m,c1g)
173 ncells =
SIZE(pgrid%fsOLES,1)
176 c1g = pgrid%fsOLES(ic1l,ifc)
178 lowlim(1) = pgrid%intLimOLES(int_lim_low,xcoord,c1g)
179 lowlim(2) = pgrid%intLimOLES(int_lim_low,ycoord,c1g)
180 lowlim(3) = pgrid%intLimOLES(int_lim_low,zcoord,c1g)
182 upplim(1) = pgrid%intLimOLES(int_lim_upp,xcoord,c1g)
183 upplim(2) = pgrid%intLimOLES(int_lim_upp,ycoord,c1g)
184 upplim(3) = pgrid%intLimOLES(int_lim_upp,zcoord,c1g)
188 maxcalls = max_calls_start
193 DO loopcounter = 1,dcuhre_loop_limit
194 CALL dcuhre(ndim,nfunnz,lowlim,upplim,min_calls,maxcalls, &
196 key,workarraysize,restartflag,integralnz, &
197 errabsest,neval,errorflag,workarray)
199 IF ( errorflag == 0 .OR. loopcounter == dcuhre_loop_limit )
THEN
201 ELSE IF ( errorflag == 1 )
THEN
203 maxcalls = max_calls_factor*maxcalls
208 IF ( workarraysizenew > workarraysize )
THEN
212 CALL
errorstop(global,err_dcuhre_output,__line__)
219 ifun = mapfunnz2funcorr32(ifunnz)
220 integral(ifun) = normfact*integralnz(ifunnz)
228 pgrid%int1OLES(
i,ifcp,vloc) = integral(ifun)
234 #ifdef CHECK_DATASTRUCT
236 WRITE(stdout,
'(A)') solver_name
237 WRITE(stdout,
'(A,1X,A)') solver_name,
'### START CHECK OUTPUT ###'
238 WRITE(stdout,
'(A,1X,A)') solver_name,
'Optimal LES I1 integral vector'
240 WRITE(stdout,
'(2(A,1X),I1)') solver_name,
'Component:',
i
242 WRITE(stdout,
'(A,3X,A,1X,I2)') solver_name,
'Face:',ifcp
244 WRITE(stdout,
'(A,1X,I6,1X,E11.4)') solver_name,vloc, &
245 pgrid%int1OLES(
i,ifcp,vloc)
249 WRITE(stdout,
'(A,1X,A)') solver_name,
'### END CHECK OUTPUT ###'
250 WRITE(stdout,
'(A)') solver_name
259 DEALLOCATE(integral,stat=errorflag)
260 global%error = errorflag
261 IF ( global%error /= err_none )
THEN
262 CALL
errorstop(global,err_deallocate,__line__,
'integral')
265 DEALLOCATE(workarray,stat=errorflag)
266 global%error = errorflag
267 IF ( global%error /= err_none )
THEN
268 CALL
errorstop(global,err_deallocate,__line__,
'workArray')
subroutine rflu_computedcuhreinfo(global, NDIM, NF, KEY, MAXCLS, NW)
subroutine registerfunction(global, funName, fileName)
INTEGER function, public rflu_geti1posoles(l, d)
subroutine, public rflu_setmapfunnz2funcorr32(nFunNZ)
subroutine rflu_allocatedcuhrearrays(nDim, nFunNZ, nFun)
subroutine rflu_computeintegral1oles(pRegion)
subroutine, public rflu_mapk2ij(k, i, j)
subroutine, public rflu_definecorrelation32(nDim, z, nFunNZ, f)
subroutine rflu_deallocatedcuhrearrays
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)