From: kanschat Date: Fri, 23 Mar 2012 22:04:50 +0000 (+0000) Subject: compute the norm of the divergence X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4258b34e4b8f8e5d4108471ef8210af3c2e7a7d;p=dealii-svn.git compute the norm of the divergence git-svn-id: https://svn.dealii.org/trunk@25323 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 e8f7e95303..9ae0c14120 100644 --- a/deal.II/include/deal.II/integrators/divergence.h +++ b/deal.II/include/deal.II/integrators/divergence.h @@ -366,6 +366,27 @@ namespace LocalIntegrators } } } + + template + double norm(const FEValuesBase& fe, + const VectorSlice > > >& Du) + { + unsigned int fecomp = fe.get_fe().n_components(); + + AssertDimension(fecomp, dim); + AssertVectorVectorDimension (Du, dim, fe.n_quadrature_points); + + double result = 0; + for (unsigned k=0;k