boundary_residuals Function

private function boundary_residuals(this, thickness, velocity, viscosity, t) result(residuals)

Default implementation of the boundary_residuals method. It returns a zero-length array, effectively indicating free boundaries.

Arguments

Type IntentOptional AttributesName
class(glacier_boundary), intent(in) :: this
class(scalar_field), intent(in) :: thickness

A field containing the thickness of the glacier

class(vector_field), intent(in) :: velocity

A field containing the flow velocity of the glacier

class(scalar_field), intent(in) :: viscosity

A field containing the viscosity of the ice in the glacier.

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

The time at which the boundary conditions are to be calculated.

Return Value real(kind=r8), allocatable,dimension(:)

An array containing the difference between the required boundary values and those which are actually present. They are stored in the order: lower thickness boundary, upper thickness boundary, lower velocity boundary, and upper velocity boundary.


Contents

Source Code


Source Code

  function boundary_residuals(this, thickness, velocity, viscosity, t) &
                                 result(residuals)
    !* Author: Chris MacMackin
    !  Date: September 2016
    !
    ! Default implementation of the
    ! [[glacier_boundary(type):boundary_residuals]]
    ! method. It returns a zero-length array, effectively indicating free
    ! boundaries.
    !
    class(glacier_boundary), intent(in) :: this
    class(scalar_field), intent(in)     :: thickness
      !! A field containing the thickness of the glacier
    class(vector_field), intent(in)     :: velocity
      !! A field containing the flow velocity of the glacier
    class(scalar_field), intent(in)     :: viscosity
      !! A field containing the viscosity of the ice in the glacier.
    real(r8), intent(in)                :: t
      !! The time at which the boundary conditions are to be
      !! calculated.
    real(r8), allocatable, dimension(:) :: residuals
      !! An array containing the difference between the required
      !! boundary values and those which are actually present. They
      !! are stored in the order: lower thickness boundary, upper
      !! thickness boundary, lower velocity boundary, and upper
      !! velocity boundary.
    allocate(residuals(0))
  end function boundary_residuals