bc_set_GetSideDirByNormal Subroutine

private impure subroutine bc_set_GetSideDirByNormal(this, normal, side, dir)

Type Bound

bc_set

Arguments

Type IntentOptional Attributes Name
class(bc_set), intent(in) :: this

Boundary conditions utility

character(len=*), intent(in) :: normal

String denoting the normal direction

integer, intent(out) :: side

Side (=BC_LEFT,BC_RIGHT)

integer, intent(out) :: dir

Direction (=1,2,3,)


Called by

proc~~bc_set_getsidedirbynormal~~CalledByGraph proc~bc_set_getsidedirbynormal bc_set%bc_set_GetSideDirByNormal proc~bc_set_add bc_set%bc_set_Add proc~bc_set_add->proc~bc_set_getsidedirbynormal proc~bc_set_read bc_set%bc_set_Read proc~bc_set_read->proc~bc_set_add

Source Code

    impure subroutine bc_set_GetSideDirByNormal(this,normal,side,dir)
      ! Finds the direction and side from a string containing the normal direction.
      class(bc_set),    intent(in) :: this                                     !! Boundary conditions utility
      character(len=*), intent(in) :: normal                                   !! String denoting the normal direction
      integer,          intent(out):: dir                                      !! Direction (=1,2,3,)
      integer,          intent(out):: side                                     !! Side (=BC_LEFT,BC_RIGHT)

      select case (trim(adjustl(normal)))
      case ('+x1','+X1','+x','+X')
        dir = 1; side = BC_LEFT
      case ('-x1','-X1','-x','-X')
        dir = 1; side = BC_RIGHT
      case ('+x2','+X2','+y','+Y')
        dir = 2; side = BC_LEFT
      case ('-x2','-X2','-y','-Y')
        dir = 2; side = BC_RIGHT
      case ('+x3','+X3','+z','+Z')
        dir = 3; side = BC_LEFT
      case ('-x3','-X3','-z','-Z')
        dir = 3; side = BC_RIGHT
      case default
        call this%parallel%Stop("Invalid value for BC normal")
      end select

      return
    end subroutine bc_set_GetSideDirByNormal