restrict2D Subroutine

public subroutine restrict2D(tabfin, bfin, tabgros, bgros, ordre)

Interpolate 2D evenly spaced points, taking into account the borders

Arguments

Type IntentOptional Attributes Name
real(kind=R8), intent(in), dimension( bfin%lb1: bfin%ub1, bfin%lb2: bfin%ub2) :: tabfin

tableau de départ fin

type(tborne), intent(in) :: bfin

indices des tableaux

real(kind=R8), intent(out), dimension(bgros%lb1:bgros%ub1, bgros%lb2:bgros%ub2) :: tabgros

tableau grossier résultant

type(tborne), intent(in) :: bgros

indices des tableaux

integer(kind=I4), intent(in) :: ordre

ordre de l’interpolation


Calls

proc~~restrict2d~~CallsGraph proc~restrict2d restrict2D proc~restrict1d restrict1D proc~restrict2d->proc~restrict1d proc~restrict restrict proc~restrict1d->proc~restrict

Called by

proc~~restrict2d~~CalledByGraph proc~restrict2d restrict2D proc~test_interp_pond test_interp_pond proc~test_interp_pond->proc~restrict2d program~test_intpl test_intpl program~test_intpl->proc~test_interp_pond

Source Code

subroutine restrict2D(tabfin, bfin, tabgros, bgros, ordre)
!! Interpolate 2D evenly spaced points, taking into account the borders
implicit none
type(tborne),     intent(in )                                                      :: bfin, bgros     !! *indices des tableaux*
integer(kind=I4), intent(in )                                                      :: ordre           !! *ordre de l'interpolation*
real(kind=R8),    intent(in ), dimension( bfin%lb1: bfin%ub1,  bfin%lb2: bfin%ub2) :: tabfin          !! *tableau de départ fin*
real(kind=R8),    intent(out), dimension(bgros%lb1:bgros%ub1, bgros%lb2:bgros%ub2) :: tabgros         !! *tableau grossier résultant*

   integer(kind=I4) :: ii, j

   real(kind=R8), dimension(bgros%lb1:bgros%ub1, bfin%lb2:2*bgros%ub2) :: tab_tmp

   do j = bfin%lb2, 2*bgros%ub2

      call restrict1D( tabfin  = tabfin(:,j),   &  !
                       lb_fin  = bfin%lb1,      &  !
                       tabgros = tab_tmp(:,j),  &  !
                       lb_gros = bgros%lb1,     &  !
                       ub_gros = bgros%ub1,     &  !
                       ordre   = ordre )           !
   enddo

   do ii = bgros%lb1, bgros%ub1

      call restrict1D( tabfin  = tab_tmp(ii,:), &  !
                       lb_fin  = bfin%lb2,      &  !
                       tabgros = tabgros(ii,:), &  !
                       lb_gros = bgros%lb2,     &  !
                       ub_gros = bgros%ub2,     &  !
                       ordre   = ordre )           !
   enddo

return
endsubroutine restrict2D