public function tem_polygon_material_value(me, nComponents, inVal, outVal, point) result(res)
Return the material value for point, based on the position in relation to
the polygon.

The point containment is decided with the help of the Gauss-Bonnet
theorem, which is highly robust, but requires the polygon vertices to
follow an ordering along the polygon lines.

The returned value will be polygon%inval, if the point is inside and
polygon%outside otherwise.

Arguments
Type Intent Optional Attributes Name
type(tem_polygon_vertex_type ),
intent(in)
::
me Polygon to describe the material shape.

integer,
intent(in)
::
nComponents
real(kind=rk),
intent(in)
::
inVal (nComponents)
real(kind=rk),
intent(in)
::
outVal (nComponents)
real(kind=rk),
intent(in)
::
point (:)Point to check against the polygon.

Return Value real(kind=rk)(nComponents)
Material value at point, as defined by the polygon.

Calls
proc~~tem_polygon_material_value~~CallsGraph
proc~tem_polygon_material_value
tem_polygon_material_value
proc~angle_between
angle_between
proc~tem_polygon_material_value->proc~angle_between
Nodes of different colours represent the following:

Graph Key
Subroutine
Subroutine
Function
Function
Interface
Interface
Unknown Procedure Type
Unknown Procedure Type
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.

Called by
proc~~tem_polygon_material_value~~CalledByGraph
proc~tem_polygon_material_value
tem_polygon_material_value
proc~tem_eval_polygon_material_3d
tem_eval_polygon_material_3d
proc~tem_eval_polygon_material_3d->proc~tem_polygon_material_value
proc~tem_eval_polygon_material_scal
tem_eval_polygon_material_scal
proc~tem_eval_polygon_material_scal->proc~tem_polygon_material_value
proc~tem_polygon_material_movement_single
tem_polygon_material_movement_single
proc~tem_polygon_material_movement_single->proc~tem_polygon_material_value
proc~tem_polygon_material_movement_multi
tem_polygon_material_movement_multi
proc~tem_polygon_material_movement_multi->proc~tem_polygon_material_value
proc~tem_eval_polygon_material
tem_eval_polygon_material
proc~tem_eval_polygon_material->proc~tem_polygon_material_value
proc~tem_eval_polygon_material_scal_3d
tem_eval_polygon_material_scal_3d
proc~tem_eval_polygon_material_scal_3d->proc~tem_polygon_material_value
proc~tem_polygon_material_test_value
tem_polygon_material_test_value
proc~tem_polygon_material_test_value->proc~tem_polygon_material_value
program~tem_polygon_material_test
tem_polygon_material_test
program~tem_polygon_material_test->proc~tem_polygon_material_test_value
proc~tem_spatial_for_coord
tem_spatial_for_coord
proc~tem_spatial_for_coord->proc~tem_eval_polygon_material_scal
proc~tem_spatial_for_coord->proc~tem_eval_polygon_material_scal_3d
proc~tem_spatial_vector_for_coord
tem_spatial_vector_for_coord
proc~tem_spatial_vector_for_coord->proc~tem_eval_polygon_material_3d
proc~tem_spatial_vector_for_coord->proc~tem_eval_polygon_material
proc~tem_spacetime_for_coord
tem_spacetime_for_coord
proc~tem_spacetime_for_coord->proc~tem_polygon_material_movement_single
proc~tem_spacetime_for_coord->proc~tem_polygon_material_movement_multi
proc~tem_spacetime_scalar_for_index
tem_spacetime_scalar_for_index
proc~tem_spacetime_scalar_for_index->proc~tem_spacetime_for_coord
interface~tem_spacetime_for
tem_spacetime_for
interface~tem_spacetime_for->proc~tem_spacetime_for_coord
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_vector_for_coord
proc~tem_spatial_vector_for_index
tem_spatial_vector_for_index
proc~tem_spatial_vector_for_index->proc~tem_spatial_vector_for_coord
proc~tem_spacetime_for_stcoord
tem_spacetime_for_stcoord
proc~tem_spacetime_for_stcoord->proc~tem_spacetime_for_coord
Nodes of different colours represent the following:

Graph Key
Subroutine
Subroutine
Function
Function
Interface
Interface
Unknown Procedure Type
Unknown Procedure Type
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.

Variables
Type Visibility Attributes Name Initial
real(kind=rk),
private ::
diffa (me%nVertices,2)
real(kind=rk),
private ::
diffb (me%nVertices,2)
real(kind=rk),
private ::
anglesum
integer,
private ::
iDir