Returns the get_point and get_element pointer according to the requested evaluation type.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | evaltype | |||
integer, | intent(in) | :: | nComp | |||
procedure(tem_varSys_proc_point), | intent(out), | pointer | :: | get_point |
The function pointer to the get_point subroutine for the given operation. |
|
procedure(tem_varSys_proc_element), | intent(out), | pointer | :: | get_element |
The function pointer to the get_element subroutine for the given operation. |
|
procedure(tem_varSys_proc_getValOfIndex), | intent(out), | pointer | :: | get_valOfIndex |
The function pointer to the get_valOfIndex subroutine for the given operation. |
subroutine tem_varSys_assignEvalType(evaltype, nComp, get_point, &
& get_element, get_valOfIndex )
! -------------------------------------------------------------------------
character(len=*), intent(in) :: evaltype
integer, intent(in) :: nComp
!> The function pointer to the get_point subroutine for the given
!! operation.
procedure(tem_varSys_proc_point), pointer, intent(out) :: get_point
!> The function pointer to the get_element subroutine for the given
!! operation.
procedure(tem_varSys_proc_element), pointer, intent(out) :: get_element
!> The function pointer to the get_valOfIndex subroutine for the given
!! operation.
procedure(tem_varSys_proc_getValOfIndex), pointer, intent(out) :: &
& get_valOfIndex
! -------------------------------------------------------------------------
select case(evalType)
case ('add')
! if nComp = 1, use scalar function else use vector function
if ( nComp == 1 ) then
get_point => evaluate_add_spacetime_scalarByCoordinate
get_element => evaluate_add_spacetime_scalarByTreeID
get_valOfIndex => get_valOfIndex_add_scalar_spacetime
else
get_point => evaluate_add_spacetime_vectorByCoordinate
get_element => evaluate_add_spacetime_vectorByTreeID
get_valOfIndex => get_valOfIndex_add_vector_spacetime
end if
case ('first')
! if nComp = 1, use scalar function else use vector function
if ( nComp == 1 ) then
get_point => evaluate_first_spacetime_scalarByCoordinate
get_element => evaluate_first_spacetime_scalarByTreeID
get_valOfIndex => get_valOfIndex_first_scalar_spacetime
else
get_point => evaluate_first_spacetime_vectorByCoordinate
get_element => evaluate_first_spacetime_vectorByTreeID
get_valOfIndex => get_valOfIndex_first_vector_spacetime
end if
case ('firstonly_asglobal')
! Anonymous spacetime function variable created for boundary
! or source variable assumes global shape and single st-fun
!
! if nComp = 1, use scalar function else use vector function
if ( nComp == 1 ) then
get_point => evaluate_FOAG_spacetime_scalarByCoordinate
get_element => evaluate_FOAG_spacetime_scalarByTreeID
get_valOfIndex => get_valOfIndex_FOAG_scalar_spacetime
else
get_point => evaluate_FOAG_spacetime_vectorByCoordinate
get_element => evaluate_FOAG_spacetime_vectorByTreeID
get_valOfIndex => get_valOfIndex_FOAG_vector_spacetime
end if
end select
end subroutine tem_varSys_assignEvalType