constructor Function

private pure function constructor(bound_calculator, distance, thresholds) result(this)

Constructs a boundary condition object which integrates an IVP from actual boundary values to calculate the staet of the plume a little upstream. This can be used to avoid boundary layers.

Arguments

Type IntentOptional AttributesName
procedure(bound_vals) :: bound_calculator

Calculates the "actual" inflow boundary conditions, used to initiate the integration to find the values to use in the simulation.

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

The distance upstream which the plume should be integrated.

real(kind=r8), intent(in), optional dimension(:):: thresholds

The thresholds to use when evaluating the error of the integration. This is done according to the formula abs(e) / max(magnitude_y, THRESHOLDS) <= TOLERANCE.

Return Value type(upstream_plume_boundary)


Called by

proc~~constructor~16~~CalledByGraph proc~constructor~16 constructor interface~upstream_plume_boundary upstream_plume_boundary interface~upstream_plume_boundary->proc~constructor~16

Contents

Source Code


Source Code

  pure function constructor(bound_calculator, distance, thresholds) &
                                                       result(this)
    !* Author: Chris MacMackin
    !  Date: July 2017
    !
    ! Constructs a boundary condition object which integrates an IVP
    ! from actual boundary values to calculate the staet of the plume
    ! a little upstream. This can be used to avoid boundary layers.
    !
    procedure(bound_vals)                        :: bound_calculator
      !! Calculates the "actual" inflow boundary conditions, used to
      !! initiate the integration to find the values to use in the
      !! simulation.
    real(r8), intent(in)                         :: distance
      !! The distance upstream which the plume should be integrated.
    real(r8), dimension(:), optional, intent(in) :: thresholds
      !! The thresholds to use when evaluating the error of the
      !! integration. This is done according to the formula
      !! `abs(e) / max(magnitude_y, THRESHOLDS) <= TOLERANCE`.
    type(upstream_plume_boundary) :: this
    this%get_boundaries => bound_calculator
    this%distance = distance
    if (present(thresholds)) this%thresholds = thresholds
  end function constructor