14 implicit none ;
private 29 integer,
intent(in) :: N
30 real,
dimension(N),
intent(in) :: h
31 real,
dimension(N),
intent(in) :: u
32 real,
dimension(N,2),
intent(inout) :: ppoly_E
33 real,
dimension(N,3),
intent(inout) :: ppoly_coefficients
36 real :: edge_l, edge_r
48 ppoly_coefficients(k,1) = edge_l
49 ppoly_coefficients(k,2) = 4.0 * ( u(k) - edge_l ) + 2.0 * ( u(k) - edge_r )
50 ppoly_coefficients(k,3) = 3.0 * ( ( edge_r - u(k) ) + ( edge_l - u(k) ) )
60 integer,
intent(in) :: N
61 real,
dimension(N),
intent(in) :: h
62 real,
dimension(N),
intent(in) :: u
63 real,
dimension(N,2),
intent(inout) :: ppoly_E
67 real :: edge_l, edge_r
88 if ( (u_r - u_c)*(u_c - u_l) <= 0.0)
then 93 expr1 = 3.0 * (edge_r - edge_l) * ( (u_c - edge_l) + (u_c - edge_r))
94 expr2 = (edge_r - edge_l) * (edge_r - edge_l)
95 if ( expr1 > expr2 )
then 97 edge_l = u_c + 2.0 * ( u_c - edge_r )
98 edge_l = max( min( edge_l, max(u_l, u_c) ), min(u_l, u_c) )
99 elseif ( expr1 < -expr2 )
then 101 edge_r = u_c + 2.0 * ( u_c - edge_l )
102 edge_r = max( min( edge_r, max(u_r, u_c) ), min(u_r, u_c) )
107 if ( abs( edge_r - edge_l )<max(1.e-60,epsilon(u_c)*abs(u_c)) )
then 112 ppoly_e(k,1) = edge_l
113 ppoly_e(k,2) = edge_r
153 integer,
intent(in) :: N
154 real,
dimension(:),
intent(in) :: h
155 real,
dimension(:),
intent(in) :: u
156 real,
dimension(:,:),
intent(inout) :: ppoly_E
157 real,
dimension(:,:),
intent(inout) :: ppoly_coefficients
179 b = ppoly_coefficients(i1,2)
184 slope = 2.0 * ( u1 - u0 )
185 if ( abs(u1_r) .GT. abs(slope) )
then 196 u0_l = 3.0 * u0 + 0.5 * u1_r - 2.0 * u0_r
199 exp1 = (u0_r - u0_l) * (u0 - 0.5*(u0_l+u0_r))
200 exp2 = (u0_r - u0_l) * (u0_r - u0_l) / 6.0
202 if ( exp1 .GT. exp2 )
then 203 u0_l = 3.0 * u0 - 2.0 * u0_r
206 if ( exp1 .LT. -exp2 )
then 207 u0_r = 3.0 * u0 - 2.0 * u0_l
214 b = 6.0 * u0 - 4.0 * u0_l - 2.0 * u0_r
215 c = 3.0 * ( u0_r + u0_l - 2.0 * u0 )
217 ppoly_coefficients(i0,1) = a
218 ppoly_coefficients(i0,2) = b
219 ppoly_coefficients(i0,3) = c
231 b = ppoly_coefficients(i0,2)
232 c = ppoly_coefficients(i0,3)
237 slope = 2.0 * ( u1 - u0 )
238 if ( abs(u1_l) .GT. abs(slope) )
then 249 u0_r = 3.0 * u1 - 0.5 * u1_l - 2.0 * u0_l
252 exp1 = (u0_r - u0_l) * (u1 - 0.5*(u0_l+u0_r))
253 exp2 = (u0_r - u0_l) * (u0_r - u0_l) / 6.0
255 if ( exp1 .GT. exp2 )
then 256 u0_l = 3.0 * u1 - 2.0 * u0_r
259 if ( exp1 .LT. -exp2 )
then 260 u0_r = 3.0 * u1 - 2.0 * u0_l
267 b = 6.0 * u1 - 4.0 * u0_l - 2.0 * u0_r
268 c = 3.0 * ( u0_r + u0_l - 2.0 * u1 )
270 ppoly_coefficients(i1,1) = a
271 ppoly_coefficients(i1,2) = b
272 ppoly_coefficients(i1,3) = c
subroutine, public check_discontinuous_edge_values(N, u, edge_values)
Provides functions used with the Piecewise-Parabolic-Method in the vertical ALE algorithm.
subroutine ppm_limiter_standard(N, h, u, ppoly_E)
Adjusts edge values using the standard PPM limiter (Colella & Woodward, JCP 1984) after first checkin...
real, parameter h_neglect
A tiny width that is so small that adding it to cell widths does not change the value due to a comput...
subroutine, public ppm_reconstruction(N, h, u, ppoly_E, ppoly_coefficients)
Builds quadratic polynomials coefficients from cell mean and edge values.
subroutine, public bound_edge_values(N, h, u, edge_values)
subroutine, public ppm_boundary_extrapolation(N, h, u, ppoly_E, ppoly_coefficients)