constructor Function

private pure function constructor(b_val, index) result(this)

Instantiates an instance of a viscosity object implementing Glen's flow law.

Arguments

Type IntentOptional AttributesName
real(kind=r8), intent(in) :: b_val

The coefficient, , in Glen's flow law.

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

The index, , in the exponent of Glen's flow law.

Return Value type(glens_law_viscosity)

The viscosity object being created.


Called by

proc~~constructor~20~~CalledByGraph proc~constructor~20 constructor interface~glens_law_viscosity glens_law_viscosity interface~glens_law_viscosity->proc~constructor~20

Contents

Source Code


Source Code

  pure function constructor(b_val, index) result(this)
    !* Author: Christopher MacMackin
    !  Date: April 2017
    !
    ! Instantiates an instance of a viscosity object implementing
    ! Glen's flow law.
    !
    real(r8), intent(in) :: b_val
      !! The coefficient, \(B\), in Glen's flow law.
    real(r8), intent(in) :: index
      !! The index, \(n\), in the exponent of Glen's flow law.
    type(glens_law_viscosity) :: this
      !! The viscosity object being created.
    this%b_val = b_val
    this%index = index
  end function constructor