simple_temperature_bound Function

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

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

Arguments

Type IntentOptional AttributesName
class(simple_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~~simple_temperature_bound~~CallsGraph proc~simple_temperature_bound simple_temperature_bound uniform_scalar_field uniform_scalar_field proc~simple_temperature_bound->uniform_scalar_field

Contents


Source Code

  function simple_temperature_bound(this, location) result(bound)
    !* Author: Chris MacMackin
    !  Date: March 2017
    !
    ! Returns a field containing the temperature boundary values for
    ! the specified boundary location.
    !
    class(simple_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 simple_temperature_bound