3 subroutine master(useSpatial, famLists, funcValues, forces, &
4 bcDataNames, bcDataValues, bcDataFamLists)
47 logical,
intent(in) :: useSpatial
48 integer(kind=intType),
optional,
dimension(:, :),
intent(in) :: famLists
49 real(kind=realtype),
optional,
dimension(:, :),
intent(out) :: funcvalues
50 character,
optional,
dimension(:, :),
intent(in) :: bcDataNames
51 real(kind=realtype),
optional,
dimension(:),
intent(in) :: bcdatavalues
52 integer(kind=intType),
optional,
dimension(:, :) :: bcDataFamLists
55 real(kind=realtype),
intent(out),
optional,
dimension(:, :, :) :: forces
58 integer(kind=intType) :: ierr, nn, sps, fSize, iRegion
59 real(kind=realtype),
dimension(nSections) :: time
60 real(kind=realtype) :: dummyreal
67 if (
present(bcdatanames))
then
69 call setbcdata(bcdatanames, bcdatavalues, bcdatafamlists, sps, &
70 size(bcdatavalues),
size(bcdatafamlists, 2))
106 call vecgetarrayf90(xsurfvec(1, sps),
xsurf, ierr)
107 call echk(ierr, __file__, __line__)
124 call vecrestorearrayf90(xsurfvec(1, sps),
xsurf, ierr)
125 call echk(ierr, __file__, __line__)
152 call echk(ierr, __file__, __line__)
246 if (
present(famlists))
then
251 if (
present(forces))
then
253 fsize =
size(forces, 2)
254 call getforces(forces(:, :, sps), fsize, sps)
260 subroutine master_d(wdot, xdot, forcesDot, dwDot, famLists, funcValues, funcValuesd, &
261 bcDataNames, bcDataValues, bcDataValuesd, bcDataFamLists)
270 use blockpointers,
only: ndom,
il,
jl,
kl,
wd,
xd,
dw,
dwd,
nbocos,
nviscbocos
303 #include <petsc/finclude/petsc.h>
308 real(kind=realtype),
intent(in),
dimension(:) :: wdot, xdot
309 integer(kind=intType),
optional,
dimension(:, :),
intent(in) :: famLists
310 real(kind=realtype),
optional,
dimension(:, :),
intent(out) :: funcvalues, funcvaluesd
311 character,
optional,
dimension(:, :),
intent(in) :: bcDataNames
312 real(kind=realtype),
optional,
dimension(:),
intent(in) :: bcdatavalues, bcdatavaluesd
313 integer(kind=intType),
optional,
dimension(:, :) :: bcDataFamLists
316 real(kind=realtype),
intent(out),
dimension(:) :: dwdot
317 real(kind=realtype),
intent(out),
dimension(:, :, :) :: forcesdot
320 real(kind=realtype),
dimension(:, :, :),
allocatable :: forces
321 integer(kind=intType) :: ierr, nn, sps, mm, i, j, k, l, fSize, ii, jj, iRegion
322 real(kind=realtype),
dimension(nSections) :: time
323 real(kind=realtype) :: dummyreal, dummyreald
325 logical :: useOldCoor
328 fsize =
size(forcesdot, 2)
331 call vecplacearray(x_like, xdot, ierr)
332 call echk(ierr, __file__, __line__)
337 domainloop1:
do nn = 1, ndom
345 xd(i, j, k, l) = xdot(ii)
355 wd(i, j, k, l) = wdot(jj)
383 print *,
'Full overset update derivatives not implemented'
394 call vecscatterbegin(wallscatter(1, sps), x_like, xsurfvecd(sps), insert_values, scatter_forward, ierr)
395 call echk(ierr, __file__, __line__)
397 call vecscatterend(wallscatter(1, sps), x_like, xsurfvecd(sps), insert_values, scatter_forward, ierr)
398 call echk(ierr, __file__, __line__)
404 if (
present(bcdatanames))
then
406 call setbcdata_d(bcdatanames, bcdatavalues, bcdatavaluesd, &
407 bcdatafamlists, sps,
size(bcdatavalues),
size(bcdatafamlists, 2))
426 call vecgetarrayf90(xsurfvec(1, sps),
xsurf, ierr)
427 call echk(ierr, __file__, __line__)
430 call vecgetarrayf90(xsurfvecd(sps),
xsurfd, ierr)
431 call echk(ierr, __file__, __line__)
433 call volume_block_d()
434 call metric_block_d()
441 call boundarynormals_d()
446 time(mm) = time(mm) + (sps - 1) *
sections(mm)%timeperiod / real(&
475 call vecrestorearrayf90(xsurfvec(1, sps),
xsurf, ierr)
476 call echk(ierr, __file__, __line__)
479 call vecrestorearrayf90(xsurfvecd(sps),
xsurfd, ierr)
480 call echk(ierr, __file__, __line__)
489 call echk(ierr, __file__, __line__)
493 call whalo2_d(1, 1, nw, .true., .true., .true.)
584 if (
present(famlists))
then
589 call getforces_d(forces(:, :, sps), forcesdot(:, :, sps), fsize, sps)
602 dwdot(ii) =
dwd(i, j, k, l)
609 call vecresetarray(x_like, ierr)
610 call echk(ierr, __file__, __line__)
614 subroutine master_b(wbar, xbar, extraBar, forcesBar, dwBar, nState, famLists, &
615 funcValues, funcValuesd, bcDataNames, bcDataValues, bcDataValuesd, bcDataFamLists)
669 #include <petsc/finclude/petsc.h>
674 real(kind=realtype),
intent(in),
dimension(:) :: dwbar
675 real(kind=realtype),
intent(in),
dimension(:, :, :) :: forcesbar
676 integer(kind=intType),
intent(in) :: nState
677 integer(kind=intType),
optional,
dimension(:, :),
intent(in) :: famLists
678 real(kind=realtype),
optional,
dimension(:, :) :: funcvalues, funcvaluesd
679 character,
optional,
dimension(:, :),
intent(in) :: bcDataNames
680 real(kind=realtype),
optional,
dimension(:),
intent(in) :: bcdatavalues
681 integer(kind=intType),
optional,
dimension(:, :) :: bcDataFamLists
684 real(kind=realtype),
optional,
intent(out),
dimension(:) :: wbar, xbar, extrabar
685 real(kind=realtype),
optional,
dimension(:),
intent(out) :: bcdatavaluesd
688 integer(kind=intType) :: ierr, nn, sps, mm, i, j, k, l, fSize, ii, jj, level, iRegion
689 real(kind=realtype),
dimension(:),
allocatable :: extralocalbar, bcdatavaluesdlocal
690 real(kind=realtype) :: dummyreal, dummyreald
691 logical :: resetToRans
692 real(kind=realtype),
dimension(nSections) :: time
693 logical :: useOldCoor
697 allocate (extralocalbar(
size(extrabar)))
703 call vecplacearray(x_like, xbar, ierr)
704 call echk(ierr, __file__, __line__)
720 dwd(i, j, k, l) = dwbar(ii)
729 fsize =
size(forcesbar, 2)
734 if (
present(famlists))
then
740 domainloop1:
do nn = 1, ndom
813 call echk(ierr, __file__, __line__)
843 call vecgetarrayf90(xsurfvec(1, sps),
xsurf, ierr)
844 call echk(ierr, __file__, __line__)
847 call vecgetarrayf90(xsurfvecd(sps),
xsurfd, ierr)
848 call echk(ierr, __file__, __line__)
853 domainloop2:
do nn = 1, ndom
882 time(mm) = time(mm) + (sps - 1) *
sections(mm)%timeperiod / real(&
901 call vecgetarrayf90(xsurfvec(1, sps),
xsurf, ierr)
902 call echk(ierr, __file__, __line__)
905 call vecgetarrayf90(xsurfvecd(sps),
xsurfd, ierr)
906 call echk(ierr, __file__, __line__)
912 call vecscatterbegin(wallscatter(1, sps), xsurfvecd(sps), x_like, add_values, scatter_reverse, ierr)
913 call echk(ierr, __file__, __line__)
915 call vecscatterend(wallscatter(1, sps), xsurfvecd(sps), x_like, add_values, scatter_reverse, ierr)
916 call echk(ierr, __file__, __line__)
925 if (
present(bcdatanames))
then
926 allocate (bcdatavaluesdlocal(
size(bcdatavaluesd)))
927 bcdatavaluesdlocal =
zero
930 call setbcdata_b(bcdatanames, bcdatavalues, bcdatavaluesdlocal, bcdatafamlists, &
931 sps,
size(bcdatavalues),
size(bcdatafamlists, 2))
934 call mpi_allreduce(bcdatavaluesdlocal, bcdatavaluesd,
size(bcdatavaluesd), adflow_real, &
936 deallocate (bcdatavaluesdlocal)
948 print *,
'Full overset update derivatives not implemented'
962 call vecresetarray(x_like, ierr)
963 call echk(ierr, __file__, __line__)
995 wbar(ii) =
wd(i, j, k, l)
1009 xbar(jj) = xbar(jj) +
xd(i, j, k, l)
1020 call mpi_allreduce(extralocalbar, extrabar,
size(extrabar), adflow_real, &
1022 call echk(ierr, __file__, __line__)
1068 real(kind=realtype),
intent(in),
dimension(:) :: dwbar
1069 integer(kind=intType),
intent(in) :: nState
1072 real(kind=realtype),
intent(out),
dimension(:) :: wbar
1075 integer(kind=intType) :: ierr, nn, sps, mm, i, j, k, l, fSize, ii, jj, level, iRegion
1076 real(kind=realtype) :: dummyreal
1088 dwd(i, j, k, l) = dwbar(ii)
1101 domainloop1:
do nn = 1, ndom
1177 domainloop2:
do nn = 1, ndom
1205 wbar(ii) =
wd(i, j, k, l)
1237 integer(kind=intType),
intent(in) :: nn, sps
1238 logical,
optional,
intent(in) :: useFlowRes, useTurbRes
1241 integer(kind=intType) :: ierr, mm, i, j, k, l, fSize, ii, jj, iRegion
1242 real(kind=realtype) :: plocal
1243 logical :: dissApprox, viscApprox, updateIntermed, flowRes, turbRes, storeWall
1246 if (
present(useflowres))
then
1247 flowres = useflowres
1251 if (
present(useturbres))
then
1252 turbres = useturbres
1269 dissapprox = lumpeddiss
1270 viscapprox = lumpeddiss
1271 updateintermed = .false.
1274 call blocketterescore(dissapprox, viscapprox, updateintermed, flowres, turbres, storewall)
1276 call blockrescore(dissapprox, viscapprox, updateintermed, flowres, turbres, storewall, nn, sps)
1313 integer(kind=intType),
intent(in) :: nn, sps
1316 integer(kind=intType) :: ierr, mm, i, j, k, l, fSize, ii, jj, iRegion
1317 real(kind=realtype) :: dummyreal, dummyreald
subroutine getforces(forces, npts, sps)
subroutine getforces_b(forcesd, npts, sps)
subroutine getforces_d(forces, forcesd, npts, sps)
subroutine computeactuatorregionvolume_b(nn, iregion)
subroutine computeactuatorregionvolume_d(nn, iregion)
subroutine computeactuatorregionvolume(nn, iRegion)
type(actuatorregiontype), dimension(nactuatorregionsmax), target actuatorregions
type(actuatorregiontype), dimension(nactuatorregionsmax), target actuatorregionsd
integer(kind=inttype) nactuatorregions
integer(kind=inttype), parameter imach
integer(kind=inttype), parameter ipointrefy
integer(kind=inttype), parameter imachgrid
integer(kind=inttype), parameter ipointrefz
integer(kind=inttype), parameter ipointrefx
integer(kind=inttype), parameter ibeta
integer(kind=inttype), parameter ipressure
integer(kind=inttype), parameter itemperature
integer(kind=inttype), parameter ialpha
integer(kind=inttype), parameter idensity
subroutine setbcdata_d(bcDataNamesIn, bcDataIn, bcDataInd, famLists, sps, nVar, nFamMax)
subroutine setbcdatafinegrid_d(initializationPart)
subroutine setbcdata_b(bcDataNamesIn, bcDataIn, bcDataInd, famLists, sps, nVar, nFamMax)
subroutine setbcdatafinegrid_b(initializationPart)
subroutine setbcdatafinegrid(initializationPart)
subroutine setbcdata(bcDataNamesIn, bcDataIn, famLists, sps, nVar, nFamMax)
subroutine applyallbc_block(secondHalo)
subroutine blocketterescore(dissApprox, viscApprox, updateIntermed, flowRes, turbRes, storeWall)
subroutine blockrescore(dissApprox, viscApprox, updateIntermed, flowRes, turbRes, storeWall, nn, sps)
real(kind=realtype), dimension(:, :, :, :), pointer wd
integer(kind=inttype) nviscbocos
integer(kind=inttype), dimension(:, :, :), pointer iblank
integer(kind=inttype) nbocos
real(kind=realtype), dimension(:, :, :, :), pointer dw
real(kind=realtype), dimension(:, :, :, :), pointer xd
real(kind=realtype), dimension(:, :, :, :), pointer dwd
integer adflow_comm_world
integer(kind=inttype), parameter spalartallmaras
real(kind=realtype), parameter zero
integer(kind=inttype), parameter upwind
integer(kind=inttype), parameter timespectral
integer(kind=inttype), parameter dissmatrix
integer(kind=inttype), parameter updatefull
integer(kind=inttype), parameter updatefast
integer(kind=inttype), parameter dissscalar
integer(kind=inttype), parameter ransequations
integer(kind=inttype) isize1ofdrfviscsubface
integer(kind=inttype) isize1ofdrfbcdata
subroutine computelamviscosity_b(includehalos)
subroutine computepressuresimple_b(includehalos)
subroutine adjustinflowangle_b()
subroutine computespeedofsoundsquared_b()
subroutine allnodalgradients_b()
subroutine adjustinflowangle_d()
subroutine allnodalgradients_d()
subroutine computespeedofsoundsquared_d()
subroutine computelamviscosity_d(includehalos)
subroutine computepressuresimple_d(includehalos)
subroutine allnodalgradients_fast_b()
subroutine allnodalgradients
subroutine fixallnodalgradientsfromad
subroutine computespeedofsoundsquared
subroutine computepressuresimple(includeHalos)
subroutine computelamviscosity(includeHalos)
subroutine adjustinflowangle()
real(kind=realtype) pinfdimd
real(kind=realtype) tinfdimd
integer(kind=inttype) nwf
real(kind=realtype) rhoinfdimd
real(kind=realtype) timerefd
subroutine invisciddissfluxmatrix_b()
subroutine inviscidcentralflux_b()
subroutine inviscidupwindflux_b(finegrid)
subroutine viscousflux_b()
subroutine invisciddissfluxscalar_b()
subroutine viscousfluxapprox_d()
subroutine invisciddissfluxmatrixapprox_d()
subroutine viscousflux_d()
subroutine invisciddissfluxscalarapprox_d()
subroutine inviscidupwindflux_d(finegrid)
subroutine invisciddissfluxscalar_d()
subroutine invisciddissfluxmatrix_d()
subroutine inviscidcentralflux_d()
subroutine invisciddissfluxmatrix_fast_b()
subroutine viscousflux_fast_b()
subroutine inviscidcentralflux_fast_b()
subroutine inviscidupwindflux_fast_b(finegrid)
subroutine invisciddissfluxscalar_fast_b()
subroutine invisciddissfluxmatrixapprox
subroutine invisciddissfluxscalar
subroutine invisciddissfluxmatrix
subroutine inviscidcentralflux
subroutine viscousfluxapprox
subroutine inviscidupwindflux(fineGrid)
subroutine invisciddissfluxscalarapprox
subroutine whalo2(level, start, end, commPressure, commGamma, commViscous)
subroutine whalo2_d(level, start, end, commPressure, commGamma, commViscous)
subroutine exchangecoor_d(level)
subroutine whalo2_b(level, start, end, commPressure, commGamma, commViscous)
subroutine exchangecoor(level)
subroutine exchangecoor_b(level)
subroutine referencestate_b()
subroutine referencestate_d()
subroutine referencestate
integer(kind=inttype) currentlevel
subroutine block_res_state(nn, sps, useFlowRes, useTurbRes)
subroutine master_d(wdot, xdot, forcesDot, dwDot, famLists, funcValues, funcValuesd, bcDataNames, bcDataValues, bcDataValuesd, bcDataFamLists)
subroutine block_res_state_d(nn, sps)
subroutine master(useSpatial, famLists, funcValues, forces, bcDataNames, bcDataValues, bcDataFamLists)
subroutine master_b(wbar, xbar, extraBar, forcesBar, dwBar, nState, famLists, funcValues, funcValuesd, bcDataNames, bcDataValues, bcDataValuesd, bcDataFamLists)
subroutine master_state_b(wbar, dwBar, nState)
real(kind=realtype) timeunsteadyrestart
subroutine updateoversetconnectivity(level, sps)
subroutine updateoversetconnectivity_b(level, sps)
subroutine updateoversetconnectivity_d(level, sps)
subroutine initres_block_b(varstart, varend, nn, sps)
subroutine sourceterms_block_b(nn, res, iregion, plocal, plocald)
subroutine initres_block_d(varstart, varend, nn, sps)
subroutine sourceterms_block_d(nn, res, iregion, plocal, plocald)
subroutine initres_block_fast_b(varstart, varend, nn, sps)
subroutine sourceterms_block_fast_b(nn, res, iregion, plocal)
subroutine sourceterms_block(nn, res, iRegion, pLocal)
subroutine initres_block(varStart, varEnd, nn, sps)
real(kind=realtype), dimension(:, :, :), allocatable qq
subroutine saresscale_b()
subroutine saresscale_d()
real(kind=realtype), dimension(:, :, :), allocatable qq
real(kind=realtype), dimension(:, :, :), allocatable qq
subroutine saresscale_fast_b()
subroutine sasource_fast_b()
subroutine saviscous_fast_b()
real(kind=realtype), dimension(:, :, :), allocatable qq
integer(kind=inttype) nsections
type(sectiontype), dimension(:), allocatable sections
subroutine normalvelocities_block_b(sps)
subroutine slipvelocitiesfinelevel_block_b(useoldcoor, t, sps, nn)
subroutine gridvelocitiesfinelevel_block_b(useoldcoor, t, sps, nn)
subroutine timestep_block_b(onlyradii)
subroutine normalvelocities_block_d(sps)
subroutine slipvelocitiesfinelevel_block_d(useoldcoor, t, sps, nn)
subroutine timestep_block_d(onlyradii)
subroutine gridvelocitiesfinelevel_block_d(useoldcoor, t, sps, nn)
subroutine timestep_block_fast_b(onlyradii)
subroutine timestep_block(onlyRadii)
subroutine getsolution_b(famLists, funcValues, funcValuesd)
subroutine getsolution_d(famLists, funcValues, funcValuesd)
subroutine getsolution(famLists, funcValues, globalValues)
subroutine applyallturbbcthisblock_b(secondhalo)
subroutine bcturbtreatment_b()
subroutine bcturbtreatment_d()
subroutine applyallturbbcthisblock_d(secondhalo)
subroutine bcturbtreatment
subroutine applyallturbbcthisblock(secondHalo)
subroutine computeeddyviscosity_b(includehalos)
subroutine turbadvection_b(madv, nadv, offset, qq)
subroutine turbadvection_d(madv, nadv, offset, qq)
subroutine computeeddyviscosity_d(includehalos)
subroutine turbadvection_fast_b(madv, nadv, offset, qq)
subroutine computeeddyviscosity(includeHalos)
subroutine turbadvection(mAdv, nAdv, offset, qq)
logical function iswalltype(bType)
subroutine setpointers_d(nn, level, sps)
subroutine echk(errorcode, file, line)
subroutine setpointers_b(nn, level, sps)
subroutine setpointers(nn, mm, ll)
subroutine updatewalldistancesquickly_b(nn, level, sps)
subroutine updatewalldistancesquickly_d(nn, level, sps)
subroutine updatewalldistancesquickly(nn, level, sps)
real(kind=realtype), dimension(:), pointer xsurf
real(kind=realtype), dimension(:), pointer xsurfd