ResetBoundaryConditionType_Mesh2D_t Subroutine

public subroutine ResetBoundaryConditionType_Mesh2D_t(this, bcid)

This method can be used to reset all of the boundary elements boundary condition type to the desired value.

Note that ALL physical boundaries will be set to have this boundary condition

Arguments

TypeIntentOptionalAttributesName
class(Mesh2D_t), intent(inout) :: this
integer, intent(in) :: bcid

Contents


Source Code

  subroutine ResetBoundaryConditionType_Mesh2D_t(this,bcid)
    !! This method can be used to reset all of the boundary elements
    !! boundary condition type to the desired value.
    !!
    !! Note that ALL physical boundaries will be set to have this boundary
    !! condition
    implicit none
    class(Mesh2D_t),intent(inout) :: this
    integer,intent(in) :: bcid
    ! Local
    integer :: iSide,iEl,e2
    logical :: skipMortars

    skipMortars = this%nMortars > 0

    do iEl = 1,this%nElem
      do iSide = 1,4

        e2 = this%sideInfo(3,iSide,iEl)

        ! Mortar sides carry sideInfo(3) = 0 but are interior faces, with sideInfo(1)
        ! holding the mortar index; they never take a physical boundary condition. The
        ! HOPr reader copies sideInfo(1) verbatim from the file, where it is the HOPr
        ! side type and may be nonzero on an ordinary face, so sideInfo(1) is only a
        ! mortar marker on a mesh that actually carries mortars. Same test as the
        ! unmapped-boundary scan in SELF_DGModel{2,3}D_t.
        if(e2 == 0 .and. .not.(skipMortars .and. this%sideInfo(1,iSide,iEl) /= 0)) then
          this%sideInfo(5,iSide,iEl) = bcid
        endif

      enddo
    enddo

    call this%UpdateDevice()

  endsubroutine ResetBoundaryConditionType_Mesh2D_t