From f93aa6253348e1e6708764ee85e9c21c138105fc Mon Sep 17 00:00:00 2001 From: kanschat Date: Sun, 3 Apr 2011 18:05:51 +0000 Subject: [PATCH] add 3D implementation and augment documentation git-svn-id: https://svn.dealii.org/trunk@23554 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/doxygen/headers/integrators.h | 6 ++++- deal.II/include/deal.II/integrators/maxwell.h | 23 +++++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/deal.II/doc/doxygen/headers/integrators.h b/deal.II/doc/doxygen/headers/integrators.h index d63c35b1b5..0a649fc5c3 100644 --- a/deal.II/doc/doxygen/headers/integrators.h +++ b/deal.II/doc/doxygen/headers/integrators.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2010 by the deal.II authors +// Copyright (C) 2010, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -21,6 +21,10 @@ * of the integration of cell and face terms for concrete problems in * LocalIntegrators. * + * @note Documentation on coding conventions, relations between + * classes, and details of the implementation is found in the + * documentation of namespaces in this module. + * *

Integration on finite element meshes

* * When we integrate a function or a functional on a finite element diff --git a/deal.II/include/deal.II/integrators/maxwell.h b/deal.II/include/deal.II/integrators/maxwell.h index 8796f0103f..b8e7a72787 100644 --- a/deal.II/include/deal.II/integrators/maxwell.h +++ b/deal.II/include/deal.II/integrators/maxwell.h @@ -34,9 +34,9 @@ namespace LocalIntegrators * * @f[ * \nabla\times \mathbf u = \begin{pmatrix} - * \partial_3 u_2 - \partial 2 u_3 \\ - * \partial_1 u_3 - \partial 3 u_1 \\ - * \partial_2 u_1 - \partial 1 u_2 + * \partial_3 u_2 - \partial_2 u_3 \\ + * \partial_1 u_3 - \partial_3 u_1 \\ + * \partial_2 u_1 - \partial_1 u_2 * \end{pmatrix} * @f] * @@ -45,9 +45,9 @@ namespace LocalIntegrators * Computing the nonzero components, we obtain the scalar * curl of a vector function and the vector curl of a scalar * function. The current implementation exchanges the sign and we have: - * * @f[ * \nabla \times \mathbf u = \partial_1 u_2 - \partial 2 u_1 + * \qquad * \nabla \times p = \begin{pmatrix} * \partial_2 p \\ -\partial_1 p * \end{pmatrix} @@ -62,12 +62,20 @@ namespace LocalIntegrators /** * Auxiliary function. Given the tensors of dim second derivatives, * compute the curl of the curl of a vector function. The result in - * two dimensions is: + * two and three dimensions is: * @f[ * \nabla\times\nabla\times \mathbf u = \begin{pmatrix} * \partial_1\partial_2 u_2 - \partial_2^2 u_1 \\ * \partial_1\partial_2 u_1 - \partial_1^2 u_2 * \end{pmatrix} + * + * \nabla\times\nabla\times \mathbf u = \begin{pmatrix} + * \partial_1\partial_2 u_2 + \partial_1\partial_3 u_3 + * - (\partial_2^2+\partial_3^2) u_1 \\ + * \partial_2\partial_3 u_3 + \partial_2\partial_1 u_1 + * - (\partial_3^2+\partial_1^2) u_2 \\ + * \partial_3\partial_1 u_1 + \partial_3\partial_2 u_2 + * - (\partial_1^2+\partial_2^2) u_3 * @f] * * @note The third tensor argument is not used in two dimensions and @@ -90,6 +98,11 @@ namespace LocalIntegrators result[0] = h1[0][1]-h0[1][1]; result[1] = h0[0][1]-h1[0][0]; break; + case 3: + result[0] = h1[0][1]+h2[0][2]-h0[1][1]-h0[2][2]; + result[1] = h2[1][2]+h0[1][0]-h1[2][2]-h1[0][0]; + result[2] = h0[2][0]+h1[2][1]-h2[0][0]-h2[1][1]; + break; default: Assert(false, ExcNotImplemented()); } -- 2.39.5