Adds a new region to bc_set.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(bc_set), | intent(inout) | :: | this |
Boundary conditions utility |
||
| character(len=*), | intent(in) | :: | name |
Name of region |
||
| real(kind=wp), | intent(in) | :: | xlo(3) |
Position of lower left corner |
||
| real(kind=wp), | intent(in) | :: | xhi(3) |
Position of upper right corner |
||
| character(len=*), | intent(in) | :: | normal |
Oriented normal |
impure subroutine bc_set_Add(this,name,xlo,xhi,normal) !> Adds a new region to bc_set. class(bc_set), intent(inout) :: this !! Boundary conditions utility character(len=*), intent(in) :: name !! Name of region real(wp), intent(in) :: xlo(3) !! Position of lower left corner real(wp), intent(in) :: xhi(3) !! Position of upper right corner character(len=*), intent(in) :: normal !! Oriented normal ! Work variables integer :: side integer :: dir logical :: is_valid ! Check that region bounds are valid is_valid = this%CheckBounds(xlo,xhi) if (.not. is_valid) call this%parallel%Stop("Invalid boundary region: "//trim(adjustl(name))) ! First resize array to accomodate a new element call this%Expand() ! Get side and direction from normal call this%GetSideDirByNormal(normal,side,dir) ! Initialize new region call this%region(this%count)%Initialize(name, xlo, xhi, dir, side) ! Add to hash table call this%tbl%Put(key=this%tbl%HashString(name),val=this%count) ! Update the extents call this%UpdateExtents(name) return end subroutine bc_set_Add