direction.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_stencilHeader_type), | intent(inout) | :: | stencil |
The stencil layout to set. |
||
integer, | intent(in) | :: | nElems |
The number of elements which share this stencil |
||
integer, | intent(in) | :: | direction |
The spatial direction: 1 -> x direction 2 -> y direction 3 -> z direction |
subroutine tem_define_dimStencil( stencil, nElems, direction)
! --------------------------------------------------------------------------
!> The stencil layout to set.
type(tem_stencilHeader_type), intent(inout) :: stencil
!> The number of elements which share this stencil
integer, intent(in) :: nElems
!> The spatial direction:
!! 1 -> x direction
!! 2 -> y direction
!! 3 -> z direction
integer, intent(in) :: direction
! --------------------------------------------------------------------------
integer :: iElem, offsetIndex
! --------------------------------------------------------------------------
stencil%useAll = .true.
stencil%nElems = nElems
call init( me = stencil%elem, length = 0 )
stencil%QQN = 2
stencil%QQ = 2
allocate( stencil%cxDir(3, 2) )
allocate( stencil%cxDirInv(2) )
do iElem = 1,2
offsetIndex = (iElem-1)*3 + direction
stencil%cxDir(1:3, iElem) = qOffset(offsetIndex, 1:3)
stencil%cxDirInv(iElem) = qInvDir(offsetIndex)
end do
end subroutine tem_define_dimStencil