newtonian_ice_viscosity Function

private function newtonian_ice_viscosity(this, velocity, temperature, time) result(viscosity)

Arguments

Type IntentOptional AttributesName
class(newtonian_viscosity), intent(in) :: this
class(vector_field), intent(in) :: velocity

The velocity field of the ice for which the velocity is being calculated

real(kind=r8), intent(in) :: temperature

The temperature of the ice for which viscosity is being calculated.

real(kind=r8), intent(in), optional :: time

The time at which the viscosity is being calculated. If not present then assumed to be same as previous value passed.

Return Value class(scalar_field), pointer

The value of the viscosity


Calls

proc~~newtonian_ice_viscosity~~CallsGraph proc~newtonian_ice_viscosity newtonian_ice_viscosity uniform_scalar_field uniform_scalar_field proc~newtonian_ice_viscosity->uniform_scalar_field

Contents


Source Code

  function newtonian_ice_viscosity(this, velocity, temperature, time) &
                                                    result(viscosity)
    class(newtonian_viscosity), intent(in) :: this
    class(vector_field), intent(in)        :: velocity
      !! The velocity field of the ice for which the velocity is
      !! being calculated
    real(r8), intent(in)                   :: temperature
      !! The temperature of the ice for which viscosity is being
      !! calculated.
    real(r8), intent(in), optional         :: time
      !! The time at which the viscosity is being calculated. If not
      !! present then assumed to be same as previous value passed.
    class(scalar_field), pointer           :: viscosity
      !! The value of the viscosity
    type(uniform_scalar_field) :: dummy
    call velocity%guard_temp()
    call dummy%allocate_scalar_field(viscosity)
    viscosity = uniform_scalar_field(this%viscosity_value)
    call viscosity%set_temp() ! Shouldn't need to call this, but for some
                              ! reason being set as non-temporary when
                              ! assignment subroutine returns.
    call velocity%clean_temp()
  end function newtonian_ice_viscosity