The following function provides the coordinates of the end for a given ID in the complete mesh. The described element lies between the origin and this end point.
The end point of the element with a given ID coincides with the origin of treeID with a coordinate shift of +1 in each dimension.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(treelmesh_type), | intent(in) | :: | tree |
mesh information |
||
integer(kind=long_k), | intent(in) | :: | TreeID |
input element ID |
origin return value
pure function tem_endOfId(tree,TreeID) result(origin) ! -------------------------------------------------------------------- ! !> mesh information type(treelmesh_type), intent(in) :: tree !> input element ID integer(kind=long_k), intent(in) :: TreeID !> origin return value real(kind=rk) :: origin(3) ! -------------------------------------------------------------------- ! integer :: coord(4) !< spatial index triple for a given ID real(kind=rk) :: dx !< size of Element ! -------------------------------------------------------------------- ! coord = tem_CoordOfId( TreeID ) dx = tem_elemSizeLevel( tree, coord(4) ) origin = tree%global%origin + real(coord(:3)+1, kind=rk)*dx end function tem_endOfId