Hello,
I am trying to program a finite element formulation that contains
the following stabilization term:
a is a vector, u a scalar function
\begin{equation}
\begin{array}{lcll}
a_{||} & = & \displaystyle \frac{(a\cdot \nabla u)}{|\nabla u|_2^2} \, \nabla u
& \hbox{if } \nabla u \ne 0
\ \
& = & 0 & \hbox{if } \nabla u = 0
\end{array}
\end{equation}
How can I program this object using python ?
Thanks