tem_eval_polygon_material_scal_3d Function

public function tem_eval_polygon_material_scal_3d(me, coord, n) result(res)

Evaluate a list of points, and return first component of inval for each that is within me and first component of outval for all other points.

Arguments

Type IntentOptional 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.

Return Value real(kind=rk), (n)

Resulting value at each point.


Calls

proc~~tem_eval_polygon_material_scal_3d~~CallsGraph proc~tem_eval_polygon_material_scal_3d tem_eval_polygon_material_scal_3d proc~tem_polygon_material_value tem_polygon_material_value proc~tem_eval_polygon_material_scal_3d->proc~tem_polygon_material_value proc~angle_between angle_between proc~tem_polygon_material_value->proc~angle_between

Called by

proc~~tem_eval_polygon_material_scal_3d~~CalledByGraph proc~tem_eval_polygon_material_scal_3d tem_eval_polygon_material_scal_3d proc~tem_spatial_for_coord tem_spatial_for_coord proc~tem_spatial_for_coord->proc~tem_eval_polygon_material_scal_3d proc~tem_spatial_scalar_for_index tem_spatial_scalar_for_index proc~tem_spatial_scalar_for_index->proc~tem_spatial_for_coord interface~tem_spatial_for tem_spatial_for interface~tem_spatial_for->proc~tem_spatial_for_coord interface~tem_spatial_for->proc~tem_spatial_scalar_for_index proc~tem_spacetime_for_treeids tem_spacetime_for_treeIDs proc~tem_spacetime_for_treeids->interface~tem_spatial_for proc~tem_spacetime_vector_for_index tem_spacetime_vector_for_index proc~tem_spacetime_vector_for_index->interface~tem_spatial_for proc~tem_spacetime_vector_for_coord tem_spacetime_vector_for_coord proc~tem_spacetime_vector_for_index->proc~tem_spacetime_vector_for_coord proc~tem_spatial_scalar_storeval tem_spatial_scalar_storeVal proc~tem_spatial_scalar_storeval->interface~tem_spatial_for proc~tem_spacetime_for_coord tem_spacetime_for_coord proc~tem_spacetime_for_coord->interface~tem_spatial_for proc~tem_spacetime_scalar_for_index tem_spacetime_scalar_for_index proc~tem_spacetime_scalar_for_index->interface~tem_spatial_for proc~tem_spacetime_scalar_for_index->proc~tem_spacetime_for_coord proc~tem_spacetime_vector_for_treeids tem_spacetime_vector_for_treeIDs proc~tem_spacetime_vector_for_treeids->interface~tem_spatial_for proc~tem_spacetime_vector_for_coord->interface~tem_spatial_for proc~tem_spatial_vector_storeval tem_spatial_vector_storeVal proc~tem_spatial_vector_storeval->interface~tem_spatial_for interface~tem_spacetime_for tem_spacetime_for interface~tem_spacetime_for->proc~tem_spacetime_for_treeids interface~tem_spacetime_for->proc~tem_spacetime_vector_for_index interface~tem_spacetime_for->proc~tem_spacetime_for_coord interface~tem_spacetime_for->proc~tem_spacetime_scalar_for_index interface~tem_spacetime_for->proc~tem_spacetime_vector_for_treeids interface~tem_spacetime_for->proc~tem_spacetime_vector_for_coord proc~tem_spacetime_for_stcoord tem_spacetime_for_stcoord proc~tem_spacetime_for_stcoord->proc~tem_spacetime_for_coord interface~tem_spatial_storeval tem_spatial_storeVal interface~tem_spatial_storeval->proc~tem_spatial_scalar_storeval interface~tem_spatial_storeval->proc~tem_spatial_vector_storeval

Contents


Source Code

  function tem_eval_polygon_material_scal_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)
    ! ----------------------------------------------------------------------
    real(kind=rk) :: loc(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
          loc = tem_polygon_material_value(      & 
            & me          = me%poly_list(ipoly), &
            & nComponents = me%nComponents,      &
            & inVal       = me%inVal,            &
            & outVal      = me%outVal,           &
            & point       = coord(iPoint,:2)     )
        else
          loc = me%outval
        end if
        res(iPoint) = loc(1)
      end do
    end do
  end function tem_eval_polygon_material_scal_3d