Imposes boundary conditions for a vector field. For symmetry BC, the sign depends is 'plus' or 'minus' depending on the alignment between the vector component and the symmetry direction.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(bc_set), | intent(in) | :: | this |
Boundary conditions utility |
||
| type(eulerian_obj_r), | intent(inout) | :: | var(3) |
Eulerian variable |
impure subroutine bc_set_UpdateBoundaryVector(this,var) !> Imposes boundary conditions for a vector field. ! For symmetry BC, the sign depends is 'plus' or 'minus' ! depending on the alignment between the vector component ! and the symmetry direction. class(bc_set), intent(in) :: this !! Boundary conditions utility type(eulerian_obj_r), intent(inout) :: var(3) !! Eulerian variable ! Work variables logical :: found(3) integer :: n integer :: dir integer :: BC_dir integer :: BC_side if (.not.allocated(this%region)) return do n=1,this%count do dir=1,3 ! Check Whether we have a BC for this variable on this region found(dir) = this%CheckBCExists(this%region(n)%name,var(dir)%name) if (.not.found(dir)) cycle select case (this%GetBCType(this%region(n)%name,var(dir)%name)) case (BC_DIRICHLET) call this%UpdateBoundaryDirichlet(this%region(n)%name,var(dir)) case (BC_NEUMANN ) call this%UpdateBoundaryNeumann (this%region(n)%name,var(dir)) case (BC_SYMMETRY ) ! Get direction and side of BC call this%GetSideDirByRegion(this%region(n)%name,BC_side,BC_dir) if (BC_dir.eq.dir) then call this%UpdateBoundarySymmetryMINUS(this%region(n)%name,var(dir)) else call this%UpdateBoundarySymmetryPLUS (this%region(n)%name,var(dir)) end if end select end do end do do dir=1,3 if (this%count.ne.0.and. (.not.found(dir))) & call this%parallel%Stop('Unable to find any boundary conditions for variable '//trim(adjustl(var(dir)%name))) end do do dir=1,3 call var(dir)%UpdateGhostCells() end do return end subroutine bc_set_UpdateBoundaryVector