This routine evaluate vector spatial function and store its value in growing array with access Array Of Structure pattern (iVal-1)*nComps + iComp
Type | Intent | Optional | 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 |
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