Evaluate a list of points, and return inval for each that is within me and outval for all other points.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_polygon_material_type), | intent(in) | :: | me |
Description of the polygon to evaluate |
||
real(kind=rk), | intent(in) | :: | coord(n,3) |
Coordinates for which the function should be evaluated. |
||
integer, | intent(in) | :: | n |
Number of points to get a value for. |
Resulting value at each point.
function tem_eval_polygon_material_3d(me, coord, n) result(res)
! ----------------------------------------------------------------------
!> Description of the polygon to evaluate
type(tem_polygon_material_type), intent(in) :: me
!> Number of points to get a value for.
integer, intent(in) :: n
!> Coordinates for which the function should be evaluated.
real(kind=rk), intent(in) :: coord(n,3)
!> Resulting value at each point.
real(kind=rk) :: res(n, me%nComponents)
! ----------------------------------------------------------------------
integer :: iPoint, iPoly
! ----------------------------------------------------------------------
do iPoly = 1, me%nPoly
do iPoint=1,n
if (coord(iPoint,3) >= me%zmin .and. coord(iPoint,3) <= me%zmax ) then
res(iPoint,:) = tem_polygon_material_value( &
& me = me%poly_list(iPoly), &
& nComponents = me%nComponents, &
& inVal = me%inVal, &
& outVal = me%outVal, &
& point = coord(iPoint,:2) )
else
res(iPoint,:) = me%outval
end if
end do
end do
end function tem_eval_polygon_material_3d