\hypertarget{namespaceppm__functions}{}\section{ppm\+\_\+functions Module Reference}
\label{namespaceppm__functions}\index{ppm\+\_\+functions@{ppm\+\_\+functions}}


\subsection{Detailed Description}
Provides functions used with the Piecewise-\/\+Parabolic-\/\+Method in the vertical A\+LE algorithm. \subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine, public \hyperlink{namespaceppm__functions_a5c4e47be75ad413904902582b3d0d4a4}{ppm\+\_\+reconstruction} (N, h, u, edge\+\_\+values, ppoly\+\_\+coef, h\+\_\+neglect, answers\+\_\+2018)
\begin{DoxyCompactList}\small\item\em Builds quadratic polynomials coefficients from cell mean and edge values. \end{DoxyCompactList}\item 
subroutine \hyperlink{namespaceppm__functions_a3d365f4992a6d3b5cbcaca630c502b95}{ppm\+\_\+limiter\+\_\+standard} (N, h, u, edge\+\_\+values, h\+\_\+neglect, answers\+\_\+2018)
\begin{DoxyCompactList}\small\item\em Adjusts edge values using the standard P\+PM limiter (Colella \& Woodward, J\+CP 1984) after first checking that the edge values are bounded by neighbors cell averages and that the edge values are monotonic between cell averages. \end{DoxyCompactList}\item 
subroutine, public \hyperlink{namespaceppm__functions_ac8f382eb9d1f0df80aab9e07eb2ceebe}{ppm\+\_\+boundary\+\_\+extrapolation} (N, h, u, edge\+\_\+values, ppoly\+\_\+coef, h\+\_\+neglect)
\begin{DoxyCompactList}\small\item\em Reconstruction by parabolas within boundary cells. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
real, parameter \hyperlink{namespaceppm__functions_a86e3d1a796b4934167d563eda5310a0e}{hneglect\+\_\+dflt} = 1.E-\/30
\begin{DoxyCompactList}\small\item\em A tiny width that is so small that adding it to cell widths does not change the value due to a computational representation. It is used to avoid division by zero. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespaceppm__functions_ac8f382eb9d1f0df80aab9e07eb2ceebe}\label{namespaceppm__functions_ac8f382eb9d1f0df80aab9e07eb2ceebe}} 
\index{ppm\+\_\+functions@{ppm\+\_\+functions}!ppm\+\_\+boundary\+\_\+extrapolation@{ppm\+\_\+boundary\+\_\+extrapolation}}
\index{ppm\+\_\+boundary\+\_\+extrapolation@{ppm\+\_\+boundary\+\_\+extrapolation}!ppm\+\_\+functions@{ppm\+\_\+functions}}
\subsubsection{\texorpdfstring{ppm\+\_\+boundary\+\_\+extrapolation()}{ppm\_boundary\_extrapolation()}}
{\footnotesize\ttfamily subroutine, public ppm\+\_\+functions\+::ppm\+\_\+boundary\+\_\+extrapolation (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{N,  }\item[{real, dimension(\+:), intent(in)}]{h,  }\item[{real, dimension(\+:), intent(in)}]{u,  }\item[{real, dimension(\+:,\+:), intent(inout)}]{edge\+\_\+values,  }\item[{real, dimension(\+:,\+:), intent(inout)}]{ppoly\+\_\+coef,  }\item[{real, intent(in), optional}]{h\+\_\+neglect }\end{DoxyParamCaption})}



Reconstruction by parabolas within boundary cells. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em n} & Number of cells\\
\hline
\mbox{\tt in}  & {\em h} & cell widths (size N) \mbox{[}H\mbox{]}\\
\hline
\mbox{\tt in}  & {\em u} & cell averages (size N) \mbox{[}A\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em edge\+\_\+values} & edge values of piecewise polynomials \mbox{[}A\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em ppoly\+\_\+coef} & coefficients of piecewise polynomials, mainly \mbox{[}A\mbox{]}\\
\hline
\mbox{\tt in}  & {\em h\+\_\+neglect} & A negligibly small width for the purpose of cell reconstructions \mbox{[}H\mbox{]} \\
\hline
\end{DoxyParams}


Definition at line 134 of file P\+P\+M\+\_\+functions.\+F90.


\begin{DoxyCode}
134 \textcolor{comment}{!------------------------------------------------------------------------------}
135 \textcolor{comment}{! Reconstruction by parabolas within boundary cells.}
136 \textcolor{comment}{!}
137 \textcolor{comment}{! The following explanations apply to the left boundary cell. The same}
138 \textcolor{comment}{! reasoning holds for the right boundary cell.}
139 \textcolor{comment}{!}
140 \textcolor{comment}{! A parabola needs to be built in the cell and requires three degrees of}
141 \textcolor{comment}{! freedom, which are the right edge value and slope and the cell average.}
142 \textcolor{comment}{! The right edge values and slopes are taken to be that of the neighboring}
143 \textcolor{comment}{! cell (i.e., the left edge value and slope of the neighboring cell).}
144 \textcolor{comment}{! The resulting parabola is not necessarily monotonic and the traditional}
145 \textcolor{comment}{! PPM limiter is used to modify one of the edge values in order to yield}
146 \textcolor{comment}{! a monotonic parabola.}
147 \textcolor{comment}{!}
148 \textcolor{comment}{! N:     number of cells in grid}
149 \textcolor{comment}{! h:     thicknesses of grid cells}
150 \textcolor{comment}{! u:     cell averages to use in constructing piecewise polynomials}
151 \textcolor{comment}{! edge\_values : edge values of piecewise polynomials}
152 \textcolor{comment}{! ppoly\_coef : coefficients of piecewise polynomials}
153 \textcolor{comment}{!}
154 \textcolor{comment}{! It is assumed that the size of the array 'u' is equal to the number of cells}
155 \textcolor{comment}{! defining 'grid' and 'ppoly'. No consistency check is performed here.}
156 \textcolor{comment}{!------------------------------------------------------------------------------}
157 
158   \textcolor{comment}{! Arguments}
159   \textcolor{keywordtype}{integer},              \textcolor{keywordtype}{intent(in)}    :: n\textcolor{comment}{ !< Number of cells}
160   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},   \textcolor{keywordtype}{intent(in)}    :: h\textcolor{comment}{ !< cell widths (size N) [H]}
161   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},   \textcolor{keywordtype}{intent(in)}    :: u\textcolor{comment}{ !< cell averages (size N) [A]}
162   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:)}, \textcolor{keywordtype}{intent(inout)} :: edge\_values\textcolor{comment}{    !< edge values of piecewise polynomials [A]}
163   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:)}, \textcolor{keywordtype}{intent(inout)} :: ppoly\_coef\textcolor{comment}{ !< coefficients of piecewise polynomials, mainly [A]}
164   \textcolor{keywordtype}{real},       \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: h\_neglect\textcolor{comment}{  !< A negligibly small width for}
165 \textcolor{comment}{                                           !! the purpose of cell reconstructions [H]}
166 
167   \textcolor{comment}{! Local variables}
168   \textcolor{keywordtype}{integer} :: i0, i1
169   \textcolor{keywordtype}{real}    :: u0, u1
170   \textcolor{keywordtype}{real}    :: h0, h1
171   \textcolor{keywordtype}{real}    :: a, b, c
172   \textcolor{keywordtype}{real}    :: u0\_l, u0\_r
173   \textcolor{keywordtype}{real}    :: u1\_l, u1\_r
174   \textcolor{keywordtype}{real}    :: slope
175   \textcolor{keywordtype}{real}    :: exp1, exp2
176   \textcolor{keywordtype}{real}    :: hneglect
177 
178   hneglect = hneglect\_dflt ; \textcolor{keywordflow}{if} (\textcolor{keyword}{present}(h\_neglect)) hneglect = h\_neglect
179 
180   \textcolor{comment}{! ----- Left boundary -----}
181   i0 = 1
182   i1 = 2
183   h0 = h(i0)
184   h1 = h(i1)
185   u0 = u(i0)
186   u1 = u(i1)
187 
188   \textcolor{comment}{! Compute the left edge slope in neighboring cell and express it in}
189   \textcolor{comment}{! the global coordinate system}
190   b = ppoly\_coef(i1,2)
191   u1\_r = b *((h0+hneglect)/(h1+hneglect))     \textcolor{comment}{! derivative evaluated at xi = 0.0,}
192                         \textcolor{comment}{! expressed w.r.t. xi (local coord. system)}
193 
194   \textcolor{comment}{! Limit the right slope by the PLM limited slope}
195   slope = 2.0 * ( u1 - u0 )
196   \textcolor{keywordflow}{if} ( abs(u1\_r) > abs(slope) ) \textcolor{keywordflow}{then}
197     u1\_r = slope
198 \textcolor{keywordflow}{  endif}
199 
200   \textcolor{comment}{! The right edge value in the boundary cell is taken to be the left}
201   \textcolor{comment}{! edge value in the neighboring cell}
202   u0\_r = edge\_values(i1,1)
203 
204   \textcolor{comment}{! Given the right edge value and slope, we determine the left}
205   \textcolor{comment}{! edge value and slope by computing the parabola as determined by}
206   \textcolor{comment}{! the right edge value and slope and the boundary cell average}
207   u0\_l = 3.0 * u0 + 0.5 * u1\_r - 2.0 * u0\_r
208 
209   \textcolor{comment}{! Apply the traditional PPM limiter}
210   exp1 = (u0\_r - u0\_l) * (u0 - 0.5*(u0\_l+u0\_r))
211   exp2 = (u0\_r - u0\_l) * (u0\_r - u0\_l) / 6.0
212 
213   \textcolor{keywordflow}{if} ( exp1 > exp2 ) \textcolor{keywordflow}{then}
214     u0\_l = 3.0 * u0 - 2.0 * u0\_r
215 \textcolor{keywordflow}{  endif}
216 
217   \textcolor{keywordflow}{if} ( exp1 < -exp2 ) \textcolor{keywordflow}{then}
218     u0\_r = 3.0 * u0 - 2.0 * u0\_l
219 \textcolor{keywordflow}{  endif}
220 
221   edge\_values(i0,1) = u0\_l
222   edge\_values(i0,2) = u0\_r
223 
224   a = u0\_l
225   b = 6.0 * u0 - 4.0 * u0\_l - 2.0 * u0\_r
226   c = 3.0 * ( u0\_r + u0\_l - 2.0 * u0 )
227 
228   ppoly\_coef(i0,1) = a
229   ppoly\_coef(i0,2) = b
230   ppoly\_coef(i0,3) = c
231 
232   \textcolor{comment}{! ----- Right boundary -----}
233   i0 = n-1
234   i1 = n
235   h0 = h(i0)
236   h1 = h(i1)
237   u0 = u(i0)
238   u1 = u(i1)
239 
240   \textcolor{comment}{! Compute the right edge slope in neighboring cell and express it in}
241   \textcolor{comment}{! the global coordinate system}
242   b = ppoly\_coef(i0,2)
243   c = ppoly\_coef(i0,3)
244   u1\_l = (b + 2*c)                  \textcolor{comment}{! derivative evaluated at xi = 1.0}
245   u1\_l = u1\_l * ((h1+hneglect)/(h0+hneglect))
246 
247   \textcolor{comment}{! Limit the left slope by the PLM limited slope}
248   slope = 2.0 * ( u1 - u0 )
249   \textcolor{keywordflow}{if} ( abs(u1\_l) > abs(slope) ) \textcolor{keywordflow}{then}
250     u1\_l = slope
251 \textcolor{keywordflow}{  endif}
252 
253   \textcolor{comment}{! The left edge value in the boundary cell is taken to be the right}
254   \textcolor{comment}{! edge value in the neighboring cell}
255   u0\_l = edge\_values(i0,2)
256 
257   \textcolor{comment}{! Given the left edge value and slope, we determine the right}
258   \textcolor{comment}{! edge value and slope by computing the parabola as determined by}
259   \textcolor{comment}{! the left edge value and slope and the boundary cell average}
260   u0\_r = 3.0 * u1 - 0.5 * u1\_l - 2.0 * u0\_l
261 
262   \textcolor{comment}{! Apply the traditional PPM limiter}
263   exp1 = (u0\_r - u0\_l) * (u1 - 0.5*(u0\_l+u0\_r))
264   exp2 = (u0\_r - u0\_l) * (u0\_r - u0\_l) / 6.0
265 
266   \textcolor{keywordflow}{if} ( exp1 > exp2 ) \textcolor{keywordflow}{then}
267     u0\_l = 3.0 * u1 - 2.0 * u0\_r
268 \textcolor{keywordflow}{  endif}
269 
270   \textcolor{keywordflow}{if} ( exp1 < -exp2 ) \textcolor{keywordflow}{then}
271     u0\_r = 3.0 * u1 - 2.0 * u0\_l
272 \textcolor{keywordflow}{  endif}
273 
274   edge\_values(i1,1) = u0\_l
275   edge\_values(i1,2) = u0\_r
276 
277   a = u0\_l
278   b = 6.0 * u1 - 4.0 * u0\_l - 2.0 * u0\_r
279   c = 3.0 * ( u0\_r + u0\_l - 2.0 * u1 )
280 
281   ppoly\_coef(i1,1) = a
282   ppoly\_coef(i1,2) = b
283   ppoly\_coef(i1,3) = c
284 
\end{DoxyCode}
\mbox{\Hypertarget{namespaceppm__functions_a3d365f4992a6d3b5cbcaca630c502b95}\label{namespaceppm__functions_a3d365f4992a6d3b5cbcaca630c502b95}} 
\index{ppm\+\_\+functions@{ppm\+\_\+functions}!ppm\+\_\+limiter\+\_\+standard@{ppm\+\_\+limiter\+\_\+standard}}
\index{ppm\+\_\+limiter\+\_\+standard@{ppm\+\_\+limiter\+\_\+standard}!ppm\+\_\+functions@{ppm\+\_\+functions}}
\subsubsection{\texorpdfstring{ppm\+\_\+limiter\+\_\+standard()}{ppm\_limiter\_standard()}}
{\footnotesize\ttfamily subroutine ppm\+\_\+functions\+::ppm\+\_\+limiter\+\_\+standard (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{N,  }\item[{real, dimension(\+:), intent(in)}]{h,  }\item[{real, dimension(\+:), intent(in)}]{u,  }\item[{real, dimension(\+:,\+:), intent(inout)}]{edge\+\_\+values,  }\item[{real, intent(in), optional}]{h\+\_\+neglect,  }\item[{logical, intent(in), optional}]{answers\+\_\+2018 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Adjusts edge values using the standard P\+PM limiter (Colella \& Woodward, J\+CP 1984) after first checking that the edge values are bounded by neighbors cell averages and that the edge values are monotonic between cell averages. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em n} & Number of cells\\
\hline
\mbox{\tt in}  & {\em h} & cell widths (size N) \mbox{[}H\mbox{]}\\
\hline
\mbox{\tt in}  & {\em u} & cell average properties (size N) \mbox{[}A\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em edge\+\_\+values} & Potentially modified edge values \mbox{[}A\mbox{]}\\
\hline
\mbox{\tt in}  & {\em h\+\_\+neglect} & A negligibly small width \mbox{[}H\mbox{]}\\
\hline
\mbox{\tt in}  & {\em answers\+\_\+2018} & If true use older, less acccurate expressions. \\
\hline
\end{DoxyParams}


Definition at line 63 of file P\+P\+M\+\_\+functions.\+F90.


\begin{DoxyCode}
63   \textcolor{keywordtype}{integer},              \textcolor{keywordtype}{intent(in)}    :: n\textcolor{comment}{ !< Number of cells}
64   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},   \textcolor{keywordtype}{intent(in)}    :: h\textcolor{comment}{ !< cell widths (size N) [H]}
65   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},   \textcolor{keywordtype}{intent(in)}    :: u\textcolor{comment}{ !< cell average properties (size N) [A]}
66   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:)}, \textcolor{keywordtype}{intent(inout)} :: edge\_values\textcolor{comment}{ !< Potentially modified edge values [A]}
67   \textcolor{keywordtype}{real},       \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: h\_neglect\textcolor{comment}{ !< A negligibly small width [H]}
68   \textcolor{keywordtype}{logical},    \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: answers\_2018\textcolor{comment}{ !< If true use older, less acccurate expressions.}
69 
70   \textcolor{comment}{! Local variables}
71   \textcolor{keywordtype}{integer}   :: k              \textcolor{comment}{! Loop index}
72   \textcolor{keywordtype}{real}      :: u\_l, u\_c, u\_r  \textcolor{comment}{! Cell averages (left, center and right)}
73   \textcolor{keywordtype}{real}      :: edge\_l, edge\_r \textcolor{comment}{! Edge values (left and right)}
74   \textcolor{keywordtype}{real}      :: expr1, expr2
75 
76   \textcolor{comment}{! Bound edge values}
77   \textcolor{keyword}{call }bound\_edge\_values( n, h, u, edge\_values, h\_neglect, answers\_2018 )
78 
79   \textcolor{comment}{! Make discontinuous edge values monotonic}
80   \textcolor{keyword}{call }check\_discontinuous\_edge\_values( n, u, edge\_values )
81 
82   \textcolor{comment}{! Loop on interior cells to apply the standard}
83   \textcolor{comment}{! PPM limiter (Colella & Woodward, JCP 84)}
84   \textcolor{keywordflow}{do} k = 2,n-1
85 
86     \textcolor{comment}{! Get cell averages}
87     u\_l = u(k-1)
88     u\_c = u(k)
89     u\_r = u(k+1)
90 
91     edge\_l = edge\_values(k,1)
92     edge\_r = edge\_values(k,2)
93 
94     \textcolor{keywordflow}{if} ( (u\_r - u\_c)*(u\_c - u\_l) <= 0.0) \textcolor{keywordflow}{then}
95       \textcolor{comment}{! Flatten extremum}
96       edge\_l = u\_c
97       edge\_r = u\_c
98     \textcolor{keywordflow}{else}
99       expr1 = 3.0 * (edge\_r - edge\_l) * ( (u\_c - edge\_l) + (u\_c - edge\_r))
100       expr2 = (edge\_r - edge\_l) * (edge\_r - edge\_l)
101       \textcolor{keywordflow}{if} ( expr1 > expr2 ) \textcolor{keywordflow}{then}
102         \textcolor{comment}{! Place extremum at right edge of cell by adjusting left edge value}
103         edge\_l = u\_c + 2.0 * ( u\_c - edge\_r )
104         edge\_l = max( min( edge\_l, max(u\_l, u\_c) ), min(u\_l, u\_c) ) \textcolor{comment}{! In case of round off}
105       \textcolor{keywordflow}{elseif} ( expr1 < -expr2 ) \textcolor{keywordflow}{then}
106         \textcolor{comment}{! Place extremum at left edge of cell by adjusting right edge value}
107         edge\_r = u\_c + 2.0 * ( u\_c - edge\_l )
108         edge\_r = max( min( edge\_r, max(u\_r, u\_c) ), min(u\_r, u\_c) ) \textcolor{comment}{! In case of round off}
109 \textcolor{keywordflow}{      endif}
110 \textcolor{keywordflow}{    endif}
111     \textcolor{comment}{! This checks that the difference in edge values is representable}
112     \textcolor{comment}{! and avoids overshoot problems due to round off.}
113     \textcolor{comment}{!### The 1.e-60 needs to have units of [A], so this dimensionally inconsisent.}
114     \textcolor{keywordflow}{if} ( abs( edge\_r - edge\_l )<max(1.e-60,epsilon(u\_c)*abs(u\_c)) ) \textcolor{keywordflow}{then}
115       edge\_l = u\_c
116       edge\_r = u\_c
117 \textcolor{keywordflow}{    endif}
118 
119     edge\_values(k,1) = edge\_l
120     edge\_values(k,2) = edge\_r
121 
122 \textcolor{keywordflow}{  enddo} \textcolor{comment}{! end loop on interior cells}
123 
124   \textcolor{comment}{! PCM within boundary cells}
125   edge\_values(1,:) = u(1)
126   edge\_values(n,:) = u(n)
127 
\end{DoxyCode}
\mbox{\Hypertarget{namespaceppm__functions_a5c4e47be75ad413904902582b3d0d4a4}\label{namespaceppm__functions_a5c4e47be75ad413904902582b3d0d4a4}} 
\index{ppm\+\_\+functions@{ppm\+\_\+functions}!ppm\+\_\+reconstruction@{ppm\+\_\+reconstruction}}
\index{ppm\+\_\+reconstruction@{ppm\+\_\+reconstruction}!ppm\+\_\+functions@{ppm\+\_\+functions}}
\subsubsection{\texorpdfstring{ppm\+\_\+reconstruction()}{ppm\_reconstruction()}}
{\footnotesize\ttfamily subroutine, public ppm\+\_\+functions\+::ppm\+\_\+reconstruction (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{N,  }\item[{real, dimension(n), intent(in)}]{h,  }\item[{real, dimension(n), intent(in)}]{u,  }\item[{real, dimension(n,2), intent(inout)}]{edge\+\_\+values,  }\item[{real, dimension(n,3), intent(inout)}]{ppoly\+\_\+coef,  }\item[{real, intent(in), optional}]{h\+\_\+neglect,  }\item[{logical, intent(in), optional}]{answers\+\_\+2018 }\end{DoxyParamCaption})}



Builds quadratic polynomials coefficients from cell mean and edge values. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em n} & Number of cells\\
\hline
\mbox{\tt in}  & {\em h} & Cell widths \mbox{[}H\mbox{]}\\
\hline
\mbox{\tt in}  & {\em u} & Cell averages \mbox{[}A\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em edge\+\_\+values} & Edge values \mbox{[}A\mbox{]}\\
\hline
\mbox{\tt in,out}  & {\em ppoly\+\_\+coef} & Polynomial coefficients, mainly \mbox{[}A\mbox{]}\\
\hline
\mbox{\tt in}  & {\em h\+\_\+neglect} & A negligibly small width \mbox{[}H\mbox{]}\\
\hline
\mbox{\tt in}  & {\em answers\+\_\+2018} & If true use older, less acccurate expressions. \\
\hline
\end{DoxyParams}


Definition at line 29 of file P\+P\+M\+\_\+functions.\+F90.


\begin{DoxyCode}
29   \textcolor{keywordtype}{integer},              \textcolor{keywordtype}{intent(in)}    :: n\textcolor{comment}{ !< Number of cells}
30   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(N)},   \textcolor{keywordtype}{intent(in)}    :: h\textcolor{comment}{ !< Cell widths [H]}
31   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(N)},   \textcolor{keywordtype}{intent(in)}    :: u\textcolor{comment}{ !< Cell averages [A]}
32   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(N,2)}, \textcolor{keywordtype}{intent(inout)} :: edge\_values\textcolor{comment}{ !< Edge values [A]}
33   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(N,3)}, \textcolor{keywordtype}{intent(inout)} :: ppoly\_coef\textcolor{comment}{ !< Polynomial coefficients, mainly [A]}
34   \textcolor{keywordtype}{real},       \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: h\_neglect\textcolor{comment}{ !< A negligibly small width [H]}
35   \textcolor{keywordtype}{logical},    \textcolor{keywordtype}{optional}, \textcolor{keywordtype}{intent(in)}    :: answers\_2018\textcolor{comment}{ !< If true use older, less acccurate expressions.}
36 
37   \textcolor{comment}{! Local variables}
38   \textcolor{keywordtype}{integer}   :: k              \textcolor{comment}{! Loop index}
39   \textcolor{keywordtype}{real}      :: edge\_l, edge\_r \textcolor{comment}{! Edge values (left and right)}
40 
41   \textcolor{comment}{! PPM limiter}
42   \textcolor{keyword}{call }ppm\_limiter\_standard( n, h, u, edge\_values, h\_neglect, answers\_2018 )
43 
44   \textcolor{comment}{! Loop over all cells}
45   \textcolor{keywordflow}{do} k = 1,n
46 
47     edge\_l = edge\_values(k,1)
48     edge\_r = edge\_values(k,2)
49 
50     \textcolor{comment}{! Store polynomial coefficients}
51     ppoly\_coef(k,1) = edge\_l
52     ppoly\_coef(k,2) = 4.0 * ( u(k) - edge\_l ) + 2.0 * ( u(k) - edge\_r )
53     ppoly\_coef(k,3) = 3.0 * ( ( edge\_r - u(k) ) + ( edge\_l - u(k) ) )
54 
55 \textcolor{keywordflow}{  enddo}
56 
\end{DoxyCode}


\subsection{Variable Documentation}
\mbox{\Hypertarget{namespaceppm__functions_a86e3d1a796b4934167d563eda5310a0e}\label{namespaceppm__functions_a86e3d1a796b4934167d563eda5310a0e}} 
\index{ppm\+\_\+functions@{ppm\+\_\+functions}!hneglect\+\_\+dflt@{hneglect\+\_\+dflt}}
\index{hneglect\+\_\+dflt@{hneglect\+\_\+dflt}!ppm\+\_\+functions@{ppm\+\_\+functions}}
\subsubsection{\texorpdfstring{hneglect\+\_\+dflt}{hneglect\_dflt}}
{\footnotesize\ttfamily real, parameter ppm\+\_\+functions\+::hneglect\+\_\+dflt = 1.E-\/30\hspace{0.3cm}{\ttfamily [private]}}



A tiny width that is so small that adding it to cell widths does not change the value due to a computational representation. It is used to avoid division by zero. 

\begin{DoxyNote}{Note}
This is a dimensional parameter and should really include a unit conversion. 
\end{DoxyNote}


Definition at line 23 of file P\+P\+M\+\_\+functions.\+F90.


\begin{DoxyCode}
23 \textcolor{keywordtype}{real}, \textcolor{keywordtype}{parameter} :: hneglect\_dflt = 1.e-30
\end{DoxyCode}
