tem_define_dimStencil Subroutine

private subroutine tem_define_dimStencil(stencil, nElems, direction)

direction.

Arguments

Type IntentOptional 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


Calls

proc~~tem_define_dimstencil~~CallsGraph proc~tem_define_dimstencil tem_define_dimStencil interface~init~22 init proc~tem_define_dimstencil->interface~init~22 proc~init_ga2d_real init_ga2d_real interface~init~22->proc~init_ga2d_real

Called by

proc~~tem_define_dimstencil~~CalledByGraph proc~tem_define_dimstencil tem_define_dimStencil proc~tem_dimbydim_construction tem_dimByDim_construction proc~tem_dimbydim_construction->proc~tem_define_dimstencil proc~tem_build_face_info tem_build_face_info proc~tem_build_face_info->proc~tem_dimbydim_construction

Contents

Source Code


Source Code

  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