tem_spatial_vector_storeVal Subroutine

private subroutine tem_spatial_vector_storeVal(me, coord, nVals, iLevel, nComps)

This routine evaluate vector spatial function and store its value in growing array with access Array Of Structure pattern (iVal-1)*nComps + iComp

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

integer, intent(in) :: nComps

number of components per returned value


Calls

proc~~tem_spatial_vector_storeval~~CallsGraph proc~tem_spatial_vector_storeval tem_spatial_vector_storeVal interface~append~24 append proc~tem_spatial_vector_storeval->interface~append~24 interface~tem_spatial_for tem_spatial_for proc~tem_spatial_vector_storeval->interface~tem_spatial_for interface~truncate~18 truncate proc~tem_spatial_vector_storeval->interface~truncate~18 proc~append_arrayga2d_real append_arrayga2d_real interface~append~24->proc~append_arrayga2d_real proc~append_singlega2d_real append_singlega2d_real interface~append~24->proc~append_singlega2d_real proc~tem_spatial_for_coord tem_spatial_for_coord interface~tem_spatial_for->proc~tem_spatial_for_coord 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_coord tem_spatial_vector_for_coord interface~tem_spatial_for->proc~tem_spatial_vector_for_coord 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_treeids tem_spatial_vector_for_treeIDs interface~tem_spatial_for->proc~tem_spatial_vector_for_treeids proc~truncate_ga_char truncate_ga_char interface~truncate~18->proc~truncate_ga_char

Called by

proc~~tem_spatial_vector_storeval~~CalledByGraph proc~tem_spatial_vector_storeval tem_spatial_vector_storeVal interface~tem_spatial_storeval tem_spatial_storeVal interface~tem_spatial_storeval->proc~tem_spatial_vector_storeval proc~setup_indices_spacetime setup_indices_spacetime proc~setup_indices_spacetime->interface~tem_spatial_storeval

Source Code

  subroutine tem_spatial_vector_storeVal( me, coord, nVals, iLevel, nComps )
    ! -------------------------------------------------------------------- !
    !> spatial type for given boundary state
    type(tem_spatial_type), intent(inout) :: me
    !> number of return values
    integer, intent(in) :: nVals
    !> number of components per returned value
    integer, intent(in) :: nComps
    !> 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, nComps)
    integer :: iVal
    ! -------------------------------------------------------------------- !

    ! 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, &
        &                        nComp = nComps )

      ! Append evaluated values in 1D growing array with AOS acces
      do iVal = 1, nVals
        call append( me     = me%valOnLvl(iLevel)%evalVal, &
          &          val    = evalVal(iVal,:),             &
          &          length = nVals * nComps               )
      end do

      call truncate(me = me%valOnLvl(iLevel)%evalVal)
    else
      me%isStored = .false.
    end if


  end subroutine tem_spatial_vector_storeVal