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
Type | Intent | Optional | 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 |
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