Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nlayer | |||
real(kind=r64), | intent(in) | :: | W | |||
real(kind=r64), | intent(in) | :: | H | |||
real(kind=r64), | dimension(maxlay) | :: | DCoeff | |||
real(kind=r64), | intent(in), | dimension(MaxGap) | :: | NonDeflectedGapWidth | ||
real(kind=r64), | intent(in), | dimension(MaxGap) | :: | DeflectedGapWidthMax | ||
real(kind=r64), | intent(out), | dimension(MaxGap) | :: | DeflectedGapWidthMean | ||
real(kind=r64), | intent(out), | dimension(maxlay) | :: | LayerDeflection |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
subroutine DeflectionWidths(nlayer, W, H, DCoeff, NonDeflectedGapWidth, DeflectedGapWidthMax, DeflectedGapWidthMean, &
LayerDeflection)
!INPUT
integer, intent(in) :: nlayer
real(r64), intent(in) :: W, H
real(r64), dimension(MaxGap), intent(in) :: NonDeflectedGapWidth
real(r64), dimension(MaxGap), intent(in) :: DeflectedGapWidthMax
real(r64), dimension(maxlay) :: DCoeff
!OUTPUT
real(r64), dimension(maxlay), intent(out) :: LayerDeflection
real(r64), dimension(MaxGap), intent(out) :: DeflectedGapWidthMean
!integer, intent(inout) :: nperr
!character*(*) :: ErrorMessage
!LOCALS
integer :: i, j
real(r64) :: nominator, denominator, SumL
real(r64) :: MaxLDSum, MeanLDSum, Ratio
i = 0
j = 0
Ratio = 0.0d0
MeanLDSum = 0.0d0
MaxLDSum = 0.0d0
nominator = 0.0d0
do i = 1, nlayer - 1
SumL = 0.0d0
do j = i, nlayer - 1
SumL = SumL + NonDeflectedGapWidth(j) - DeflectedGapWidthMax(j)
end do
nominator = nominator + SumL * DCoeff(i)
end do
denominator = 0.0d0
do i = 1, nlayer
denominator = denominator + DCoeff(i)
end do
LayerDeflection(nlayer) = nominator / denominator
do i = nlayer - 1, 1, -1
LayerDeflection(i) = DeflectedGapWidthMax(i) - NonDeflectedGapWidth(i) + LayerDeflection(i + 1)
end do
MaxLDSum = LDSumMax(W, H)
MeanLDSum = LDSumMean(W, H)
Ratio = MeanLDSum / MaxLDSum
do i = 1, nlayer - 1
DeflectedGapWidthMean(i) = NonDeflectedGapWidth(i) + Ratio * (DeflectedGapWidthMax(i) - NonDeflectedGapWidth(i))
end do
return
end subroutine DeflectionWidths