72 CHARACTER(CHRLEN) :: RCSIdentString = &
73 '$RCSfile: RFLU_ModInterpolation.F90,v $ $Revision: 1.21 $'
114 INTEGER,
INTENT(IN) :: ifg
115 REAL(RFREAL),
DIMENSION(:,:),
INTENT(IN) :: src
116 REAL(RFREAL),
DIMENSION(:),
INTENT(OUT) :: dst
117 TYPE(t_region
),
POINTER :: pregion
123 INTEGER :: errorflag,icg,idst,ienddst,iendsrc,isrc,isl
124 REAL(RFREAL) :: c11,c12,c13,c14,c22,c23,c24,c33,c34,c44,
dx,
dy,
dz, &
125 r11,r12,r13,r14,r22,r23,r24,r33,r34,r44,
term,wti
126 TYPE(t_grid),
POINTER :: pgrid
133 global => pregion%global
136 'RFLU_ModInterpolation.F90')
142 pgrid => pregion%grid
144 iendsrc = ubound(src,1)
145 ienddst = ubound(dst,1)
155 SELECT CASE ( pregion%mixtInput%dimens )
162 r11 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_11)
163 r12 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_12)
164 r22 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_22)
165 r13 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_13)
166 r23 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_23)
167 r33 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_33)
174 c13 = -(c11*r13 + c12*c22*r23)
183 r11 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_11)
184 r12 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_12)
185 r22 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_22)
186 r13 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_13)
187 r23 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_23)
188 r33 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_33)
189 r14 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_14)
190 r24 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_24)
191 r34 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_34)
192 r44 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_44)
200 c13 = -(c11*r13 + c12*c22*r23)
201 c14 = -(c11*r14 + c12*c22*r24 + c13*c33*r34)
204 c24 = -(c22*r24 + c23*c33*r34)
213 CALL
errorstop(global,err_reached_default,__line__)
221 dst(idst) = 0.0_rfreal
232 SELECT CASE ( pregion%mixtInput%dimens )
239 DO isl = 1,pgrid%f2cs(ifg)%nCellMembs
240 icg = pgrid%f2cs(ifg)%cellMembs(isl)
242 dx = pgrid%cofg(xcoord,icg) - pgrid%fc(xcoord,ifg)
243 dy = pgrid%cofg(ycoord,icg) - pgrid%fc(ycoord,ifg)
255 dst(idst) = dst(idst) + wti*src(isrc,icg)
266 DO isl = 1,pgrid%f2cs(ifg)%nCellMembs
267 icg = pgrid%f2cs(ifg)%cellMembs(isl)
269 dx = pgrid%cofg(xcoord,icg) - pgrid%fc(xcoord,ifg)
270 dy = pgrid%cofg(ycoord,icg) - pgrid%fc(ycoord,ifg)
271 dz = pgrid%cofg(zcoord,icg) - pgrid%fc(zcoord,ifg)
284 dst(idst) = dst(idst) + wti*src(isrc,icg)
295 CALL
errorstop(global,err_reached_default,__line__)
341 INTEGER,
INTENT(IN) :: ifl
342 REAL(RFREAL),
DIMENSION(:,:),
INTENT(IN) :: src
343 REAL(RFREAL),
DIMENSION(:),
INTENT(OUT) :: dst
344 TYPE(t_patch),
POINTER :: ppatch
345 TYPE(t_region
),
POINTER :: pregion
351 INTEGER :: errorflag,icg,idst,ienddst,iendsrc,isrc,isl
352 REAL(RFREAL) :: c11,c12,c13,c14,c22,c23,c24,c33,c34,c44,
dx,
dy,
dz, &
353 r11,r12,r13,r14,r22,r23,r24,r33,r34,r44,
term,wti
354 TYPE(t_grid),
POINTER :: pgrid
361 global => pregion%global
364 'RFLU_ModInterpolation.F90')
370 pgrid => pregion%grid
372 iendsrc = ubound(src,1)
373 ienddst = ubound(dst,1)
379 SELECT CASE ( pregion%mixtInput%dimens )
381 r11 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_11)
382 r12 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_12)
383 r22 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_22)
384 r13 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_13)
385 r23 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_23)
386 r33 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_33)
393 c13 = -(c11*r13 + c12*c22*r23)
397 r11 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_11)
398 r12 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_12)
399 r22 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_22)
400 r13 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_13)
401 r23 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_23)
402 r33 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_33)
403 r14 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_14)
404 r24 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_24)
405 r34 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_34)
406 r44 = ppatch%bf2cs(ifl)%xyzMoms(xyz_mom_44)
414 c13 = -(c11*r13 + c12*c22*r23)
415 c14 = -(c11*r14 + c12*c22*r24 + c13*c33*r34)
418 c24 = -(c22*r24 + c23*c33*r34)
422 CALL
errorstop(global,err_reached_default,__line__)
430 dst(idst) = 0.0_rfreal
437 SELECT CASE ( pregion%mixtInput%dimens )
439 DO isl = 1,ppatch%bf2cs(ifl)%nCellMembs
440 icg = ppatch%bf2cs(ifl)%cellMembs(isl)
442 dx = pgrid%cofg(xcoord,icg) - ppatch%fc(xcoord,ifl)
443 dy = pgrid%cofg(ycoord,icg) - ppatch%fc(ycoord,ifl)
455 dst(idst) = dst(idst) + wti*src(isrc,icg)
461 DO isl = 1,ppatch%bf2cs(ifl)%nCellMembs
462 icg = ppatch%bf2cs(ifl)%cellMembs(isl)
464 dx = pgrid%cofg(xcoord,icg) - ppatch%fc(xcoord,ifl)
465 dy = pgrid%cofg(ycoord,icg) - ppatch%fc(ycoord,ifl)
466 dz = pgrid%cofg(zcoord,icg) - ppatch%fc(zcoord,ifl)
479 dst(idst) = dst(idst) + wti*src(isrc,icg)
485 CALL
errorstop(global,err_reached_default,__line__)
533 REAL(RFREAL),
DIMENSION(:,:),
INTENT(IN) :: src
534 REAL(RFREAL),
DIMENSION(:,:),
INTENT(OUT) :: dst
535 TYPE(t_region
),
POINTER :: pregion
541 INTEGER :: errorflag,icg,idst,ienddst,iendsrc,ifg,isl,isrc
542 REAL(RFREAL) :: c11,c12,c13,c14,c22,c23,c24,c33,c34,c44,
dx,
dy,
dz, &
543 r11,r12,r13,r14,r22,r23,r24,r33,r34,r44,
term,wti
544 TYPE(t_grid),
POINTER :: pgrid
551 global => pregion%global
554 'RFLU_ModInterpolation.F90')
560 pgrid => pregion%grid
562 iendsrc = ubound(src,1)
563 ienddst = ubound(dst,1)
573 SELECT CASE ( pregion%mixtInput%dimens )
578 DO ifg = 1,pgrid%nFaces
579 r11 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_11)
580 r12 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_12)
581 r22 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_22)
582 r13 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_13)
583 r23 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_23)
584 r33 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_33)
591 c13 = -(c11*r13 + c12*c22*r23)
596 dst(idst,ifg) = 0.0_rfreal
599 DO isl = 1,pgrid%f2cs(ifg)%nCellMembs
600 icg = pgrid%f2cs(ifg)%cellMembs(isl)
602 dx = pgrid%cofg(xcoord,icg) - pgrid%fc(xcoord,ifg)
603 dy = pgrid%cofg(ycoord,icg) - pgrid%fc(ycoord,ifg)
615 dst(idst,ifg) = dst(idst,ifg) + wti*src(isrc,icg)
625 DO ifg = 1,pgrid%nFaces
626 r11 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_11)
627 r12 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_12)
628 r22 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_22)
629 r13 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_13)
630 r23 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_23)
631 r33 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_33)
632 r14 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_14)
633 r24 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_24)
634 r34 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_34)
635 r44 = pgrid%f2cs(ifg)%xyzMoms(xyz_mom_44)
643 c13 = -(c11*r13 + c12*c22*r23)
644 c14 = -(c11*r14 + c12*c22*r24 + c13*c33*r34)
647 c24 = -(c22*r24 + c23*c33*r34)
652 dst(idst,ifg) = 0.0_rfreal
655 DO isl = 1,pgrid%f2cs(ifg)%nCellMembs
656 icg = pgrid%f2cs(ifg)%cellMembs(isl)
658 dx = pgrid%cofg(xcoord,icg) - pgrid%fc(xcoord,ifg)
659 dy = pgrid%cofg(ycoord,icg) - pgrid%fc(ycoord,ifg)
660 dz = pgrid%cofg(zcoord,icg) - pgrid%fc(zcoord,ifg)
673 dst(idst,ifg) = dst(idst,ifg) + wti*src(isrc,icg)
683 CALL
errorstop(global,err_reached_default,__line__)
731 INTEGER,
INTENT(IN) :: nvar,ordernominal
732 REAL(RFREAL),
DIMENSION(:,:),
INTENT(IN) :: src
733 REAL(RFREAL),
DIMENSION(:,:),
INTENT(OUT) :: dst
734 TYPE(t_region
),
POINTER :: pregion
740 INTEGER :: errorflag,icg,isl,ivg,ivar,nrows,orderactual,scount
741 REAL(RFREAL),
DIMENSION(:,:),
ALLOCATABLE :: dr,wts
742 TYPE(t_grid),
POINTER :: pgrid
749 global => pregion%global
752 'RFLU_ModInterpolation.F90')
754 IF ( global%myProcid == masterproc )
THEN
755 IF ( global%verbLevel > verbose_none )
THEN
756 WRITE(stdout,
'(A,1X,A)') solver_name, &
757 'Interpolating from cells to vertices...'
760 IF ( global%verbLevel > verbose_low )
THEN
761 WRITE(stdout,
'(A,3X,A)') solver_name,
'Method: Proper'
769 pgrid => pregion%grid
775 DO ivg = 1,pgrid%nVertTot
776 nrows = pgrid%v2cs(ivg)%nCellMembs
778 orderactual = ordernominal
780 ALLOCATE(dr(xcoord:zcoord,nrows),stat=errorflag)
781 global%error = errorflag
782 IF ( global%error /= err_none )
THEN
783 CALL
errorstop(global,err_allocate,__line__,
'dr')
786 ALLOCATE(wts(1,nrows),stat=errorflag)
787 global%error = errorflag
788 IF ( global%error /= err_none )
THEN
789 CALL
errorstop(global,err_allocate,__line__,
'wts')
792 DO isl = 1,pgrid%v2cs(ivg)%nCellMembs
793 icg = pgrid%v2cs(ivg)%cellMembs(isl)
795 dr(xcoord,isl) = pgrid%cofg(xcoord,icg) - pgrid%xyz(xcoord,ivg)
796 dr(ycoord,isl) = pgrid%cofg(ycoord,icg) - pgrid%xyz(ycoord,ivg)
797 dr(zcoord,isl) = pgrid%cofg(zcoord,icg) - pgrid%xyz(zcoord,ivg)
805 compwts_mode_adapt,compwts_scal_invdist, &
806 deriv_degree_0,orderactual,nrows,dr, &
814 dst(ivar,ivg) = 0.0_rfreal
821 DO isl = 1,pgrid%v2cs(ivg)%nCellMembs
822 icg = pgrid%v2cs(ivg)%cellMembs(isl)
825 dst(ivar,ivg) = dst(ivar,ivg) + wts(1,isl)*src(ivar,icg)
833 DEALLOCATE(dr,stat=errorflag)
834 global%error = errorflag
835 IF ( global%error /= err_none )
THEN
836 CALL
errorstop(global,err_deallocate,__line__,
'dr')
839 DEALLOCATE(wts,stat=errorflag)
840 global%error = errorflag
841 IF ( global%error /= err_none )
THEN
842 CALL
errorstop(global,err_deallocate,__line__,
'wts')
850 IF ( global%myProcid == masterproc .AND. &
851 global%verbLevel > verbose_none )
THEN
852 WRITE(stdout,
'(A,1X,A)') solver_name, &
853 'Interpolating from cells to vertices done.'
896 INTEGER,
INTENT(IN) :: nvar
897 REAL(RFREAL),
DIMENSION(:,:),
INTENT(IN) :: src
898 REAL(RFREAL),
DIMENSION(:,:),
INTENT(OUT) :: dst
899 TYPE(t_region
),
POINTER :: pregion
905 INTEGER :: icg,icl,ivg,ivar,ncells,v2cbeg,v2cend
907 TYPE(t_grid),
POINTER :: pgrid
914 global => pregion%global
917 'RFLU_ModInterpolation.F90')
919 IF ( global%myProcid == masterproc )
THEN
920 IF ( global%verbLevel > verbose_none )
THEN
921 WRITE(stdout,
'(A,1X,A)') solver_name, &
922 'Interpolating from cells to vertices...'
925 IF ( global%verbLevel > verbose_low )
THEN
926 WRITE(stdout,
'(A,3X,A)') solver_name,
'Method: Simple'
934 pgrid => pregion%grid
940 DO ivg = 1,pgrid%nVertTot
941 v2cbeg = pgrid%v2cInfo(v2c_beg,ivg)
942 v2cend = pgrid%v2cInfo(v2c_end,ivg)
944 ncells = v2cend - v2cbeg + 1
951 dst(ivar,ivg) = 0.0_rfreal
958 wt = 1.0_rfreal/
REAL(nCells,RFREAL)
961 icg = pgrid%v2c(v2cbeg+icl-1)
964 dst(ivar,ivg) = dst(ivar,ivg) + wt*src(ivar,icg)
973 IF ( global%myProcid == masterproc .AND. &
974 global%verbLevel > verbose_none )
THEN
975 WRITE(stdout,
'(A,1X,A)') solver_name, &
976 'Interpolating from cells to vertices done.'
subroutine, public rflu_computestencilweights(global, dimens, wtsMode, scalMode, derivDegree, orderNominal, nRows, dr, wts, sCount)
subroutine, public rflu_interpsimplecells2verts(pRegion, nVar, src, dst)
subroutine rflu_invertmatrixsvd(global, nRows, nCols, a, aInv, sCount)
subroutine registerfunction(global, funName, fileName)
subroutine, public rflu_interpcells2face(pRegion, ifg, src, dst)
subroutine errorstop(global, errorCode, errorLine, addMessage)
subroutine, public rflu_interpcells2facepatch(pRegion, pPatch, ifl, src, dst)
subroutine deregisterfunction(global)
subroutine, public rflu_interpcells2verts(pRegion, orderNominal, nVar, src, dst)
subroutine, public rflu_interpcells2faces(pRegion, src, dst)