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


\doxysubsection{Detailed Description}
Piecewise constant reconstruction functions. \doxysubsection*{Functions/\+Subroutines}
\begin{DoxyCompactItemize}
\item 
subroutine, public \mbox{\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}


\doxysubsection{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}}
\doxysubsubsection{\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{\texttt{ in}}  & {\em n} & Number of cells \\
\hline
\mbox{\texttt{ in}}  & {\em u} & cell averages \\
\hline
\mbox{\texttt{ in,out}}  & {\em edge\+\_\+values} & Edge value of polynomial, with the same units as u. \\
\hline
\mbox{\texttt{ in,out}}  & {\em ppoly\+\_\+coef} & Coefficients of polynomial, with the same units as u. \\
\hline
\end{DoxyParams}


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


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

\end{DoxyCode}
