Projection of the solution at next level (nside += 1)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=xp), | intent(inout), | dimension(:,:,:), allocatable | :: | cube_params | cube of parameters |
subroutine go_up_level(cube_params)
!! Projection of the solution at next level (nside += 1)
implicit none
real(xp), intent(inout), dimension(:,:,:), allocatable :: cube_params !! cube of parameters
integer :: i, j, k, l
real(xp), dimension(:,:,:), allocatable :: cube_params_down
integer, dimension(3) :: dim
dim = shape(cube_params)
allocate(cube_params_down(dim(1), dim(2), dim(3)))
cube_params_down = 0._xp
cube_params_down = cube_params
deallocate(cube_params)
allocate(cube_params(dim(1),dim(2)*2, dim(3)*2))
cube_params = 0._xp
do i=1,size(cube_params_down,dim=2)
do j=1,size(cube_params_down,dim=3)
do k=1,2
do l=1,2
cube_params(:,k+((i-1)*2),l+((j-1)*2)) = cube_params_down(:,i,j)
enddo
enddo
enddo
enddo
end subroutine go_up_level