70 CHARACTER(CHRLEN) :: RCSIdentString = &
71 '$RCSfile: RFLU_ModAllocateMemory.F90,v $ $Revision: 1.16 $'
112 TYPE(t_region
),
POINTER :: pregion
118 INTEGER :: errorflag,ifc,ipatch
119 TYPE(t_grid),
POINTER :: pgrid
121 TYPE(t_patch),
POINTER :: ppatch
128 global => pregion%global
131 'RFLU_ModAllocateMemory.F90')
137 pgrid => pregion%grid
138 pmixtinput => pregion%mixtInput
155 ALLOCATE(pgrid%gs(pgrid%nFaces),stat=errorflag)
156 global%error = errorflag
157 IF ( global%error /= err_none )
THEN
158 CALL
errorstop(global,err_allocate,__line__,
'pGrid%gs')
161 DO ifc = 1,pgrid%nFaces
162 pgrid%gs(ifc) = 0.0_rfreal
165 ALLOCATE(pgrid%gs(pgrid%nFacesTot),stat=errorflag)
166 global%error = errorflag
167 IF ( global%error /= err_none )
THEN
168 CALL
errorstop(global,err_allocate,__line__,
'pGrid%gs')
171 DO ifc = 1,pgrid%nFacesTot
172 pgrid%gs(ifc) = 0.0_rfreal
180 IF ( pgrid%nPatches > 0 )
THEN
181 DO ipatch = 1,pgrid%nPatches
182 ppatch => pregion%patches(ipatch)
185 ALLOCATE(ppatch%gs(ppatch%nBFaces),stat=errorflag)
186 global%error = errorflag
187 IF ( global%error /= err_none )
THEN
188 CALL
errorstop(global,err_allocate,__line__,
'pPatch%gs')
191 DO ifc = 1,ppatch%nBFaces
192 ppatch%gs(ifc) = 0.0_rfreal
195 ALLOCATE(ppatch%gs(ppatch%nBFacesTot),stat=errorflag)
196 global%error = errorflag
197 IF ( global%error /= err_none )
THEN
198 CALL
errorstop(global,err_allocate,__line__,
'pPatch%gs')
201 DO ifc = 1,ppatch%nBFaces
202 ppatch%gs(ifc) = 0.0_rfreal
205 DO ifc = ppatch%nBFaces+1,ppatch%nBFacesTot
206 ppatch%gs(ifc) =
REAL(crazy_value_int,kind=rfreal)
222 ALLOCATE(pgrid%gs(0:1),stat=errorflag)
223 global%error = errorflag
224 IF ( global%error /= err_none )
THEN
225 CALL
errorstop(global,err_allocate,__line__,
'pGrid%gs')
229 pgrid%gs(ifc) = 0.0_rfreal
236 IF ( pgrid%nPatches > 0 )
THEN
237 DO ipatch = 1,pgrid%nPatches
238 ppatch => pregion%patches(ipatch)
240 ALLOCATE(ppatch%gs(0:1),stat=errorflag)
241 global%error = errorflag
242 IF ( global%error /= err_none )
THEN
243 CALL
errorstop(global,err_allocate,__line__,
'pPatch%gs')
247 ppatch%gs(ifc) = 0.0_rfreal
293 TYPE(t_region
),
POINTER :: pregion
305 global => pregion%global
308 'RFLU_ModAllocateMemory.F90')
359 TYPE(t_region
),
POINTER :: pregion
367 TYPE(t_grid),
POINTER :: pgrid
374 global => pregion%global
377 'RFLU_ModAllocateMemory.F90')
383 pgrid => pregion%grid
384 pmixtinput => pregion%mixtInput
390 ALLOCATE(pregion%mixt%cv(pmixtinput%nCv,pgrid%nCellsTot),stat=errorflag)
391 global%error = errorflag
392 IF (global%error /= err_none)
THEN
393 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%cv')
396 ALLOCATE(pregion%mixt%cvInfo(pmixtinput%nCv),stat=errorflag)
397 global%error = errorflag
398 IF (global%error /= err_none)
THEN
399 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%cvInfo')
441 TYPE(t_region
),
POINTER :: pregion
449 TYPE(t_grid),
POINTER :: pgrid
456 global => pregion%global
459 'RFLU_ModAllocateMemory.F90')
465 pgrid => pregion%grid
466 pmixtinput => pregion%mixtInput
472 ALLOCATE(pregion%mixt%dv(pmixtinput%nDv,pgrid%nCellsTot),stat=errorflag)
473 global%error = errorflag
474 IF (global%error /= err_none)
THEN
475 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%dv')
517 TYPE(t_region
),
POINTER :: pregion
525 TYPE(t_grid),
POINTER :: pgrid
532 global => pregion%global
535 'RFLU_ModAllocateMemory.F90')
541 pgrid => pregion%grid
542 pmixtinput => pregion%mixtInput
548 IF ( pmixtinput%gasModel == gas_model_tcperf )
THEN
549 ALLOCATE(pregion%mixt%gv(pmixtinput%nGv,0:1),stat=errorflag)
551 ALLOCATE(pregion%mixt%gv(pmixtinput%nGv,pgrid%nCellsTot),stat=errorflag)
553 global%error = errorflag
554 IF (global%error /= err_none)
THEN
555 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%gv')
597 TYPE(t_region
),
POINTER :: pregion
605 TYPE(t_grid),
POINTER :: pgrid
612 global => pregion%global
615 'RFLU_ModAllocateMemory.F90')
621 pgrid => pregion%grid
622 pmixtinput => pregion%mixtInput
628 IF ( pmixtinput%computeTv .EQV. .true. )
THEN
629 ALLOCATE(pregion%mixt%tv(pmixtinput%nTv,pgrid%nCellsTot),stat=errorflag)
630 global%error = errorflag
631 IF (global%error /= err_none)
THEN
632 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%tv')
635 nullify(pregion%mixt%tv)
679 TYPE(t_region
),
POINTER :: pregion
685 INTEGER :: arraylimlow,arraylimupp,errorflag,
ic,icmp,ifc,iv,ipatch,nbfaces, &
687 TYPE(t_grid),
POINTER :: pgrid,pgridold,pgridold2
688 TYPE(t_patch),
POINTER :: ppatch
696 global => pregion%global
699 'RFLU_ModAllocateMemory.F90')
705 pgrid => pregion%grid
706 pgridold => pregion%gridOld
707 pgridold2 => pregion%gridOld2
708 pmixtinput => pregion%mixtInput
721 DO ipatch = 1,pgrid%nPatches
722 ppatch => pregion%patches(ipatch)
724 nbfaces = nbfaces + ppatch%nBTris + ppatch%nBQuads
725 nbfacestot = nbfacestot + ppatch%nBTrisTot + ppatch%nBQuadsTot
732 ALLOCATE(pregion%mixt%cvOld(pmixtinput%nCv,pgrid%nCellsTot),stat=errorflag)
733 global%error = errorflag
734 IF (global%error /= err_none)
THEN
735 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%cvOld')
738 IF ( global%solverType == solv_implicit_nk )
THEN
739 ALLOCATE(pregion%mixt%cvOld1(pmixtinput%nCv,pgrid%nCellsTot),stat=errorflag)
740 global%error = errorflag
741 IF (global%error /= err_none)
THEN
742 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%cvOld1')
745 ALLOCATE(pregion%mixt%cvOld2(pmixtinput%nCv,pgrid%nCellsTot),stat=errorflag)
746 global%error = errorflag
747 IF (global%error /= err_none)
THEN
748 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%cvOld2')
756 ALLOCATE(pregion%dt(pgrid%nCellsTot),stat=errorflag)
757 global%error = errorflag
758 IF ( global%error /= err_none )
THEN
759 CALL
errorstop(global,err_allocate,__line__,
'pRegion%dt')
766 ALLOCATE(pregion%mixt%rhs(pmixtinput%nCv,pgrid%nCellsTot),stat=errorflag)
767 global%error = errorflag
768 IF ( global%error /= err_none )
THEN
769 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%rhs')
772 ALLOCATE(pregion%mixt%diss(pmixtinput%nCv,pgrid%nCellsTot),stat=errorflag)
773 global%error = errorflag
774 IF ( global%error /= err_none )
THEN
775 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%diss')
778 IF ( global%flowType == flow_unsteady )
THEN
779 ALLOCATE(pregion%mixt%rhsSum(pmixtinput%nCv,pgrid%nCellsTot),stat=errorflag)
780 global%error = errorflag
781 IF ( global%error /= err_none )
THEN
782 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%rhsSum')
785 nullify(pregion%mixt%rhsSum)
796 IF ( (pmixtinput%spaceDiscr == discr_upw_roe ) .OR. &
797 (pmixtinput%spaceDiscr == discr_upw_hllc ) .OR. &
798 (pmixtinput%spaceDiscr == discr_upw_ausmplus) )
THEN
799 IF ( pmixtinput%spaceOrder > 1 )
THEN
800 ALLOCATE(pregion%mixt%gradCell(xcoord:zcoord, &
801 grc_mixt_dens:grc_mixt_pres, &
802 pgrid%nCellsTot),stat=errorflag)
803 global%error = errorflag
804 IF ( global%error /= err_none )
THEN
805 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%gradCell')
808 nullify(pregion%mixt%gradCell)
810 ELSE IF ( pmixtinput%spaceDiscr == discr_opt_les )
THEN
811 ALLOCATE(pregion%mixt%gradCell(xcoord:zcoord, &
812 grc_mixt_xvel:grc_mixt_zvel, &
813 pgrid%nCellsTot),stat=errorflag)
814 global%error = errorflag
815 IF ( global%error /= err_none )
THEN
816 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%gradCell')
819 nullify(pregion%mixt%gradCell)
826 IF ( pmixtinput%flowModel == flow_navst )
THEN
827 ALLOCATE(pregion%mixt%gradFace(xcoord:zcoord, &
828 grf_mixt_xvel:grf_mixt_temp, &
829 pgrid%nFaces),stat=errorflag)
830 global%error = errorflag
831 IF ( global%error /= err_none )
THEN
832 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%gradFace')
835 nullify(pregion%mixt%gradFace)
838 IF ( pgrid%nPatches > 0 )
THEN
839 DO ipatch = 1,pregion%grid%nPatches
840 ppatch => pregion%patches(ipatch)
843 ALLOCATE(ppatch%mixt%gradFace(xcoord:zcoord, &
844 grbf_mixt_dens:grbf_mixt_pres, &
845 ppatch%nBFaces),stat=errorflag)
846 global%error = errorflag
847 IF ( global%error /= err_none )
THEN
848 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mixt%gradFace')
851 nullify(ppatch%mixt%gradFace)
862 IF ( pmixtinput%moveGrid .EQV. .true. )
THEN
868 ALLOCATE(pgrid%rhs(xcoord:zcoord,pgrid%nVertTot),stat=errorflag)
869 global%error = errorflag
870 IF ( global%error /= err_none )
THEN
871 CALL
errorstop(global,err_allocate,__line__,
'pGrid%rhs')
874 DO icmp = xcoord,zcoord
875 DO iv = 1,pgrid%nVertTot
876 pgrid%rhs(icmp,iv) = 0.0_rfreal
884 IF ( pmixtinput%moveGridType /= movegrid_type_xyz )
THEN
885 ALLOCATE(pgrid%disp(xcoord:zcoord,pgrid%nVertTot),stat=errorflag)
886 global%error = errorflag
887 IF ( global%error /= err_none )
THEN
888 CALL
errorstop(global,err_allocate,__line__,
'pGrid%disp')
891 DO icmp = xcoord,zcoord
892 DO iv = 1,pgrid%nVertTot
893 pgrid%disp(icmp,iv) = 0.0_rfreal
902 ALLOCATE(pgridold%xyz(xcoord:zcoord,pgrid%nVertTot),stat=errorflag)
903 global%error = errorflag
904 IF ( global%error /= err_none )
THEN
905 CALL
errorstop(global,err_allocate,__line__,
'pRegion%gridOld%xyz')
908 DO icmp = xcoord,zcoord
909 DO iv = 1,pgrid%nVertTot
910 pgridold%xyz(icmp,iv) = 0.0_rfreal
914 IF ( global%solverType == solv_implicit_nk )
THEN
915 ALLOCATE(pgridold2%xyz(xcoord:zcoord,pgrid%nVertTot),stat=errorflag)
916 global%error = errorflag
917 IF ( global%error /= err_none )
THEN
918 CALL
errorstop(global,err_allocate,__line__,
'pRegion%gridOld2%xyz')
921 DO icmp = xcoord,zcoord
922 DO iv = 1,pgrid%nVertTot
923 pgridold2%xyz(icmp,iv) = 0.0_rfreal
932 ALLOCATE(pgridold%vol(pgrid%nCellsTot),stat=errorflag)
933 global%error = errorflag
934 IF ( global%error /= err_none )
THEN
935 CALL
errorstop(global,err_allocate,__line__,
'pRegion%gridOld%vol')
938 DO ic = 1,pgrid%nCellsTot
939 pgridold%vol(
ic) = 0.0_rfreal
942 IF ( global%solverType == solv_implicit_nk )
THEN
943 ALLOCATE(pgridold2%vol(pgrid%nCellsTot),stat=errorflag)
944 global%error = errorflag
945 IF ( global%error /= err_none )
THEN
946 CALL
errorstop(global,err_allocate,__line__,
'pRegion%gridOld2%vol')
949 DO ic = 1,pgrid%nCellsTot
950 pgridold2%vol(
ic) = 0.0_rfreal
961 IF ( pgrid%nPatches > 0 )
THEN
962 DO ipatch = 1,pgrid%nPatches
963 ppatch => pregion%patches(ipatch)
965 ALLOCATE(ppatch%dXyz(xcoord:zcoord,ppatch%nBVert),stat=errorflag)
966 global%error = errorflag
967 IF ( global%error /= err_none )
THEN
968 CALL
errorstop(global,err_allocate,__line__,
'pPatch%dXyz')
971 DO icmp = xcoord,zcoord
972 DO iv = 1,ppatch%nBVert
973 ppatch%dXyz(icmp,iv) = 0.0_rfreal
986 IF ( (global%flowType == flow_unsteady) .AND. &
987 (global%doStat == active) )
THEN
988 ALLOCATE(pregion%mixt%tav(global%mixtNStat,pgrid%nCellsTot),stat=errorflag)
989 global%error = errorflag
990 IF ( global%error /= err_none )
THEN
991 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%tav')
994 nullify(pregion%mixt%tav)
1002 IF ( pmixtinput%spaceDiscr == discr_opt_les )
THEN
1012 SELECT CASE ( pmixtinput%indSd )
1018 arraylimupp = pgrid%nCellsTot
1020 CALL
errorstop(global,err_reached_default,__line__)
1023 ALLOCATE(pregion%mixt%sd(sd_xmom:sd_zmom,arraylimlow:arraylimupp), &
1025 global%error = errorflag
1026 IF ( global%error /= err_none )
THEN
1027 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%sd')
1072 TYPE(t_region
),
POINTER :: pregion
1078 INTEGER :: arraylimlow,arraylimupp,errorflag,ipatch
1079 TYPE(t_grid),
POINTER :: pgrid
1080 TYPE(t_patch),
POINTER :: ppatch
1088 global => pregion%global
1091 'RFLU_ModAllocateMemory.F90')
1097 pgrid => pregion%grid
1098 pmixtinput => pregion%mixtInput
1110 IF ( pmixtinput%indMfMixt == 1 )
THEN
1112 arraylimupp = pgrid%nFaces
1118 ALLOCATE(pregion%mixt%mfMixt(arraylimlow:arraylimupp),stat=errorflag)
1119 global%error = errorflag
1120 IF ( global%error /= err_none )
THEN
1121 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%mfMixt')
1124 IF ( pregion%grid%nPatches > 0 )
THEN
1125 DO ipatch = 1,pregion%grid%nPatches
1126 ppatch => pregion%patches(ipatch)
1128 IF ( pmixtinput%indMfMixt == 1 )
THEN
1130 arraylimupp = ppatch%nBFaces
1136 ALLOCATE(ppatch%mfMixt(arraylimlow:arraylimupp),stat=errorflag)
1137 global%error = errorflag
1138 IF ( global%error /= err_none )
THEN
1139 CALL
errorstop(global,err_allocate,__line__,
'pPatch%mfMixt')
1183 TYPE(t_region
),
POINTER :: pregion
1189 INTEGER :: errorflag,ipatch
1190 TYPE(t_grid),
POINTER :: pgrid
1191 TYPE(t_patch),
POINTER :: ppatch
1198 global => pregion%global
1201 'RFLU_ModAllocateMemory.F90')
1207 pgrid => pregion%grid
1217 ALLOCATE(pregion%mixt%vfMixt(pgrid%nFaces),stat=errorflag)
1218 global%error = errorflag
1219 IF ( global%error /= err_none )
THEN
1220 CALL
errorstop(global,err_allocate,__line__,
'pRegion%mixt%vfMixt')
1223 IF ( pregion%grid%nPatches > 0 )
THEN
1224 DO ipatch = 1,pregion%grid%nPatches
1225 ppatch => pregion%patches(ipatch)
1227 ALLOCATE(ppatch%vfMixt(ppatch%nBFaces),stat=errorflag)
1228 global%error = errorflag
1229 IF ( global%error /= err_none )
THEN
1230 CALL
errorstop(global,err_allocate,__line__,
'pPatch%vfMixt')
LOGICAL function rflu_decideneedbgradface(pRegion, pPatch)
subroutine registerfunction(global, funName, fileName)
subroutine, public rflu_allocatememorysolcv(pRegion)
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE ic
LOGICAL function, public rflu_decideneedgridspeeds(pRegion)
subroutine, public rflu_allocatememorysoldv(pRegion)
subroutine, public rflu_allocatememorysoltv(pRegion)
subroutine, public rflu_createintegralsoles(pRegion)
subroutine, public rflu_allocatememorysol(pRegion)
subroutine, public rflu_allocatememorytstep_i(pRegion)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine, public rflu_allocatememorygspeeds(pRegion)
subroutine deregisterfunction(global)
subroutine, public rflu_allocatememorytstep_c(pRegion)
subroutine, public rflu_createstencilsweightsoles(pRegion)
subroutine, public rflu_allocatememorysolgv(pRegion)
subroutine, public rflu_allocatememorytstep(pRegion)