60 CHARACTER(CHRLEN) :: RCSIdentString = &
61 '$RCSfile: RFLU_ModWENO.F90,v $ $Revision: 1.4 $'
108 INTEGER :: ibeggrad,iendgrad
109 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: grad
110 TYPE(t_region
),
POINTER :: pregion
116 INTEGER :: errorflag,icg,icg2,igrad,isl
117 REAL(RFREAL) :: smooindsum,
term
118 REAL(RFREAL) :: gradlocal(xcoord:ycoord)
119 REAL(RFREAL),
DIMENSION(:),
ALLOCATABLE :: smooind
120 REAL(RFREAL),
DIMENSION(:,:,:),
ALLOCATABLE :: gradeno
122 TYPE(t_grid),
POINTER :: pgrid
128 global => pregion%global
134 CALL fprofiler_begins(
"RFLU::WENOGradCells_2D")
141 pgrid => pregion%grid
151 ALLOCATE(gradeno(xcoord:ycoord,ibeggrad:iendgrad,pgrid%nCellsTot), &
153 global%error = errorflag
154 IF ( global%error /= err_none )
THEN
155 CALL
errorstop(global,err_allocate,__line__,
'gradENO')
158 ALLOCATE(smooind(0:pgrid%c2csInfo%nCellMembsMax),stat=errorflag)
159 global%error = errorflag
160 IF ( global%error /= err_none )
THEN
161 CALL
errorstop(global,err_allocate,__line__,
'smooInd')
168 DO icg = 1,pgrid%nCellsTot
174 DO igrad = ibeggrad,iendgrad
178 term = abs(grad(xcoord,igrad,icg)) + abs(grad(ycoord,igrad,icg))
180 smooind(0) = 1.0_rfreal/(
term*
term + 1.0e-15_rfreal)
181 smooindsum = smooind(0)
183 DO isl = 1,pgrid%c2cs(icg)%nCellMembs
184 icg2 = pgrid%c2cs(icg)%cellMembs(isl)
186 term = abs(grad(xcoord,igrad,icg2)) + abs(grad(ycoord,igrad,icg2))
188 smooind(isl) = 1.0_rfreal/(
term*
term + 1.0e-15_rfreal)
189 smooindsum = smooindsum + smooind(isl)
194 term = smooind(0)/smooindsum
196 gradlocal(xcoord) =
term*grad(xcoord,igrad,icg)
197 gradlocal(ycoord) =
term*grad(ycoord,igrad,icg)
199 DO isl = 1,pgrid%c2cs(icg)%nCellMembs
200 icg2 = pgrid%c2cs(icg)%cellMembs(isl)
201 term = smooind(isl)/smooindsum
203 gradlocal(xcoord) = gradlocal(xcoord) +
term*grad(xcoord,igrad,icg2)
204 gradlocal(ycoord) = gradlocal(ycoord) +
term*grad(ycoord,igrad,icg2)
207 gradeno(xcoord,igrad,icg) = gradlocal(xcoord)
208 gradeno(ycoord,igrad,icg) = gradlocal(ycoord)
216 DO icg = 1,pgrid%nCellsTot
217 DO igrad = ibeggrad,iendgrad
218 grad(xcoord,igrad,icg) = gradeno(xcoord,igrad,icg)
219 grad(ycoord,igrad,icg) = gradeno(ycoord,igrad,icg)
227 DEALLOCATE(smooind,stat=errorflag)
228 global%error = errorflag
229 IF ( global%error /= err_none )
THEN
230 CALL
errorstop(global,err_deallocate,__line__,
'smooInd')
233 DEALLOCATE(gradeno,stat=errorflag)
234 global%error = errorflag
235 IF ( global%error /= err_none )
THEN
236 CALL
errorstop(global,err_deallocate,__line__,
'gradENO')
244 CALL fprofiler_ends(
"RFLU::WENOGradCells_2D")
287 INTEGER :: ibeggrad,iendgrad
288 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: grad
289 TYPE(t_region
),
POINTER :: pregion
295 INTEGER :: errorflag,icg,icg2,igrad,isl
296 REAL(RFREAL) :: smooindsum,
term
297 REAL(RFREAL) :: gradlocal(xcoord:zcoord)
298 REAL(RFREAL),
DIMENSION(:),
ALLOCATABLE :: smooind
299 REAL(RFREAL),
DIMENSION(:,:,:),
ALLOCATABLE :: gradeno
301 TYPE(t_grid),
POINTER :: pgrid
307 global => pregion%global
313 CALL fprofiler_begins(
"RFLU::WENOGradCells_3D")
320 pgrid => pregion%grid
330 ALLOCATE(gradeno(xcoord:zcoord,ibeggrad:iendgrad,pgrid%nCellsTot), &
332 global%error = errorflag
333 IF ( global%error /= err_none )
THEN
334 CALL
errorstop(global,err_allocate,__line__,
'gradENO')
337 ALLOCATE(smooind(0:pgrid%c2csInfo%nCellMembsMax),stat=errorflag)
338 global%error = errorflag
339 IF ( global%error /= err_none )
THEN
340 CALL
errorstop(global,err_allocate,__line__,
'smooInd')
347 DO icg = 1,pgrid%nCellsTot
353 DO igrad = ibeggrad,iendgrad
357 term = abs(grad(xcoord,igrad,icg)) &
358 + abs(grad(ycoord,igrad,icg)) &
359 + abs(grad(zcoord,igrad,icg))
361 smooind(0) = 1.0_rfreal/(
term*
term + 1.0e-15_rfreal)
362 smooindsum = smooind(0)
364 DO isl = 1,pgrid%c2cs(icg)%nCellMembs
365 icg2 = pgrid%c2cs(icg)%cellMembs(isl)
367 term = abs(grad(xcoord,igrad,icg2)) &
368 + abs(grad(ycoord,igrad,icg2)) &
369 + abs(grad(zcoord,igrad,icg2))
371 smooind(isl) = 1.0_rfreal/(
term*
term + 1.0e-15_rfreal)
372 smooindsum = smooindsum + smooind(isl)
377 term = smooind(0)/smooindsum
379 gradlocal(xcoord) =
term*grad(xcoord,igrad,icg)
380 gradlocal(ycoord) =
term*grad(ycoord,igrad,icg)
381 gradlocal(zcoord) =
term*grad(zcoord,igrad,icg)
383 DO isl = 1,pgrid%c2cs(icg)%nCellMembs
384 icg2 = pgrid%c2cs(icg)%cellMembs(isl)
385 term = smooind(isl)/smooindsum
387 gradlocal(xcoord) = gradlocal(xcoord) +
term*grad(xcoord,igrad,icg2)
388 gradlocal(ycoord) = gradlocal(ycoord) +
term*grad(ycoord,igrad,icg2)
389 gradlocal(zcoord) = gradlocal(zcoord) +
term*grad(zcoord,igrad,icg2)
392 gradeno(xcoord,igrad,icg) = gradlocal(xcoord)
393 gradeno(ycoord,igrad,icg) = gradlocal(ycoord)
394 gradeno(zcoord,igrad,icg) = gradlocal(zcoord)
402 DO icg = 1,pgrid%nCellsTot
403 DO igrad = ibeggrad,iendgrad
404 grad(xcoord,igrad,icg) = gradeno(xcoord,igrad,icg)
405 grad(ycoord,igrad,icg) = gradeno(ycoord,igrad,icg)
406 grad(zcoord,igrad,icg) = gradeno(zcoord,igrad,icg)
414 DEALLOCATE(smooind,stat=errorflag)
415 global%error = errorflag
416 IF ( global%error /= err_none )
THEN
417 CALL
errorstop(global,err_deallocate,__line__,
'smooInd')
420 DEALLOCATE(gradeno,stat=errorflag)
421 global%error = errorflag
422 IF ( global%error /= err_none )
THEN
423 CALL
errorstop(global,err_deallocate,__line__,
'gradENO')
431 CALL fprofiler_ends(
"RFLU::WENOGradCells_3D")
476 INTEGER,
INTENT(IN) :: ibeggrad,iendgrad
477 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: grad
478 TYPE(t_region
),
POINTER :: pregion
490 global => pregion%global
499 SELECT CASE ( pregion%mixtInput%stencilDimensCells )
507 CALL
errorstop(global,err_reached_default,__line__)
554 INTEGER :: ibeggrad,iendgrad
555 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: grad
556 TYPE(t_region
),
POINTER :: pregion
562 INTEGER :: errorflag,icg,icg2,
idir,idirend,igrad,isl
563 REAL(RFREAL) :: smooindsum,
term
564 REAL(RFREAL),
DIMENSION(XCOORD:ZCOORD) :: gradlocal
565 REAL(RFREAL),
DIMENSION(:),
ALLOCATABLE :: smooind
566 REAL(RFREAL),
DIMENSION(:,:,:),
ALLOCATABLE :: gradeno
568 TYPE(t_grid),
POINTER :: pgrid
574 global => pregion%global
580 CALL fprofiler_begins(
"RFLU::WENOGradCellsXYZ_1D")
587 pgrid => pregion%grid
589 SELECT CASE ( pregion%mixtInput%dimens )
597 CALL
errorstop(global,err_reached_default,__line__)
608 ALLOCATE(gradeno(xcoord:idirend,ibeggrad:iendgrad,pgrid%nCellsTot), &
610 global%error = errorflag
611 IF ( global%error /= err_none )
THEN
612 CALL
errorstop(global,err_allocate,__line__,
'gradENO')
615 ALLOCATE(smooind(0:pgrid%c2csInfo%nCellMembsMax),stat=errorflag)
616 global%error = errorflag
617 IF ( global%error /= err_none )
THEN
618 CALL
errorstop(global,err_allocate,__line__,
'smooInd')
625 DO icg = 1,pgrid%nCellsTot
631 DO igrad = ibeggrad,iendgrad
635 DO idir = xcoord,idirend
641 smooind(0) = 1.0_rfreal/(
term*
term + 1.0e-15_rfreal)
642 smooindsum = smooind(0)
644 DO isl = 1,pgrid%c2cs1D(
idir,icg)%nCellMembs
645 icg2 = pgrid%c2cs1D(
idir,icg)%cellMembs(isl)
649 smooind(isl) = 1.0_rfreal/(
term*
term + 1.0e-15_rfreal)
650 smooindsum = smooindsum + smooind(isl)
655 term = smooind(0)/smooindsum
659 DO isl = 1,pgrid%c2cs1D(
idir,icg)%nCellMembs
660 icg2 = pgrid%c2cs1D(
idir,icg)%cellMembs(isl)
662 term = smooind(isl)/smooindsum
667 gradeno(
idir,igrad,icg) = gradlocal(
idir)
676 SELECT CASE ( pregion%mixtInput%dimens )
678 DO icg = 1,pgrid%nCellsTot
679 DO igrad = ibeggrad,iendgrad
680 grad(xcoord,igrad,icg) = gradeno(xcoord,igrad,icg)
681 grad(ycoord,igrad,icg) = 0.0_rfreal
682 grad(zcoord,igrad,icg) = 0.0_rfreal
686 DO icg = 1,pgrid%nCellsTot
687 DO igrad = ibeggrad,iendgrad
688 grad(xcoord,igrad,icg) = gradeno(xcoord,igrad,icg)
689 grad(ycoord,igrad,icg) = gradeno(ycoord,igrad,icg)
690 grad(zcoord,igrad,icg) = 0.0_rfreal
694 DO icg = 1,pgrid%nCellsTot
695 DO igrad = ibeggrad,iendgrad
696 grad(xcoord,igrad,icg) = gradeno(xcoord,igrad,icg)
697 grad(ycoord,igrad,icg) = gradeno(ycoord,igrad,icg)
698 grad(zcoord,igrad,icg) = gradeno(zcoord,igrad,icg)
702 CALL
errorstop(global,err_reached_default,__line__)
709 DEALLOCATE(smooind,stat=errorflag)
710 global%error = errorflag
711 IF ( global%error /= err_none )
THEN
712 CALL
errorstop(global,err_deallocate,__line__,
'smooInd')
715 DEALLOCATE(gradeno,stat=errorflag)
716 global%error = errorflag
717 IF ( global%error /= err_none )
THEN
718 CALL
errorstop(global,err_deallocate,__line__,
'gradENO')
726 CALL fprofiler_ends(
"RFLU::WENOGradCellsXYZ_1D")
769 INTEGER :: ibeggrad,iendgrad
770 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: grad
771 TYPE(t_region
),
POINTER :: pregion
777 INTEGER :: errorflag,icg,icg2,igrad,isl
778 REAL(RFREAL) :: termx,termy
779 REAL(RFREAL),
DIMENSION(XCOORD:YCOORD) :: gradlocal,smooindsum
780 REAL(RFREAL),
DIMENSION(:,:),
ALLOCATABLE :: smooind
781 REAL(RFREAL),
DIMENSION(:,:,:),
ALLOCATABLE :: gradeno
783 TYPE(t_grid),
POINTER :: pgrid
789 global => pregion%global
795 CALL fprofiler_begins(
"RFLU::WENOGradCellsXYZ_2D")
802 pgrid => pregion%grid
812 ALLOCATE(gradeno(xcoord:ycoord,ibeggrad:iendgrad,pgrid%nCellsTot), &
814 global%error = errorflag
815 IF ( global%error /= err_none )
THEN
816 CALL
errorstop(global,err_allocate,__line__,
'gradENO')
819 ALLOCATE(smooind(xcoord:ycoord,0:pgrid%c2csInfo%nCellMembsMax), &
821 global%error = errorflag
822 IF ( global%error /= err_none )
THEN
823 CALL
errorstop(global,err_allocate,__line__,
'smooInd')
830 DO icg = 1,pgrid%nCellsTot
836 DO igrad = ibeggrad,iendgrad
840 termx = grad(xcoord,igrad,icg)
841 termy = grad(ycoord,igrad,icg)
843 smooind(xcoord,0) = 1.0_rfreal/(termx*termx + 1.0e-15_rfreal)
844 smooind(ycoord,0) = 1.0_rfreal/(termy*termy + 1.0e-15_rfreal)
846 smooindsum(xcoord) = smooind(xcoord,0)
847 smooindsum(ycoord) = smooind(ycoord,0)
849 DO isl = 1,pgrid%c2cs(icg)%nCellMembs
850 icg2 = pgrid%c2cs(icg)%cellMembs(isl)
852 termx = grad(xcoord,igrad,icg2)
853 termy = grad(ycoord,igrad,icg2)
855 smooind(xcoord,isl) = 1.0_rfreal/(termx*termx + 1.0e-15_rfreal)
856 smooind(ycoord,isl) = 1.0_rfreal/(termy*termy + 1.0e-15_rfreal)
858 smooindsum(xcoord) = smooindsum(xcoord) + smooind(xcoord,isl)
859 smooindsum(ycoord) = smooindsum(ycoord) + smooind(ycoord,isl)
864 termx = smooind(xcoord,0)/smooindsum(xcoord)
865 termy = smooind(ycoord,0)/smooindsum(ycoord)
867 gradlocal(xcoord) = termx*grad(xcoord,igrad,icg)
868 gradlocal(ycoord) = termy*grad(ycoord,igrad,icg)
870 DO isl = 1,pgrid%c2cs(icg)%nCellMembs
871 icg2 = pgrid%c2cs(icg)%cellMembs(isl)
873 termx = smooind(xcoord,isl)/smooindsum(xcoord)
874 termy = smooind(ycoord,isl)/smooindsum(ycoord)
876 gradlocal(xcoord) = gradlocal(xcoord) + termx*grad(xcoord,igrad,icg2)
877 gradlocal(ycoord) = gradlocal(ycoord) + termy*grad(ycoord,igrad,icg2)
880 gradeno(xcoord,igrad,icg) = gradlocal(xcoord)
881 gradeno(ycoord,igrad,icg) = gradlocal(ycoord)
889 DO icg = 1,pgrid%nCellsTot
890 DO igrad = ibeggrad,iendgrad
891 grad(xcoord,igrad,icg) = gradeno(xcoord,igrad,icg)
892 grad(ycoord,igrad,icg) = gradeno(ycoord,igrad,icg)
911 DEALLOCATE(smooind,stat=errorflag)
912 global%error = errorflag
913 IF ( global%error /= err_none )
THEN
914 CALL
errorstop(global,err_deallocate,__line__,
'smooInd')
917 DEALLOCATE(gradeno,stat=errorflag)
918 global%error = errorflag
919 IF ( global%error /= err_none )
THEN
920 CALL
errorstop(global,err_deallocate,__line__,
'gradENO')
928 CALL fprofiler_ends(
"RFLU::WENOGradCellsXYZ_2D")
973 INTEGER :: ibeggrad,iendgrad
974 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: grad
975 TYPE(t_region
),
POINTER :: pregion
981 INTEGER :: errorflag,icg,icg2,igrad,isl
982 REAL(RFREAL) :: termx,termy,termz
983 REAL(RFREAL),
DIMENSION(XCOORD:ZCOORD) :: gradlocal,smooindsum
984 REAL(RFREAL),
DIMENSION(:,:),
ALLOCATABLE :: smooind
985 REAL(RFREAL),
DIMENSION(:,:,:),
ALLOCATABLE :: gradeno
987 TYPE(t_grid),
POINTER :: pgrid
993 global => pregion%global
999 CALL fprofiler_begins(
"RFLU::WENOGradCellsXYZ_3D")
1006 pgrid => pregion%grid
1016 ALLOCATE(gradeno(xcoord:zcoord,ibeggrad:iendgrad,pgrid%nCellsTot), &
1018 global%error = errorflag
1019 IF ( global%error /= err_none )
THEN
1020 CALL
errorstop(global,err_allocate,__line__,
'gradENO')
1023 ALLOCATE(smooind(xcoord:zcoord,0:pgrid%c2csInfo%nCellMembsMax), &
1025 global%error = errorflag
1026 IF ( global%error /= err_none )
THEN
1027 CALL
errorstop(global,err_allocate,__line__,
'smooInd')
1034 DO icg = 1,pgrid%nCellsTot
1040 DO igrad = ibeggrad,iendgrad
1044 termx = grad(xcoord,igrad,icg)
1045 termy = grad(ycoord,igrad,icg)
1046 termz = grad(zcoord,igrad,icg)
1048 smooind(xcoord,0) = 1.0_rfreal/(termx*termx + 1.0e-15_rfreal)
1049 smooind(ycoord,0) = 1.0_rfreal/(termy*termy + 1.0e-15_rfreal)
1050 smooind(zcoord,0) = 1.0_rfreal/(termz*termz + 1.0e-15_rfreal)
1052 smooindsum(xcoord) = smooind(xcoord,0)
1053 smooindsum(ycoord) = smooind(ycoord,0)
1054 smooindsum(zcoord) = smooind(zcoord,0)
1056 DO isl = 1,pgrid%c2cs(icg)%nCellMembs
1057 icg2 = pgrid%c2cs(icg)%cellMembs(isl)
1059 termx = grad(xcoord,igrad,icg2)
1060 termy = grad(ycoord,igrad,icg2)
1061 termz = grad(zcoord,igrad,icg2)
1063 smooind(xcoord,isl) = 1.0_rfreal/(termx*termx + 1.0e-15_rfreal)
1064 smooind(ycoord,isl) = 1.0_rfreal/(termy*termy + 1.0e-15_rfreal)
1065 smooind(zcoord,isl) = 1.0_rfreal/(termz*termz + 1.0e-15_rfreal)
1067 smooindsum(xcoord) = smooindsum(xcoord) + smooind(xcoord,isl)
1068 smooindsum(ycoord) = smooindsum(ycoord) + smooind(ycoord,isl)
1069 smooindsum(zcoord) = smooindsum(zcoord) + smooind(zcoord,isl)
1074 termx = smooind(xcoord,0)/smooindsum(xcoord)
1075 termy = smooind(ycoord,0)/smooindsum(ycoord)
1076 termz = smooind(zcoord,0)/smooindsum(zcoord)
1078 gradlocal(xcoord) = termx*grad(xcoord,igrad,icg)
1079 gradlocal(ycoord) = termy*grad(ycoord,igrad,icg)
1080 gradlocal(zcoord) = termz*grad(zcoord,igrad,icg)
1082 DO isl = 1,pgrid%c2cs(icg)%nCellMembs
1083 icg2 = pgrid%c2cs(icg)%cellMembs(isl)
1085 termx = smooind(xcoord,isl)/smooindsum(xcoord)
1086 termy = smooind(ycoord,isl)/smooindsum(ycoord)
1087 termz = smooind(zcoord,isl)/smooindsum(zcoord)
1089 gradlocal(xcoord) = gradlocal(xcoord) + termx*grad(xcoord,igrad,icg2)
1090 gradlocal(ycoord) = gradlocal(ycoord) + termy*grad(ycoord,igrad,icg2)
1091 gradlocal(zcoord) = gradlocal(zcoord) + termz*grad(zcoord,igrad,icg2)
1094 gradeno(xcoord,igrad,icg) = gradlocal(xcoord)
1095 gradeno(ycoord,igrad,icg) = gradlocal(ycoord)
1096 gradeno(zcoord,igrad,icg) = gradlocal(zcoord)
1104 DO icg = 1,pgrid%nCellsTot
1105 DO igrad = ibeggrad,iendgrad
1106 grad(xcoord,igrad,icg) = gradeno(xcoord,igrad,icg)
1107 grad(ycoord,igrad,icg) = gradeno(ycoord,igrad,icg)
1108 grad(zcoord,igrad,icg) = gradeno(zcoord,igrad,icg)
1129 DEALLOCATE(smooind,stat=errorflag)
1130 global%error = errorflag
1131 IF ( global%error /= err_none )
THEN
1132 CALL
errorstop(global,err_deallocate,__line__,
'smooInd')
1135 DEALLOCATE(gradeno,stat=errorflag)
1136 global%error = errorflag
1137 IF ( global%error /= err_none )
THEN
1138 CALL
errorstop(global,err_deallocate,__line__,
'gradENO')
1146 CALL fprofiler_ends(
"RFLU::WENOGradCellsXYZ_3D")
1192 INTEGER :: ibeggrad,iendgrad
1193 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: grad
1194 TYPE(t_region
),
POINTER :: pregion
1200 INTEGER :: errorflag,icg,icg2,igrad,isl,ncellmembs
1201 INTEGER,
DIMENSION(:),
ALLOCATABLE :: icg_ary
1202 REAL(RFREAL) :: gradlocalx,gradlocaly,nextx,nextx2,nexty,nexty2, &
1203 smooindsumx,smooindx,smooindsumy,smooindy,termx,termy
1204 REAL(RFREAL),
DIMENSION(XCOORD:YCOORD) :: gradlocal,smooindsum
1205 REAL(RFREAL),
DIMENSION(:,:),
ALLOCATABLE :: smooind
1206 REAL(RFREAL),
DIMENSION(:,:,:),
ALLOCATABLE :: gradeno
1208 TYPE(t_grid),
POINTER :: pgrid
1214 global => pregion%global
1217 'RFLU_ModWENO.F90' )
1220 CALL fprofiler_begins(
"RFLU::WENOGradCellsXYZFast_2D")
1227 pgrid => pregion%grid
1237 ALLOCATE(gradeno(xcoord:ycoord,ibeggrad:iendgrad,pgrid%nCellsTot), &
1239 global%error = errorflag
1240 IF ( global%error /= err_none )
THEN
1241 CALL
errorstop(global,err_allocate,__line__,
'gradENO')
1244 ALLOCATE(icg_ary(0:pgrid%c2csInfo%nCellMembsMax+2),stat=errorflag )
1245 global%error = errorflag
1246 IF ( global%error /= err_none )
THEN
1247 CALL
errorstop(global,err_allocate,__line__,
'icg_ary')
1254 DO icg = 1,pgrid%nCellsTot
1255 ncellmembs = pgrid%c2cs(icg)%nCellMembs
1257 DO isl = 1,ncellmembs
1258 icg_ary(isl) = pgrid%c2cs(icg)%cellMembs(isl)
1261 icg_ary(ncellmembs+1) = icg
1262 icg_ary(ncellmembs+2) = icg
1264 DO igrad = ibeggrad,iendgrad
1265 termx = grad(xcoord,igrad,icg)
1266 termy = grad(ycoord,igrad,icg)
1268 nextx = grad(xcoord,igrad,icg_ary(1))
1269 nexty = grad(ycoord,igrad,icg_ary(1))
1271 nextx2 = grad(xcoord,igrad,icg_ary(2))
1272 nexty2 = grad(ycoord,igrad,icg_ary(2))
1274 smooindsumx = 1.0_rfreal/(termx*termx + 1.0e-15_rfreal)
1275 smooindsumy = 1.0_rfreal/(termy*termy + 1.0e-15_rfreal)
1277 gradlocalx = smooindsumx*termx
1278 gradlocaly = smooindsumy*termy
1280 DO isl = 1,ncellmembs
1281 icg2 = icg_ary(isl+2)
1289 nextx2 = grad(xcoord,igrad,icg2)
1290 nexty2 = grad(ycoord,igrad,icg2)
1292 smooindx = 1.0_rfreal/(termx*termx + 1.0e-15_rfreal)
1293 smooindy = 1.0_rfreal/(termy*termy + 1.0e-15_rfreal)
1295 smooindsumx = smooindsumx + smooindx
1296 smooindsumy = smooindsumy + smooindy
1298 gradlocalx = gradlocalx + smooindx*termx
1299 gradlocaly = gradlocaly + smooindy*termy
1302 gradeno(xcoord,igrad,icg) = gradlocalx/smooindsumx
1303 gradeno(ycoord,igrad,icg) = gradlocaly/smooindsumy
1307 DO icg = 1,pgrid%nCellsTot
1308 DO igrad = ibeggrad,iendgrad
1309 grad(xcoord,igrad,icg) = gradeno(xcoord,igrad,icg)
1310 grad(ycoord,igrad,icg) = gradeno(ycoord,igrad,icg)
1329 DEALLOCATE(icg_ary,stat=errorflag)
1330 global%error = errorflag
1331 IF ( global%error /= err_none )
THEN
1332 CALL
errorstop(global,err_deallocate,__line__,
'smooInd')
1335 DEALLOCATE(gradeno,stat=errorflag)
1336 global%error = errorflag
1337 IF ( global%error /= err_none )
THEN
1338 CALL
errorstop(global,err_deallocate,__line__,
'gradENO')
1346 CALL fprofiler_ends(
"RFLU::WENOGradCellsXYZFast_2D")
1391 INTEGER :: ibeggrad,iendgrad
1392 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: grad
1393 TYPE(t_region
),
POINTER :: pregion
1399 INTEGER :: errorflag,icg,icg2,igrad,isl,ncellmembs
1400 INTEGER,
DIMENSION(:),
ALLOCATABLE :: icg_ary
1401 REAL(RFREAL) :: gradlocalx,gradlocaly,gradlocalz,nextx,nextx2,nexty, &
1402 nexty2,nextz,nextz2,smooindsumx,smooindx,smooindsumy, &
1403 smooindy,smooindsumz,smooindz,termx,termy,termz
1404 REAL(RFREAL),
DIMENSION(XCOORD:ZCOORD) :: gradlocal,smooindsum
1405 REAL(RFREAL),
DIMENSION(:,:),
ALLOCATABLE :: smooind
1406 REAL(RFREAL),
DIMENSION(:,:,:),
ALLOCATABLE :: gradeno
1408 TYPE(t_grid),
POINTER :: pgrid
1414 global => pregion%global
1417 'RFLU_ModWENO.F90' )
1420 CALL fprofiler_begins(
"RFLU::WENOGradCellsXYZFast_3D")
1427 pgrid => pregion%grid
1437 ALLOCATE(gradeno(xcoord:zcoord,ibeggrad:iendgrad,pgrid%nCellsTot), &
1439 global%error = errorflag
1440 IF ( global%error /= err_none )
THEN
1441 CALL
errorstop(global,err_allocate,__line__,
'gradENO')
1444 ALLOCATE(icg_ary(0:pgrid%c2csInfo%nCellMembsMax+2),stat=errorflag )
1445 global%error = errorflag
1446 IF ( global%error /= err_none )
THEN
1447 CALL
errorstop(global,err_allocate,__line__,
'icg_ary')
1454 DO icg = 1,pgrid%nCellsTot
1455 ncellmembs = pgrid%c2cs(icg)%nCellMembs
1457 DO isl = 1,ncellmembs
1458 icg_ary(isl) = pgrid%c2cs(icg)%cellMembs(isl)
1461 icg_ary(ncellmembs+1) = icg
1462 icg_ary(ncellmembs+2) = icg
1464 DO igrad = ibeggrad,iendgrad
1465 termx = grad(xcoord,igrad,icg)
1466 termy = grad(ycoord,igrad,icg)
1467 termz = grad(zcoord,igrad,icg)
1469 nextx = grad(xcoord,igrad,icg_ary(1))
1470 nexty = grad(ycoord,igrad,icg_ary(1))
1471 nextz = grad(zcoord,igrad,icg_ary(1))
1473 nextx2 = grad(xcoord,igrad,icg_ary(2))
1474 nexty2 = grad(ycoord,igrad,icg_ary(2))
1475 nextz2 = grad(zcoord,igrad,icg_ary(2))
1477 smooindsumx = 1.0_rfreal/(termx*termx + 1.0e-15_rfreal)
1478 smooindsumy = 1.0_rfreal/(termy*termy + 1.0e-15_rfreal)
1479 smooindsumz = 1.0_rfreal/(termz*termz + 1.0e-15_rfreal)
1481 gradlocalx = smooindsumx*termx
1482 gradlocaly = smooindsumy*termy
1483 gradlocalz = smooindsumz*termz
1485 DO isl = 1,ncellmembs
1486 icg2 = icg_ary(isl+2)
1496 nextx2 = grad(xcoord,igrad,icg2)
1497 nexty2 = grad(ycoord,igrad,icg2)
1498 nextz2 = grad(zcoord,igrad,icg2)
1500 smooindx = 1.0_rfreal/(termx*termx + 1.0e-15_rfreal)
1501 smooindy = 1.0_rfreal/(termy*termy + 1.0e-15_rfreal)
1502 smooindz = 1.0_rfreal/(termz*termz + 1.0e-15_rfreal)
1504 smooindsumx = smooindsumx + smooindx
1505 smooindsumy = smooindsumy + smooindy
1506 smooindsumz = smooindsumz + smooindz
1508 gradlocalx = gradlocalx + smooindx*termx
1509 gradlocaly = gradlocaly + smooindy*termy
1510 gradlocalz = gradlocalz + smooindz*termz
1513 gradeno(xcoord,igrad,icg) = gradlocalx/smooindsumx
1514 gradeno(ycoord,igrad,icg) = gradlocaly/smooindsumy
1515 gradeno(zcoord,igrad,icg) = gradlocalz/smooindsumz
1519 DO icg = 1,pgrid%nCellsTot
1520 DO igrad = ibeggrad,iendgrad
1521 grad(xcoord,igrad,icg) = gradeno(xcoord,igrad,icg)
1522 grad(ycoord,igrad,icg) = gradeno(ycoord,igrad,icg)
1523 grad(zcoord,igrad,icg) = gradeno(zcoord,igrad,icg)
1544 DEALLOCATE(icg_ary,stat=errorflag)
1545 global%error = errorflag
1546 IF ( global%error /= err_none )
THEN
1547 CALL
errorstop(global,err_deallocate,__line__,
'smooInd')
1550 DEALLOCATE(gradeno,stat=errorflag)
1551 global%error = errorflag
1552 IF ( global%error /= err_none )
THEN
1553 CALL
errorstop(global,err_deallocate,__line__,
'gradENO')
1561 CALL fprofiler_ends(
"RFLU::WENOGradCellsXYZFast_3D")
1605 INTEGER,
INTENT(IN) :: ibeggrad,iendgrad
1606 REAL(RFREAL),
DIMENSION(:,:,:),
POINTER :: grad
1607 TYPE(t_region
),
POINTER :: pregion
1619 global => pregion%global
1622 'RFLU_ModWENO.F90' )
1628 SELECT CASE ( pregion%mixtInput%stencilDimensCells )
1638 CALL
errorstop(global,err_reached_default,__line__)
subroutine rflu_wenogradcellsxyzfast_3d(pRegion, iBegGrad, iEndGrad, grad)
subroutine registerfunction(global, funName, fileName)
subroutine rflu_wenogradcellsxyz_1d(pRegion, iBegGrad, iEndGrad, grad)
subroutine rflu_wenogradcells_3d(pRegion, iBegGrad, iEndGrad, grad)
subroutine rflu_wenogradcellsxyz_3d(pRegion, iBegGrad, iEndGrad, grad)
subroutine rflu_wenogradcells_2d(pRegion, iBegGrad, iEndGrad, grad)
subroutine rflu_wenogradcellsxyz_2d(pRegion, iBegGrad, iEndGrad, grad)
subroutine, public rflu_wenogradcellswrapper(pRegion, iBegGrad, iEndGrad, grad)
**********************************************************************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 idir
subroutine rflu_wenogradcellsxyzfast_2d(pRegion, iBegGrad, iEndGrad, grad)
subroutine, public rflu_wenogradcellsxyzwrapper(pRegion, iBegGrad, iEndGrad, grad)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine deregisterfunction(global)