From: shakirbsm Date: Wed, 26 Aug 2015 17:13:50 +0000 (+0200) Subject: Advection residuals for boundary and face fixed X-Git-Tag: v8.4.0-rc2~524^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c1e7ad36228cf17de64253e5c7f4b2ef045564f;p=dealii.git Advection residuals for boundary and face fixed --- diff --git a/include/deal.II/integrators/advection.h b/include/deal.II/integrators/advection.h index 1e3f4f71bd..236cfe00df 100644 --- a/include/deal.II/integrators/advection.h +++ b/include/deal.II/integrators/advection.h @@ -353,15 +353,18 @@ namespace LocalIntegrators /** * Scalar case: Residual for upwind flux at the boundary for weak advection operator. This is the - * value of the trial function at the outflow boundary and zero else: + * value of the trial function at the outflow boundary and the value of the incoming boundary + * condition on the inflow boundary: * @f[ * a_{ij} = \int_{\partial\Omega} - * [\mathbf w\cdot\mathbf n]_- - * (u_i-g) v_j \, ds + * (\mathbf w\cdot\mathbf n) + * \widehat u v_j \, ds * @f] * - * Here, u is the finite element function whose values are given in the argument input. - * g is the inhomogenous boundary value in the argument data. + * Here, the numerical flux $\widehat u$ is the upwind value at the face, + * namely the finite element function whose values are given in the argument + * `input` on the outflow boundary. + * On the inflow boundary, it is the inhomogenous boundary value in the argument `data`. * * The velocity is provided as a VectorSlice, having dim * vectors, one for each velocity component. Each of the vectors must @@ -402,15 +405,13 @@ namespace LocalIntegrators for (unsigned int d=0; d 0) + // Always use the upwind value + const double val = (nv > 0.) ? input[k] : -data[k]; + + for (unsigned i=0; ivelocity is provided as a VectorSlice, having dim * vectors, one for each velocity component. Each of the vectors must * either have only a single entry, if the advection velocity is @@ -466,16 +473,16 @@ namespace LocalIntegrators for (unsigned int d=0; d 0) + std::vector val(n_comp); + + for (unsigned int d=0; d 0.) ? input[d][k] : -data[d][k]; for (unsigned i=0; i