Following "A conservative DGM for Convection-Diffusion and Navier-Stokes Problems" (Oden and Baumann), if we have a linear convection-diffusion equation of the following form: $$ \nabla\cdot(\mathbf{b}u) - \nabla\cdot(a\nabla u) = f $$
with BC's $$ u = u_{D} \;\;\text{on} \;{\Gamma_{D}} \;\;\;\text{and}\;\;\;a\nabla u\cdot\mathbf{n}=u_{N} \;\;\text{on} \;\Gamma_{N} $$
Then we have the variational formulation of the convection term as follows: $$ A_{\mathbf{b}}(u,v) = -\sum_{K\in\mathcal{M}_{h}}\int_{K}\nabla v\cdot(\mathbf{b}u) + \sum_{e\in\Gamma_{h}^{i}}\int_{e}\left\{\mathbf{b}\cdot\mathbf{n}\right\}u^{\uparrow}[v] + \sum_{e\in\Gamma_{\text{out}}}\int_{e}(\mathbf{b}\cdot\mathbf{n})uv $$
and $$ L_{\mathbf{b}}(v) = -\sum_{e\in\Gamma_{\text{in}}}\int_{e}(\mathbf{b}\cdot\mathbf{n})u_{D}v $$
where $\Gamma_{h}^{i}$ is the set of interior edges, $\Gamma_{\text{in}} = \left\{\mathbf{x}\in\partial\Omega:\;\mathbf{b}\cdot\mathbf{n} < 0\right\}$ and $\Gamma_{\text{out}} = \partial\Omega\backslash\Gamma_{\text{in}}$. Also, we have the following upwind term: $$ u^{\uparrow} = \begin{cases} u|_{K_{-}}, &\left\{\mathbf{b}\cdot\mathbf{n}\right\} \geqslant0\\ u|_{K_{+}}, &\left\{\mathbf{b}\cdot\mathbf{n}\right\} < 0\end{cases} $$
where $K_{-}$ is the element to the "left" of an interior edge $e$ and $K_{+}$ is the element to the "right", using a fixed convention for defining the neighbors of an edge.
So I can implement this without much trouble. However, I'm trying to solve a non-linear equation in the following form: $$ \nabla\cdot(\gamma(u)\mathbf{b}(u)) - \nabla\cdot(a(u)\nabla u) = f(x,y) $$
I'm having some trouble figuring out the convective term here. I have: $$ A_{\mathbf{b}}(u,v) = -\sum_{K\in\mathcal{M}_{h}}\int_{K}\nabla v\cdot(\gamma(u)\mathbf{b}(u)) + \sum_{e\in\Gamma_{h}^{i}}\int_{e}\left\{\mathbf{b}(u)\cdot\mathbf{n}\right\}(\gamma(u))^{\uparrow}[v] + \sum_{e\in\Gamma_{\text{out}}}\int_{e}(\mathbf{b}(u)\cdot\mathbf{n})\gamma(u)v $$
and $$ L_{\mathbf{b}}(u) = -\sum_{e\in\Gamma_{\text{in}}}\int_{e}(\mathbf{b}(u)\cdot\mathbf{n})\gamma(u_{D})v $$
1) I'm trying to compute a Jacobian from these terms and I think there may be something wrong with my integration by parts. Is my averaging and upwinding correct? Namely, I'm a bit unsure of where the $\uparrow$ should go.
2) On the inflow integral, do I evaluate $\mathbf{b}(u_{D})$ AND $\gamma(u_{D})$? Or just $\gamma(u_{D})$? In the first case, this inflow term wouldn't contribute to the Jacobian. In the latter case, it would. Does it matter which way I do it?