\hypertarget{interfacemom__array__transform_1_1rotate__vector}{}\doxysection{mom\+\_\+array\+\_\+transform\+::rotate\+\_\+vector Interface Reference}
\label{interfacemom__array__transform_1_1rotate__vector}\index{mom\_array\_transform::rotate\_vector@{mom\_array\_transform::rotate\_vector}}


\doxysubsection{Detailed Description}
Rotate an array pair representing the components of a vector. Rotation is applied across the first and second axes of the array. This rotation should be applied when the fields satisfy vector transformation rules. For example, the u and v components of a velocity will map from one to the other for quarter turns, with a sign change in one component. A half turn will map elements onto themselves with sign changes in both components. 

Definition at line 55 of file M\+O\+M\+\_\+array\+\_\+transform.\+F90.

\doxysubsection*{Private functions}
\begin{DoxyCompactItemize}
\item 
subroutine \mbox{\hyperlink{interfacemom__array__transform_1_1rotate__vector_a66b9b3f66a821857b24c80d15a5a8139}{rotate\+\_\+vector\+\_\+real\+\_\+2d}} (A\+\_\+in, B\+\_\+in, turns, A, B)
\begin{DoxyCompactList}\small\item\em Rotate the elements of a 2d real vector along first and second axes. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__array__transform_1_1rotate__vector_a0a22e9772c447f566c205f55507ec88c}{rotate\+\_\+vector\+\_\+real\+\_\+3d}} (A\+\_\+in, B\+\_\+in, turns, A, B)
\begin{DoxyCompactList}\small\item\em Rotate the elements of a 3d real vector along first and second axes. \end{DoxyCompactList}\item 
subroutine \mbox{\hyperlink{interfacemom__array__transform_1_1rotate__vector_aba4772e4bd244862ebf9ff6e62670580}{rotate\+\_\+vector\+\_\+real\+\_\+4d}} (A\+\_\+in, B\+\_\+in, turns, A, B)
\begin{DoxyCompactList}\small\item\em Rotate the elements of a 4d real vector along first and second axes. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Rotate an array pair representing the components of a vector. Rotation is applied across the first and second axes of the array. This rotation should be applied when the fields satisfy vector transformation rules. For example, the u and v components of a velocity will map from one to the other for quarter turns, with a sign change in one component. A half turn will map elements onto themselves with sign changes in both components. 

Definition at line 55 of file M\+O\+M\+\_\+array\+\_\+transform.\+F90.



\doxysubsection{Functions and subroutines}
\mbox{\Hypertarget{interfacemom__array__transform_1_1rotate__vector_a66b9b3f66a821857b24c80d15a5a8139}\label{interfacemom__array__transform_1_1rotate__vector_a66b9b3f66a821857b24c80d15a5a8139}} 
\index{mom\_array\_transform::rotate\_vector@{mom\_array\_transform::rotate\_vector}!rotate\_vector\_real\_2d@{rotate\_vector\_real\_2d}}
\index{rotate\_vector\_real\_2d@{rotate\_vector\_real\_2d}!mom\_array\_transform::rotate\_vector@{mom\_array\_transform::rotate\_vector}}
\doxysubsubsection{\texorpdfstring{rotate\_vector\_real\_2d()}{rotate\_vector\_real\_2d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+array\+\_\+transform\+::rotate\+\_\+vector\+::rotate\+\_\+vector\+\_\+real\+\_\+2d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:), intent(in)}]{A\+\_\+in,  }\item[{real, dimension(\+:,\+:), intent(in)}]{B\+\_\+in,  }\item[{integer, intent(in)}]{turns,  }\item[{real, dimension(\+:,\+:), intent(out)}]{A,  }\item[{real, dimension(\+:,\+:), intent(out)}]{B }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Rotate the elements of a 2d real vector along first and second axes. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a\+\_\+in} & First component of unrotated vector \\
\hline
\mbox{\texttt{ in}}  & {\em b\+\_\+in} & Second component of unrotated vector \\
\hline
\mbox{\texttt{ in}}  & {\em turns} & Number of quarter turns \\
\hline
\mbox{\texttt{ out}}  & {\em a} & First component of rotated vector \\
\hline
\mbox{\texttt{ out}}  & {\em b} & Second component of unrotated vector \\
\hline
\end{DoxyParams}


Definition at line 230 of file M\+O\+M\+\_\+array\+\_\+transform.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{231 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(in)} :: A\_in(:,:)\textcolor{comment}{ !< First component of unrotated vector}}
\DoxyCodeLine{232 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(in)} :: B\_in(:,:)\textcolor{comment}{ !< Second component of unrotated vector}}
\DoxyCodeLine{233   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)} :: turns\textcolor{comment}{  !< Number of quarter turns}}
\DoxyCodeLine{234 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(out)} :: A(:,:)\textcolor{comment}{   !< First component of rotated vector}}
\DoxyCodeLine{235 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(out)} :: B(:,:)\textcolor{comment}{   !< Second component of unrotated vector}}
\DoxyCodeLine{236 }
\DoxyCodeLine{237   \textcolor{keyword}{call }rotate\_array\_pair(a\_in, b\_in, turns, a, b)}
\DoxyCodeLine{238 }
\DoxyCodeLine{239   \textcolor{keywordflow}{if} (modulo(turns, 4) == 1 .or. modulo(turns, 4) == 2) \&}
\DoxyCodeLine{240     a(:,:) = -\/a(:,:)}
\DoxyCodeLine{241 }
\DoxyCodeLine{242   \textcolor{keywordflow}{if} (modulo(turns, 4) == 2 .or. modulo(turns, 4) == 3) \&}
\DoxyCodeLine{243     b(:,:) = -\/b(:,:)}

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__array__transform_1_1rotate__vector_a0a22e9772c447f566c205f55507ec88c}\label{interfacemom__array__transform_1_1rotate__vector_a0a22e9772c447f566c205f55507ec88c}} 
\index{mom\_array\_transform::rotate\_vector@{mom\_array\_transform::rotate\_vector}!rotate\_vector\_real\_3d@{rotate\_vector\_real\_3d}}
\index{rotate\_vector\_real\_3d@{rotate\_vector\_real\_3d}!mom\_array\_transform::rotate\_vector@{mom\_array\_transform::rotate\_vector}}
\doxysubsubsection{\texorpdfstring{rotate\_vector\_real\_3d()}{rotate\_vector\_real\_3d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+array\+\_\+transform\+::rotate\+\_\+vector\+::rotate\+\_\+vector\+\_\+real\+\_\+3d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:,\+:), intent(in)}]{A\+\_\+in,  }\item[{real, dimension(\+:,\+:,\+:), intent(in)}]{B\+\_\+in,  }\item[{integer, intent(in)}]{turns,  }\item[{real, dimension(\+:,\+:,\+:), intent(out)}]{A,  }\item[{real, dimension(\+:,\+:,\+:), intent(out)}]{B }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Rotate the elements of a 3d real vector along first and second axes. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a\+\_\+in} & First component of unrotated vector \\
\hline
\mbox{\texttt{ in}}  & {\em b\+\_\+in} & Second component of unrotated vector \\
\hline
\mbox{\texttt{ in}}  & {\em turns} & Number of quarter turns \\
\hline
\mbox{\texttt{ out}}  & {\em a} & First component of rotated vector \\
\hline
\mbox{\texttt{ out}}  & {\em b} & Second component of unrotated vector \\
\hline
\end{DoxyParams}


Definition at line 248 of file M\+O\+M\+\_\+array\+\_\+transform.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{249 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(in)} :: A\_in(:,:,:)\textcolor{comment}{ !< First component of unrotated vector}}
\DoxyCodeLine{250 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(in)} :: B\_in(:,:,:)\textcolor{comment}{ !< Second component of unrotated vector}}
\DoxyCodeLine{251   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)} :: turns\textcolor{comment}{    !< Number of quarter turns}}
\DoxyCodeLine{252 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(out)} :: A(:,:,:)\textcolor{comment}{   !< First component of rotated vector}}
\DoxyCodeLine{253 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(out)} :: B(:,:,:)\textcolor{comment}{   !< Second component of unrotated vector}}
\DoxyCodeLine{254 }
\DoxyCodeLine{255   \textcolor{keywordtype}{integer} :: k}
\DoxyCodeLine{256 }
\DoxyCodeLine{257   \textcolor{keywordflow}{do} k = 1, \textcolor{keyword}{size}(a\_in, 3)}
\DoxyCodeLine{258     \textcolor{keyword}{call }rotate\_vector(a\_in(:,:,k), b\_in(:,:,k), turns, a(:,:,k), b(:,:,k))}
\DoxyCodeLine{259 \textcolor{keywordflow}{  enddo}}

\end{DoxyCode}
\mbox{\Hypertarget{interfacemom__array__transform_1_1rotate__vector_aba4772e4bd244862ebf9ff6e62670580}\label{interfacemom__array__transform_1_1rotate__vector_aba4772e4bd244862ebf9ff6e62670580}} 
\index{mom\_array\_transform::rotate\_vector@{mom\_array\_transform::rotate\_vector}!rotate\_vector\_real\_4d@{rotate\_vector\_real\_4d}}
\index{rotate\_vector\_real\_4d@{rotate\_vector\_real\_4d}!mom\_array\_transform::rotate\_vector@{mom\_array\_transform::rotate\_vector}}
\doxysubsubsection{\texorpdfstring{rotate\_vector\_real\_4d()}{rotate\_vector\_real\_4d()}}
{\footnotesize\ttfamily subroutine mom\+\_\+array\+\_\+transform\+::rotate\+\_\+vector\+::rotate\+\_\+vector\+\_\+real\+\_\+4d (\begin{DoxyParamCaption}\item[{real, dimension(\+:,\+:,\+:,\+:), intent(in)}]{A\+\_\+in,  }\item[{real, dimension(\+:,\+:,\+:,\+:), intent(in)}]{B\+\_\+in,  }\item[{integer, intent(in)}]{turns,  }\item[{real, dimension(\+:,\+:,\+:,\+:), intent(out)}]{A,  }\item[{real, dimension(\+:,\+:,\+:,\+:), intent(out)}]{B }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [private]}}



Rotate the elements of a 4d real vector along first and second axes. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em a\+\_\+in} & First component of unrotated vector \\
\hline
\mbox{\texttt{ in}}  & {\em b\+\_\+in} & Second component of unrotated vector \\
\hline
\mbox{\texttt{ in}}  & {\em turns} & Number of quarter turns \\
\hline
\mbox{\texttt{ out}}  & {\em a} & First component of rotated vector \\
\hline
\mbox{\texttt{ out}}  & {\em b} & Second component of unrotated vector \\
\hline
\end{DoxyParams}


Definition at line 264 of file M\+O\+M\+\_\+array\+\_\+transform.\+F90.


\begin{DoxyCode}{0}
\DoxyCodeLine{265 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(in)} :: A\_in(:,:,:,:)\textcolor{comment}{ !< First component of unrotated vector}}
\DoxyCodeLine{266 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(in)} :: B\_in(:,:,:,:)\textcolor{comment}{ !< Second component of unrotated vector}}
\DoxyCodeLine{267   \textcolor{keywordtype}{integer}, \textcolor{keywordtype}{intent(in)} :: turns\textcolor{comment}{      !< Number of quarter turns}}
\DoxyCodeLine{268 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(out)} :: A(:,:,:,:)\textcolor{comment}{   !< First component of rotated vector}}
\DoxyCodeLine{269 \textcolor{keywordtype}{  real}, \textcolor{keywordtype}{intent(out)} :: B(:,:,:,:)\textcolor{comment}{   !< Second component of unrotated vector}}
\DoxyCodeLine{270 }
\DoxyCodeLine{271   \textcolor{keywordtype}{integer} :: n}
\DoxyCodeLine{272 }
\DoxyCodeLine{273   \textcolor{keywordflow}{do} n = 1, \textcolor{keyword}{size}(a\_in, 4)}
\DoxyCodeLine{274     \textcolor{keyword}{call }rotate\_vector(a\_in(:,:,:,n), b\_in(:,:,:,n), turns, \&}
\DoxyCodeLine{275         a(:,:,:,n), b(:,:,:,n))}
\DoxyCodeLine{276 \textcolor{keywordflow}{  enddo}}

\end{DoxyCode}


The documentation for this interface was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/home/cermak/src/\+M\+O\+M6.\+devrob/src/framework/M\+O\+M\+\_\+array\+\_\+transform.\+F90\end{DoxyCompactItemize}
