// $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
* 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.
+ *
* <h3>Integration on finite element meshes</h3>
*
* When we integrate a function or a functional on a finite element
*
* @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]
*
* 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}
/**
* Auxiliary function. Given the tensors of <tt>dim</tt> 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
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());
}