\hypertarget{namespacepcm__functions}{}\section{pcm\+\_\+functions Module Reference}
\label{namespacepcm__functions}\index{pcm\+\_\+functions@{pcm\+\_\+functions}}


\subsection{Detailed Description}
Piecewise constant reconstruction functions. \subsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine, public \hyperlink{namespacepcm__functions_aacc53ba4d2bb06809859de3ec457fd35}{pcm\+\_\+reconstruction} (N, u, edge\+\_\+values, ppoly\+\_\+coef)
\begin{DoxyCompactList}\small\item\em Reconstruction by constant polynomials within each cell. There is nothing to do but this routine is provided to ensure a homogeneous interface throughout the regridding toolbox. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function/\+Subroutine Documentation}
\mbox{\Hypertarget{namespacepcm__functions_aacc53ba4d2bb06809859de3ec457fd35}\label{namespacepcm__functions_aacc53ba4d2bb06809859de3ec457fd35}} 
\index{pcm\+\_\+functions@{pcm\+\_\+functions}!pcm\+\_\+reconstruction@{pcm\+\_\+reconstruction}}
\index{pcm\+\_\+reconstruction@{pcm\+\_\+reconstruction}!pcm\+\_\+functions@{pcm\+\_\+functions}}
\subsubsection{\texorpdfstring{pcm\+\_\+reconstruction()}{pcm\_reconstruction()}}
{\footnotesize\ttfamily subroutine, public pcm\+\_\+functions\+::pcm\+\_\+reconstruction (\begin{DoxyParamCaption}\item[{integer, intent(in)}]{N,  }\item[{real, dimension(\+:), intent(in)}]{u,  }\item[{real, dimension(\+:,\+:), intent(inout)}]{edge\+\_\+values,  }\item[{real, dimension(\+:,\+:), intent(inout)}]{ppoly\+\_\+coef }\end{DoxyParamCaption})}



Reconstruction by constant polynomials within each cell. There is nothing to do but this routine is provided to ensure a homogeneous interface throughout the regridding toolbox. 

It is assumed that the dimension of \textquotesingle{}u\textquotesingle{} is equal to the number of cells defining \textquotesingle{}grid\textquotesingle{} and \textquotesingle{}ppoly\textquotesingle{}. No consistency check is performed.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em n} & Number of cells\\
\hline
\mbox{\tt in}  & {\em u} & cell averages\\
\hline
\mbox{\tt in,out}  & {\em edge\+\_\+values} & Edge value of polynomial, with the same units as u.\\
\hline
\mbox{\tt in,out}  & {\em ppoly\+\_\+coef} & Coefficients of polynomial, with the same units as u. \\
\hline
\end{DoxyParams}


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


\begin{DoxyCode}
19   \textcolor{keywordtype}{integer},              \textcolor{keywordtype}{intent(in)}    :: n\textcolor{comment}{ !< Number of cells}
20   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:)},   \textcolor{keywordtype}{intent(in)}    :: u\textcolor{comment}{ !< cell averages}
21   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:)}, \textcolor{keywordtype}{intent(inout)} :: edge\_values\textcolor{comment}{ !< Edge value of polynomial,}
22 \textcolor{comment}{                                           !! with the same units as u.}
23   \textcolor{keywordtype}{real}, \textcolor{keywordtype}{dimension(:,:)}, \textcolor{keywordtype}{intent(inout)} :: ppoly\_coef\textcolor{comment}{ !< Coefficients of polynomial,}
24 \textcolor{comment}{                                           !! with the same units as u.}
25 
26   \textcolor{comment}{! Local variables}
27   \textcolor{keywordtype}{integer} :: k
28 
29   \textcolor{comment}{! The coefficients of the piecewise constant polynomial are simply}
30   \textcolor{comment}{! the cell averages.}
31   ppoly\_coef(:,1) = u(:)
32 
33   \textcolor{comment}{! The edge values are equal to the cell average}
34   \textcolor{keywordflow}{do} k = 1,n
35     edge\_values(k,:) = u(k)
36 \textcolor{keywordflow}{  enddo}
37 
\end{DoxyCode}
