tem_create_stencil Subroutine

public subroutine tem_create_stencil(stencil, stencilKind)

This subroutine creates the required stencil.

Arguments

Type IntentOptional Attributes Name
type(tem_stencilHeader_type), intent(out) :: stencil

stencil type to be defined

character(len=*) :: stencilKind

stencil kind to decide which create function to call


Calls

proc~~tem_create_stencil~~CallsGraph proc~tem_create_stencil tem_create_stencil interface~init~22 init proc~tem_create_stencil->interface~init~22 proc~tem_abort tem_abort proc~tem_create_stencil->proc~tem_abort proc~init_ga2d_real init_ga2d_real interface~init~22->proc~init_ga2d_real mpi_abort mpi_abort proc~tem_abort->mpi_abort

Contents

Source Code


Source Code

  subroutine tem_create_stencil( stencil, stencilKind )
    ! -------------------------------------------------------------------- !
    !> stencil type to be defined
    type( tem_stencilHeader_type), intent(out) :: stencil
    !> stencil kind to decide which create function to call
    character(len=*) :: stencilKind
    ! -------------------------------------------------------------------- !

    write(logUnit(1),*) 'Creating stencil kind: '//trim(stencilKind)

    select case (trim(stencilKind))
      case ('d3q19')
        call init( me     = stencil,    &
          &        QQN    = 18,         &
          &        QQ     = 19,         &
          &        useAll = .true.,     &
          &        nDims  = 3,          &
          &        label  = 'd3q19',    &
          &        cxDir  = d3q19_cxDir )
      case ('d3q13')
        call init( me     = stencil,    &
          &        QQN    = 12,         &
          &        QQ     = 13,         &
          &        useAll = .true.,     &
          &        nDims  = 3,          &
          &        label  = 'd3q13',    &
          &        cxDir  = d3q13_cxDir )
      case ('d3q27')
        call init( me     = stencil,    &
          &        QQN    = 26,         &
          &        QQ     = 27,         &
          &        useAll = .true.,     &
          &        nDims  = 3,          &
          &        label  = 'd3q27',    &
          &        cxDir  = d3q27_cxDir )
      case ('d3q7')
        call init( me     = stencil,   &
          &        QQN    = 6,         &
          &        QQ     = 7,         &
          &        useAll = .true.,    &
          &        nDims  = 3,         &
          &        label  = 'd3q7',    &
          &        cxDir  = d3q7_cxDir )
      case ('d3q6', 'flekkoy')
        call init( me     = stencil,   &
          &        QQN    = 6,         &
          &        QQ     = 6,         &
          &        useAll = .false.,   &
          &        nDims  = 3,         &
          &        label  = 'd3q6',    &
          &        cxDir  = d3q6_cxDir )
      case ('d2q9')
        call init( me     = stencil,   &
          &        QQN    = 8,         &
          &        QQ     = 9,         &
          &        useAll = .true.,    &
          &        nDims  = 2,         &
          &        label  = 'd2q9',    &
          &        cxDir  = d2q9_cxDir )
      case ('d2q5')
        call init( me     = stencil,   &
          &        QQN    = 4,         &
          &        QQ     = 5,         &
          &        useAll = .true.,    &
          &        nDims  = 2,         &
          &        label  = 'd2q5',    &
          &        cxDir  = d2q5_cxDir )
      case ('d1q3')
        call init( me     = stencil,   &
          &        QQN    = 2,         &
          &        QQ     = 3,         &
          &        useAll = .true.,    &
          &        nDims  = 1,         &
          &        label  = 'd1q3',    &
          &        cxDir  = d1q3_cxDir )
      case ('default')
        write(logUnit(1),*) "Stencil kind Not defined yet!!"
        call tem_abort()
    end select

  end subroutine tem_create_stencil