upstream_temperature_bound Function

private function upstream_temperature_bound(this, location) result(bound)

Returns a field containing the temperature boundary values for the specified boundary location.

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.

Return Value class(scalar_field), pointer


Calls

proc~~upstream_temperature_bound~~CallsGraph proc~upstream_temperature_bound upstream_temperature_bound uniform_scalar_field uniform_scalar_field proc~upstream_temperature_bound->uniform_scalar_field

Contents


Source Code

  function upstream_temperature_bound(this, location) result(bound)
    !* Author: Chris MacMackin
    !  Date: July 2017
    !
    ! Returns a field containing the temperature boundary values for
    ! the specified boundary location.
    !
    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.
    class(scalar_field), pointer               :: bound
    call dummy%allocate_scalar_field(bound)
    select case(location)
    case(-1)
      bound = uniform_scalar_field(this%temperature)
    case(1)
      bound = uniform_scalar_field(0._r8)
    case default
      bound = uniform_scalar_field(0._r8)
    end select
    call bound%set_temp() ! Shouldn't need to call this, but for some
                          ! reason being set as non-temporary when
                          ! assignment subroutine returns.
  end function upstream_temperature_bound