From: Guido Kanschat Date: Fri, 23 Mar 2012 22:04:50 +0000 (+0000) Subject: compute the norm of the divergence X-Git-Tag: v8.0.0~2742 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad477c60b462ddf7fc3535c0e24810121333e006;p=dealii.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