[Tex/LaTex] Box around formula using \begin{empheq} moving source outside box

citingempheqmath-mode

enter image description here

I want to move my source outside the box, so that it is next to the equation number.

\documentclass[a4paper,12pt,headsepline]{scrreprt} 
\usepackage{amsmath}   % Mathe 
\usepackage{mathtools} 
\usepackage{empheq} 

\bibliographystyle{unsrt}   % Zitierweise %quotestyle

\begin{document} 

\begin{empheq}[box=\fbox]{align} 
\rho\cdot \left(\dfrac{\partial w}{\partial t} + u\cdot \dfrac{\partial w}{\partial x} + v\cdot \dfrac{\partial w}{\partial y} + w\cdot \dfrac{\partial w}{\partial z}\right)  = 
A_{z}} - \dfrac{\partial p}{\partial z} + & \nonumber 
\\ 
\dfrac{\partial}{\partial x} \left[\mu \cdot \left(\dfrac{\partial w}{\partial x} + \dfrac{\partial u}{\partial z}\right)\right] + & \cite[S.25]{Quelle} 
\\ 
\dfrac{\partial}{\partial y} \left[\mu\cdot \left(\dfrac{\partial v}{\partial z} + \dfrac{\partial w}{\partial y}\right)\right] + \dfrac{\partial}{\partial z}\left[\mu\cdot \left( 2\cdot \dfrac{\partial w}{\partial z} - \dfrac{2}{3}\cdot (\nabla\cdot \overrightarrow{c})\right)\right] & \nonumber \label{eqn:Gleichung} 
\end{empheq} 

\end{document}

Best Answer

You just need \boxed together with aligned:

\documentclass[a4paper,12pt,headsepline]{scrreprt} 
\usepackage{amsmath}

\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}

\begin{document} 

\begin{equation}\label{eqn:Gleichung} 
\boxed{
  \!\begin{aligned}
  &\rho\cdot \left(\pd{w}{t} + u\cdot \pd{w}{x} + v\cdot \pd{w}{y} + w\cdot \pd{w}{z}\right)
  \\
  &\quad= A_{z} - \pd{p}{z}
     + \pd{}{x}\left[\mu \cdot \left(\pd{w}{x} + \pd{u}{z}\right)\right]
     + \pd{}{y}\left[\mu\cdot \left(\pd{v}{z} + \pd{w}{y}\right)\right]
  \\
  &\qquad+ \pd{}{z}\left[\mu\cdot \left( 2\cdot \pd{w}{z} - 
                         \frac{2}{3}\cdot (\nabla\cdot \vec{c}\,)\right)
                   \right]
  \end{aligned}
}
\quad\cite[S.25]{Quelle} 
\end{equation}

% just to get a number instead of ??
\begin{thebibliography}{1}

\bibitem{Quelle} Some item

\end{thebibliography}

\end{document}

enter image description here