quadrature_octant_weight Function

private function quadrature_octant_weight(quad_type, i, j, k) result(w_ijk)

Returns first-octant normalized weights. Full-space weights are w_ijk*pi/2.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: quad_type
integer, intent(in) :: i
integer, intent(in) :: j
integer, intent(in) :: k

Return Value real(kind=rk)


Source Code

   real(rk) function quadrature_octant_weight(quad_type, i, j, k) result(w_ijk)
      character(len=*), intent(in) :: quad_type
      integer, intent(in) :: i, j, k

      select case (quad_type)
      case ('s2', 'S2')
         w_ijk = 1.0_rk
      case ('s4', 'S4')
         w_ijk = 0.333333333333_rk
      case ('s6', 'S6')
         if ((i == 1 .and. j == 1 .and. k == 3) .or. &
             (i == 1 .and. j == 3 .and. k == 1) .or. &
             (i == 3 .and. j == 1 .and. k == 1)) then
            w_ijk = 0.1761263_rk
         else
            w_ijk = 0.1572071_rk
         end if
      case ('s8', 'S8')
         if ((i == 1 .and. j == 1 .and. k == 4) .or. &
             (i == 1 .and. j == 4 .and. k == 1) .or. &
             (i == 4 .and. j == 1 .and. k == 1)) then
            w_ijk = 0.1209877_rk
         else if (i == 2 .and. j == 2 .and. k == 2) then
            w_ijk = 0.0925926_rk
         else
            w_ijk = 0.0907407_rk
         end if
      case default
         call fatal_error('dom', 'Unsupported DOM quadrature type in weight lookup')
      end select
   end function quadrature_octant_weight