This routine returns the time reduced value for given elemPos
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_reduction_transient_type), | intent(in) | :: | me |
current time reduction |
||
integer, | intent(in) | :: | elemPos(:) |
Position of elements in global tree is same as me%val |
||
integer, | intent(in) | :: | nElems |
Number of elements to return |
||
integer, | intent(in) | :: | nDofs |
Number of degrees of freedom to return |
||
real(kind=rk), | intent(out) | :: | res(:) |
Result array |
subroutine tem_reduction_transient_getElement(me, elemPos, nElems, nDofs, res) ! -------------------------------------------------------------------- ! !> current time reduction type(tem_reduction_transient_type), intent(in) :: me !> Position of elements in global tree is same as me%val integer, intent(in) :: elemPos(:) !> Number of elements to return integer, intent(in) :: nElems !> Number of degrees of freedom to return integer, intent(in) :: nDofs !> Result array real(kind=rk), intent(out) :: res(:) ! -------------------------------------------------------------------- ! integer :: iElem, iDof, iComp integer :: eSize_val, eSize_res, offset ! -------------------------------------------------------------------- ! eSize_val = me%nComponents*me%nDofs eSize_res = me%nComponents*nDofs do iElem = 1, nElems do iDof = 1, nDofs do iComp = 1, me%nComponents offset = (iDof-1)*me%nComponents + iComp res( (iElem-1)*eSize_res + offset ) & & = me%val( (elemPos(iElem)-1)*eSize_val + offset, me%last ) end do end do end do end subroutine tem_reduction_transient_getElement