From 8e18c79493a26032fd0219c1067b623909b3a67a Mon Sep 17 00:00:00 2001 From: kanschat Date: Mon, 29 Nov 2010 17:17:26 +0000 Subject: [PATCH] move grad_div to Divergence git-svn-id: https://svn.dealii.org/trunk@22880 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/deal.II/integrators/divergence.h | 37 ++++++++++++++++++ .../include/deal.II/integrators/elasticity.h | 38 ------------------- 2 files changed, 37 insertions(+), 38 deletions(-) diff --git a/deal.II/include/deal.II/integrators/divergence.h b/deal.II/include/deal.II/integrators/divergence.h index 23ab7dbaf9..57145b923c 100644 --- a/deal.II/include/deal.II/integrators/divergence.h +++ b/deal.II/include/deal.II/integrators/divergence.h @@ -243,6 +243,43 @@ namespace LocalIntegrators } } +/** + * The weak form of the grad-div operator penalizing volume changes + * @f[ + * \int_Z \nabla\!\cdot\!u \nabla\!\cdot\!v \,dx + * @f] + */ + template + void grad_div_matrix ( + FullMatrix& M, + const FEValuesBase& fe, + double factor = 1.) + { + const unsigned int n_dofs = fe.dofs_per_cell; + + AssertDimension(fe.get_fe().n_components(), dim); + AssertDimension(M.m(), n_dofs); + AssertDimension(M.n(), n_dofs); + + for (unsigned k=0;k - void grad_div_matrix ( - FullMatrix& M, - const FEValuesBase& fe, - double factor = 1.) - { - const unsigned int n_dofs = fe.dofs_per_cell; - - AssertDimension(fe.get_fe().n_components(), dim); - AssertDimension(M.m(), n_dofs); - AssertDimension(M.n(), n_dofs); - - for (unsigned k=0;k