Thickness-weighted two-cell interface value — the non-uniform
generalisation of 0.5*(q_l + q_r).
For a profile linear in z the cell means sit at the cell CENTRES,
which are (h_l + h_r)/2 apart, and the shared interface is h_l/2
above the left centre; the weights h_r/(h_l+h_r), h_l/(h_l+h_r)
are exactly that interpolation. Used where CW84 (1.6) has no
stencil — the 1|2 and (nz-1)|nz edges.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | h_l |
Thickness of the cell below the interface. |
||
| real(kind=wp), | intent(in) | :: | h_r |
Thickness of the cell above the interface. |
||
| real(kind=wp), | intent(in) | :: | q_l |
Cell mean below. |
||
| real(kind=wp), | intent(in) | :: | q_r |
Cell mean above. |
||
| real(kind=wp), | intent(out) | :: | edge |
Interface value. |
pure subroutine ppm_edge_two_cell(h_l, h_r, q_l, q_r, edge) !$acc routine seq !! Thickness-weighted two-cell interface value — the non-uniform !! generalisation of `0.5*(q_l + q_r)`. !! !! For a profile linear in `z` the cell means sit at the cell CENTRES, !! which are `(h_l + h_r)/2` apart, and the shared interface is `h_l/2` !! above the left centre; the weights `h_r/(h_l+h_r)`, `h_l/(h_l+h_r)` !! are exactly that interpolation. Used where CW84 (1.6) has no !! stencil — the `1|2` and `(nz-1)|nz` edges. real(wp), intent(in) :: h_l !! Thickness of the cell below the interface. real(wp), intent(in) :: h_r !! Thickness of the cell above the interface. real(wp), intent(in) :: q_l !! Cell mean below. real(wp), intent(in) :: q_r !! Cell mean above. real(wp), intent(out) :: edge !! Interface value. edge = (q_l*h_r + q_r*h_l)/(h_l + h_r + H_DIV_EPS) end subroutine ppm_edge_two_cell