tem_stencil_createCxcx Subroutine

private subroutine tem_stencil_createCxcx(me)

Create cxcx for a given stencil

Arguments

Type IntentOptional Attributes Name
type(tem_stencilHeader_type) :: me

stencil


Called by

proc~~tem_stencil_createcxcx~~CalledByGraph proc~tem_stencil_createcxcx tem_stencil_createCxcx proc~init_stencilheader init_stencilHeader proc~init_stencilheader->proc~tem_stencil_createcxcx interface~init~6 init interface~init~6->proc~init_stencilheader proc~tem_loadstencil tem_loadStencil proc~tem_loadstencil->proc~init_stencilheader

Source Code

  subroutine tem_stencil_createCxcx( me )
    ! -------------------------------------------------------------------- !
    !> stencil
    type(tem_stencilHeader_type) :: me
    ! -------------------------------------------------------------------- !
    me%cxcx = 0.0_rk

    ! allocate cxcx according to dimension and compute cxcx using cxDir
    select case(me%nDims)
    case (3)
      ! create cxcx for 3D, xx, yy, zz, xy, yz, xz
      me%cxcx(1,:) = real(me%cxDir(1,:) * me%cxDir(1,:), rk)
      me%cxcx(2,:) = real(me%cxDir(2,:) * me%cxDir(2,:), rk)
      me%cxcx(3,:) = real(me%cxDir(3,:) * me%cxDir(3,:), rk)
      me%cxcx(4,:) = real(me%cxDir(1,:) * me%cxDir(2,:), rk)
      me%cxcx(5,:) = real(me%cxDir(2,:) * me%cxDir(3,:), rk)
      me%cxcx(6,:) = real(me%cxDir(1,:) * me%cxDir(3,:), rk)

    case (2)
      ! create cxcx for 2D, xx, yy, xy
      me%cxcx(1,:) = real(me%cxDir(1,:) * me%cxDir(1,:), rk)
      me%cxcx(2,:) = real(me%cxDir(2,:) * me%cxDir(2,:), rk)
      me%cxcx(3,:) = real(me%cxDir(1,:) * me%cxDir(2,:), rk)

    case (1)
      ! create cxcx for 1D, xx
      me%cxcx(1,:) = real(me%cxDir(1,:) * me%cxDir(1,:), rk)

    case default
      write( logUnit(1), "(A)" ) " Can't create cxcx for stencil " &
        &                        // trim(me%label)                 &
        &                        // ", as dimension not defined!"

    end select

  end subroutine tem_stencil_createCxcx