upstream_info Subroutine

private subroutine upstream_info(this, location, bound_type, bound_depth)

Indicates that the lower boundary is Dirichlet and the upper boundary is Neumann.

Arguments

Type IntentOptional AttributesName
class(upstream_plume_boundary), intent(in) :: this
integer, intent(in) :: location

Which boundary information is to be provided for. The boundary will be the one normal to dimension of number abs(boundary). If the argument is negative, then the lower boundary is returned. If positive, then the upper boundary is returned.

integer, intent(out) :: bound_type

An integer representing what sort of boundary condition is used. The integer value corresponding to each boundary type is specified in the boundary_types_mod.

integer, intent(out) :: bound_depth

The number of layers of data-points needed to specify the boundary condition.


Contents

Source Code


Source Code

  subroutine upstream_info(this, location, bound_type, bound_depth)
    !* Author: Chris MacMackin
    !  Date: July 2017
    !
    ! Indicates that the lower boundary is Dirichlet and the upper
    ! boundary is Neumann.
    !
    class(upstream_plume_boundary), intent(in) :: this
    integer, intent(in)                        :: location
      !! Which boundary information is to be provided for.  The
      !! boundary will be the one normal to dimension of number
      !! `abs(boundary)`. If the argument is negative, then the lower
      !! boundary is returned. If positive, then the upper boundary is
      !! returned.
    integer, intent(out)                       :: bound_type
      !! An integer representing what sort of boundary condition is
      !! used. The integer value corresponding to each boundary type is
      !! specified in the [[boundary_types_mod]].
    integer, intent(out)                       :: bound_depth
      !! The number of layers of data-points needed to specify the
      !! boundary condition.
    select case(location)
    case(-1)
      bound_type = dirichlet
      bound_depth = 1
    case(1)
      bound_type = neumann
      bound_depth = 1
    case default
      bound_type = free_boundary
      bound_depth = 0
    end select
  end subroutine upstream_info