gradient_corner Subroutine

private subroutine gradient_corner(hgt, gdx, gdy)

Note

Function that gives the nodal height gradients

gdx : (2,1)----(2,2)----(2,3) : QU9 notation

gdy : (1,2)----(2,2)----(3,2) : QU9 notation

Arguments

Type IntentOptional Attributes Name
real(kind=R8), intent(in), dimension(1:3, 1:3) :: hgt

local height 2D array

real(kind=R8), intent(out), dimension(1:3) :: gdx

nodal x gradient

real(kind=R8), intent(out), dimension(1:3) :: gdy

nodal x gradient


Called by

proc~~gradient_corner~~CalledByGraph proc~gradient_corner gradient_corner proc~label_surf_summits label_surf_summits proc~label_surf_summits->proc~gradient_corner proc~peaks_and_pits_curvatures peaks_and_pits_curvatures proc~peaks_and_pits_curvatures->proc~label_surf_summits proc~test_label_surf_summits test_label_surf_summits proc~test_label_surf_summits->proc~label_surf_summits proc~test_peaks_and_pits_curvatures test_peaks_and_pits_curvatures proc~test_peaks_and_pits_curvatures->proc~peaks_and_pits_curvatures program~test_grad_curv test_grad_curv program~test_grad_curv->proc~test_label_surf_summits program~test_grad_curv->proc~test_peaks_and_pits_curvatures

Source Code

   subroutine gradient_corner(hgt, gdx, gdy)
   !================================================================================================
   !< @note Function that gives the nodal height gradients
   !<
   !< gdx : (2,1)----(2,2)----(2,3) : QU9 notation
   !<
   !< gdy : (1,2)----(2,2)----(3,2) : QU9 notation
   !<
   !<  @endnote
   !------------------------------------------------------------------------------------------------
   implicit none
   real   (kind=R8), intent(in ), dimension(1:3, 1:3) :: hgt   !! *local height 2D array*
   real   (kind=R8), intent(out), dimension(1:3)      :: gdx   !! *nodal x gradient*
   real   (kind=R8), intent(out), dimension(1:3)      :: gdy   !! *nodal x gradient*

!~       real(kind=R8), dimension(1:9) :: tab

!~       tab(1:9) = [ hgt(1, 1), & 1 !  (3,1)----(3,2)----(3,3)
!~                    hgt(1, 3), & 2 !    |        |        |
!~                    hgt(3, 3), & 3 !    |        |        |
!~                    hgt(3, 1), & 4 !  (2,1)----(2,2)----(2,3)
!~                    hgt(1, 2), & 5 !    |        |        |
!~                    hgt(2, 3), & 6 !    |        |        |
!~                    hgt(3, 2), & 7 !  (1,1)----(1,2)----(1,3)
!~                    hgt(2, 1), & 8 !
!~                    hgt(2, 2) ]  9 !

     ! (3,1)----(3,2)----(3,3)
     !   |        |        |
     !   |        |        |
     ! (2,1)----(2,2)----(2,3)
     !   |        |        |
     !   |        |        |
     ! (1,1)----(1,2)----(1,3)

      gdx(1:3) = [ -1.5_R8 * hgt(2, 1), &  !
                   +0.0_R8 * hgt(2, 2), &  !
                   +1.5_R8 * hgt(2, 3) ]   !

      gdy(1:3) = [ -1.5_R8 * hgt(1, 2), &  !
                   +0.0_R8 * hgt(2, 2), &  !
                   +1.5_R8 * hgt(3, 2) ]   !


!~       gdx(1:9) = [ -1.5_R8 * tab(1), &  !
!~                    +1.5_R8 * tab(2), &  !
!~                    +1.5_R8 * tab(3), &  !
!~                    -1.5_R8 * tab(4), &  !
!~                    +0.0_R8 * tab(5), &  !
!~                    +1.5_R8 * tab(6), &  !
!~                    +0.0_R8 * tab(7), &  !
!~                    -1.5_R8 * tab(8), &  !
!~                    +0.0_R8 * tab(9) ]   !


!~       gdy(1:9) = [ -1.5_R8 * tab(1), &  !
!~                    -1.5_R8 * tab(2), &  !
!~                    +1.5_R8 * tab(3), &  !
!~                    +1.5_R8 * tab(4), &  !
!~                    -1.5_R8 * tab(5), &  !
!~                    +0.0_R8 * tab(6), &  !
!~                    +1.5_R8 * tab(7), &  !
!~                    +0.0_R8 * tab(8), &  !
!~                    +0.0_R8 * tab(9) ]   !

   return
   endsubroutine gradient_corner