tem_varSys_assignEvalType Subroutine

private subroutine tem_varSys_assignEvalType(evaltype, nComp, get_point, get_element, get_valOfIndex)

Returns the get_point and get_element pointer according to the requested evaluation type.

Arguments

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


Called by

proc~~tem_varsys_assignevaltype~~CalledByGraph proc~tem_varsys_assignevaltype tem_varSys_assignEvalType proc~tem_varsys_append_stfun_raw tem_varSys_append_stFun_raw proc~tem_varsys_append_stfun_raw->proc~tem_varsys_assignevaltype proc~tem_varsys_append_stfunvar tem_varSys_append_stFunVar proc~tem_varsys_append_stfunvar->proc~tem_varsys_assignevaltype interface~tem_varsys_append_stfun tem_varSys_append_stfun interface~tem_varsys_append_stfun->proc~tem_varsys_append_stfun_raw interface~tem_varsys_append_stfun->proc~tem_varsys_append_stfunvar proc~tem_variable_loadmapping_single tem_variable_loadMapping_single proc~tem_variable_loadmapping_single->interface~tem_varsys_append_stfun proc~tem_varsys_append_luavar tem_varSys_append_luaVar proc~tem_varsys_append_luavar->interface~tem_varsys_append_stfun interface~tem_variable_loadmapping tem_variable_loadMapping interface~tem_variable_loadmapping->proc~tem_variable_loadmapping_single proc~tem_variable_loadmapping_vector tem_variable_loadMapping_vector proc~tem_variable_loadmapping_vector->proc~tem_variable_loadmapping_single

Source Code

  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