This subroutine calculates the vertex coordinate for a given element depending on the treeID, the global tree, the q-Value and iVrtx
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=long_k), | intent(in) | :: | treeID | |||
type(treelmesh_type), | intent(in) | :: | tree | |||
real(kind=rk), | intent(in) | :: | qVal | |||
integer, | intent(in) | :: | iVrtx |
function tem_calc_vrtxOf_qVal( treeID, tree, qVal, iVrtx) result( coord )
! ---------------------------------------------------------------------------
integer(kind=long_k), intent(in) :: treeID
type(treelmesh_type), intent(in) :: tree
real(kind=rk), intent(in) :: qVal
integer, intent(in) :: iVrtx
real(kind=rk) :: coord(3)
! ---------------------------------------------------------------------------
real(kind=rk) :: bary(3)
real(kind=rk) :: dx
! ---------------------------------------------------------------------------
! get the barycenter of the current treeID
bary = tem_BaryOfId( tree, treeID )
! get the length of the element
dx = tem_ElemSize( tree, treeID )
coord = real(qOffset( vrtxMap(5, iVrtx), : ), kind=rk)*qVal*dx + bary
end function tem_calc_vrtxOf_qVal