From: Guido Kanschat Date: Thu, 26 Sep 2013 18:42:28 +0000 (+0000) Subject: new residual Divergence::u_times_n\ X-Git-Tag: v8.1.0~716 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c92e62df8580aa43fe7b4605443339acd6bfdd5;p=dealii.git new residual Divergence::u_times_n\ fixed elasticity residuals git-svn-id: https://svn.dealii.org/trunk@30963 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/integrators/divergence.h b/deal.II/include/deal.II/integrators/divergence.h index ef99627c83..836936425b 100644 --- a/deal.II/include/deal.II/integrators/divergence.h +++ b/deal.II/include/deal.II/integrators/divergence.h @@ -380,6 +380,43 @@ namespace LocalIntegrators } } + /** + * The trace of the gradient + * operator, namely the product + * of the normal component of the + * vector valued test space and + * the trial space. + * @f[ + * \int_F u (\mathbf v\cdot \mathbf n) \,ds + * @f] + * + * @author Guido Kanschat + * @date 2013 + */ + template + void + u_times_n_residual ( + Vector &result, + const FEValuesBase &fetest, + const std::vector &data, + double factor = 1.) + { + const unsigned int t_dofs = fetest.dofs_per_cell; + + AssertDimension(fetest.get_fe().n_components(), dim); + AssertDimension(result.size(), t_dofs); + AssertDimension(data.size(), fetest.n_quadrature_points); + + for (unsigned int k=0; k ndx = factor * fetest.normal_vector(k) * fetest.JxW(k); + + for (unsigned int i=0; i