tem_spatial_scalar_storeVal Subroutine

private subroutine tem_spatial_scalar_storeVal(me, coord, nVals, iLevel)

This routine evaluate scalar spatial function and store its value in growing array

Arguments

Type IntentOptional Attributes Name
type(tem_spatial_type), intent(inout) :: me

spatial type for given boundary state

real(kind=rk), intent(in) :: coord(nVals,3)

barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates

integer, intent(in) :: nVals

number of return values

integer, intent(in) :: iLevel

Level to which the evaluated values to be stored


Calls

proc~~tem_spatial_scalar_storeval~~CallsGraph proc~tem_spatial_scalar_storeval tem_spatial_scalar_storeVal interface~tem_spatial_for tem_spatial_for proc~tem_spatial_scalar_storeval->interface~tem_spatial_for interface~append~23 append proc~tem_spatial_scalar_storeval->interface~append~23 interface~truncate~17 truncate proc~tem_spatial_scalar_storeval->interface~truncate~17 proc~tem_spatial_for_treeids tem_spatial_for_treeIDs interface~tem_spatial_for->proc~tem_spatial_for_treeids proc~tem_spatial_scalar_for_index tem_spatial_scalar_for_index interface~tem_spatial_for->proc~tem_spatial_scalar_for_index proc~tem_spatial_vector_for_index tem_spatial_vector_for_index interface~tem_spatial_for->proc~tem_spatial_vector_for_index proc~tem_spatial_vector_for_coord tem_spatial_vector_for_coord interface~tem_spatial_for->proc~tem_spatial_vector_for_coord proc~tem_spatial_vector_for_treeids tem_spatial_vector_for_treeIDs interface~tem_spatial_for->proc~tem_spatial_vector_for_treeids proc~tem_spatial_for_coord tem_spatial_for_coord interface~tem_spatial_for->proc~tem_spatial_for_coord proc~append_arrayga2d_real append_arrayga2d_real interface~append~23->proc~append_arrayga2d_real proc~append_singlega2d_real append_singlega2d_real interface~append~23->proc~append_singlega2d_real proc~truncate_ga_char truncate_ga_char interface~truncate~17->proc~truncate_ga_char

Called by

proc~~tem_spatial_scalar_storeval~~CalledByGraph proc~tem_spatial_scalar_storeval tem_spatial_scalar_storeVal interface~tem_spatial_storeval tem_spatial_storeVal interface~tem_spatial_storeval->proc~tem_spatial_scalar_storeval proc~setup_indices_spacetime setup_indices_spacetime proc~setup_indices_spacetime->interface~tem_spatial_storeval

Contents


Source Code

  subroutine tem_spatial_scalar_storeVal( me, coord, nVals, iLevel )
    ! -------------------------------------------------------------------- !
    !> spatial type for given boundary state
    type(tem_spatial_type), intent(inout) :: me
    !> number of return values
    integer, intent(in) :: nVals
    !> barycentric Ids of an elements.
    !! 1st index goes over number of elements and
    !! 2nd index goes over x,y,z coordinates
    real(kind=rk), intent(in) :: coord(nVals,3)
    !> Level to which the evaluated values to be stored
    integer, intent(in) :: iLevel
    ! -------------------------------------------------------------------- !
    real(kind=rk) :: evalVal(nVals)
    ! -------------------------------------------------------------------- !

    ! Do not store value for const or none
    if (trim(me%kind) /= 'const' .or. trim(me%kind) /= 'none') then

      me%isStored = .true.

      evalVal = tem_spatial_for( me    = me,    &
        &                        coord = coord, &
        &                        n     = nVals  )

      call append( me     = me%valOnLvl(iLevel)%evalVal, &
        &          val    = evalVal,                     &
        &          length = nVals                        )

      call truncate(me = me%valOnLvl(iLevel)%evalVal)

    else

      me%isStored = .false.

    end if

  end subroutine tem_spatial_scalar_storeVal