115 #include "roccomf90.h"
126 INTEGER :: ditersystem
127 REAL(RFREAL) :: dtimesystem
128 TYPE(t_region
),
POINTER :: regions(:)
134 CHARACTER(CHRLEN) :: rcsidentstring
135 INTEGER :: ipatch,ireg,stophandle,dtlimcount
136 LOGICAL :: doprint,doprobe,dowrite,finished,ftermnew,movegrid,residfterm, &
140 TYPE(t_patch),
POINTER :: ppatch
141 TYPE(t_region
),
POINTER :: pregion,pregionserial
147 rcsidentstring =
'$RCSfile: RFLU_TimeStepping.F90,v $ $Revision: 1.73 $'
153 global => regions(1)%global
156 'RFLU_TimeStepping.F90')
161 global%timeSinceRestart = 0.0_rfreal
177 DO ireg = 1,global%nRegionsLocal
178 IF ( regions(ireg)%mixtInput%moveGrid .EQV. .true. )
THEN
196 IF ( global%flowType == flow_unsteady )
THEN
197 IF ( dtimesystem == 0.0_rfreal )
THEN
198 global%warnCounter = global%warnCounter + 1
200 IF ( global%myProcid == masterproc .AND. &
201 global%verbLevel > verbose_none )
THEN
202 WRITE(stdout,
'(A,2(1X,A))') solver_name,
'*** WARNING *** ', &
203 'Nothing to be done. Returning to calling procedure.'
209 IF ( ditersystem == 0 )
THEN
210 global%warnCounter = global%warnCounter + 1
212 IF ( global%myProcid == masterproc .AND. &
213 global%verbLevel > verbose_none )
THEN
214 WRITE(stdout,
'(A,2(1X,A))') solver_name,
'*** WARNING *** ', &
215 'Nothing to be done. Returning to calling procedure.'
229 IF ( global%flowType == flow_steady )
THEN
230 global%currentIter = global%currentIter + 1
231 global%iterSinceRestart = global%iterSinceRestart + 1
239 DO ireg = 1,global%nRegionsLocal
240 pregion => regions(ireg)
242 IF ( pregion%mixtInput%flowModel == flow_euler )
THEN
249 IF ( global%flowType == flow_unsteady )
THEN
252 IF ( global%dtMin < global%dtImposed .AND. &
253 global%dtMin < global%dtMinLimit )
THEN
254 dtlimcount = dtlimcount + 1
255 IF ( dtlimcount > 2)
THEN
257 stophandle = com_get_function_handle(
'Rocman.interrupt')
258 IF(stophandle <= 0)
THEN
259 WRITE(*,*)
'Could not get Rocman.stop function handle.'
261 CALL com_call_function(stophandle,2,3,
'Rocflu dt < limit, requesting remesh')
267 IF ( global%timeSinceRestart + global%dtMin > dtimesystem )
THEN
268 global%dtMin = dtimesystem - global%timeSinceRestart
277 IF ( global%flowType == flow_unsteady )
THEN
278 IF ( movegrid .EQV. .true. )
THEN
282 DO ireg=1,global%nRegionsLocal
283 pregion => regions(ireg)
288 IF(global%zoomFactor > 1)
THEN
292 IF ( global%checkLevel == check_high )
THEN
304 IF ( global%flowType == flow_unsteady )
THEN
305 IF ( movegrid .EQV. .true. )
THEN
306 DO ireg=1,global%nRegionsLocal
307 pregion => regions(ireg)
308 pmixtinput => pregion%mixtInput
310 IF ( pmixtinput%spaceOrder > 1 )
THEN
314 IF ( pmixtinput%flowModel == flow_navst )
THEN
318 DO ipatch = 1,pregion%grid%nPatches
319 ppatch => pregion%patches(ipatch)
333 IF ( global%flowType == flow_unsteady )
THEN
334 IF ( movegrid .EQV. .true. )
THEN
335 IF ( global%nProbes > 0 )
THEN
336 DO ireg = 1,global%nRegionsLocal
337 pregion => regions(ireg)
350 global%forceX = 0.0_rfreal
351 global%forceY = 0.0_rfreal
352 global%forceZ = 0.0_rfreal
353 global%massIn = 0.0_rfreal
354 global%massOut = 0.0_rfreal
356 IF ( global%flowType == flow_unsteady )
THEN
383 IF ( global%flowType == flow_unsteady )
THEN
384 IF ( global%iterSinceRestart > 1 )
THEN
385 global%timeSincePrint = 0.0_rfreal
391 IF ( global%flowType == flow_unsteady )
THEN
392 global%timeSinceWrite = 0.0_rfreal
397 IF ( global%flowType == flow_unsteady )
THEN
398 IF ( global%iterSinceRestart > 1 )
THEN
399 global%timeSinceProbe = 0.0_rfreal
411 IF ( global%flowType == flow_unsteady )
THEN
412 global%currentTime = global%currentTime + global%dtMin
413 global%timeSinceRestart = global%timeSinceRestart + global%dtMin
415 global%timeSincePrint = global%timeSincePrint + global%dtMin
416 global%timeSinceWrite = global%timeSinceWrite + global%dtMin
417 global%timeSinceProbe = global%timeSinceProbe + global%dtMin
419 global%iterSinceRestart = global%iterSinceRestart + 1
434 INQUIRE(file=
"STOP",exist=stopfileexists)
435 IF ( stopfileexists .EQV. .true. )
THEN
436 IF ( global%myProcid == masterproc .AND. &
437 global%verbLevel /= verbose_none )
THEN
438 WRITE(stdout,
'(A)') solver_name
439 WRITE(stdout,
'(A,1X,A)') solver_name,
'Stop file detected!'
440 WRITE(stdout,
'(A)') solver_name
450 IF ( global%flowType == flow_unsteady )
THEN
451 IF ( global%timeSinceRestart >= dtimesystem )
THEN
455 IF ( (doprint .EQV. .true.) .OR. (global%iterSinceRestart >= ditersystem) )
THEN
457 IF ( (global%iterSinceRestart >= ditersystem) .OR. &
458 (global%residual/global%resInit <= global%resTol) )
THEN
468 IF ( (doprint .EQV. .true.) .OR. (finished .EQV. .true.) )
THEN
472 IF ( movegrid .EQV. .true. )
THEN
479 DO ireg = 1,global%nRegionsLocal
480 IF ( regions(ireg)%mixtInput%spaceDiscr == discr_opt_les )
THEN
492 IF ( global%forceFlag .EQV. .true. )
THEN
493 IF ( (dowrite .EQV. .true.) .OR. (finished .EQV. .true.) )
THEN
494 DO ireg = 1,global%nRegionsLocal
495 pregion => regions(ireg)
502 DO ireg = 1,global%nRegionsLocal
503 pregion => regions(ireg)
508 pregion => regions(1)
510 IF ( pregion%global%myProcid == masterproc )
THEN
523 IF ( global%nProbes > 0 )
THEN
524 IF ( doprobe .EQV. .true. )
THEN
525 DO ireg = 1,global%nRegionsLocal
539 IF ( (dowrite .EQV. .true.) .AND. (finished .EQV. .false.) )
THEN
541 IF ( global%plagUsed .EQV. .true. )
THEN
544 IF ( global%myProcid == masterproc )
THEN
545 pregionserial => regions(0)
552 DO ireg=1,global%nRegionsLocal
553 pregion => regions(ireg)
557 IF ( movegrid .EQV. .true. )
THEN
561 IF ( global%myProcid == masterproc .AND. &
562 global%verbLevel > verbose_none )
THEN
570 IF ( global%patchCoeffFlag .EQV. .true. )
THEN
575 IF ( global%plagUsed .EQV. .true. )
THEN
580 IF ( global%myProcid == masterproc .AND. &
581 global%verbLevel > verbose_none )
THEN
584 IF ( global%verbLevel > verbose_low )
THEN
589 IF ( global%plagUsed .EQV. .true. )
THEN
604 IF ( (dowrite .EQV. .true.) .AND. (finished .EQV. .false.) .AND. &
605 (global%doStat == active) )
THEN
606 IF (global%myProcid==masterproc .AND. &
607 global%verbLevel/=verbose_none)
THEN
608 WRITE(stdout,
'(A)') solver_name,
'Saving statistics ...'
611 DO ireg = 1,global%nRegionsLocal
612 pregion => regions(ireg)
624 IF ( finished .EQV. .true. )
THEN
626 DO ireg = 1,global%nRegionsLocal
630 global%timeStamp = global%currentTime
subroutine rflu_timestepviscous(pRegion)
subroutine rflu_movegridwrapper(regions)
subroutine rflu_printwriteconvergence(global)
subroutine integratesourcetermsmp(regions)
subroutine, public rflu_tsi_printglobalvals(pRegion)
subroutine rflu_timestepinviscid(pRegion)
subroutine, public rflu_writedimensionswrapper(pRegion, writeMode)
subroutine, public rflu_writeflowwrapper(pRegion)
LOGICAL function rflu_decideneedbgradface(pRegion, pPatch)
subroutine, public rflu_writegridspeedswrapper(pRegion)
subroutine registerfunction(global, funName, fileName)
subroutine, public rflu_zoomgridspeeds(pRegion)
LOGICAL function rflu_decidewrite(global)
subroutine, public rflu_buildgeometry(pRegion, sypeFaceFlag)
subroutine rflu_putboundaryvalues(region)
subroutine rflu_residualnorm(regions)
subroutine, public rflu_findprobecells(pRegion)
LOGICAL function, public rflu_decidewriteprobes(global)
subroutine, public rflu_computewtsbf2cwrapper(pRegion, pPatch, order)
subroutine rflu_minimumtimestep(regions)
subroutine rflu_writestat(region)
subroutine rflu_explicitmultistage(regions)
subroutine rflu_writestatsfileoles(global)
subroutine writeprobe(regions, iReg)
subroutine, public rflu_printprobeinfo(global)
subroutine rflu_computegridspeeds(pRegion)
subroutine, public getstatistics(regions)
subroutine, public rflu_writepatchcoeffswrapper(pRegion)
subroutine rflu_computeintegralvalues(regions)
subroutine rungekuttamp(regions)
subroutine, public rflu_writeglobalforcesmoments(pRegion)
subroutine, public rflu_tsi_computeglobalthrustsi(pRegion)
subroutine rflu_timestepping(dTimeSystem, dIterSystem, regions)
subroutine, public rflu_writegridwrapper(pRegion)
subroutine, public plag_writesurfstatswrapper(pRegion)
subroutine, public rflu_computewtsc2cwrapper(pRegion, order)
subroutine, public rflu_computeglobalforcesmoments(regions)
subroutine, public rflu_computelocalforcesmoments(pRegion)
subroutine rflu_printgridinfo(pRegion)
subroutine, public plag_printnpclsglobal(pRegion)
LOGICAL function rflu_decideprint(global)
subroutine rflu_printchangeinfo(pRegion)
subroutine, public rflu_computewtsf2cwrapper(pRegion, order)
subroutine, public plag_rflu_writedimensions(pRegion)
subroutine rflu_checkgridspeeds(pRegion)
subroutine writetotalmass(regions)
subroutine deregisterfunction(global)
subroutine, public plag_calcnpclsglobal(regions)
subroutine, public rflu_tsi_writeglobalvals(pRegion)
subroutine rflu_writerestartinfo(global)
subroutine, public rflu_bxv_writevarswrapper(pRegion)
subroutine, public rflu_printglobalforcesmoments(pRegion)
subroutine rflu_printflowinfowrapper(pRegion)
subroutine, public rflu_unzoomgridspeeds(pRegion)