//---------------------------------------------------------------------------
// $Id$
//
-// Copyright (C) 2010, 2011, 2012 by the deal.II authors
+// Copyright (C) 2010, 2011, 2012, 2013 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
* This is the strong divergence operator and the trial
* space should be at least <b>H</b><sup>div</sup>. The test functions
* may be discontinuous.
+ *
+ * @author Guido Kanschat
+ * @date 2011
*/
template <int dim>
void cell_matrix (
*
* The function cell_matrix() is the Frechet derivative of this function with respect
* to the test functions.
+ *
+ * @author Guido Kanschat
+ * @date 2011
*/
template <int dim>
void cell_residual(
* This is the strong gradient and the trial space
* should be at least in <i>H</i><sup>1</sup>. The test functions can
* be discontinuous.
+ *
+ * @author Guido Kanschat
+ * @date 2011
*/
template <int dim>
void gradient_matrix(
* may be discontinuous.
*
* The function cell_residual() is the Frechet derivative of this function with respect to the test functions.
+ *
+ * @author Guido Kanschat
+ * @date 2011
*/
template <int dim>
void gradient_residual(
* normal component of the vector valued trial space and the test
* space.
* @f[ \int_F (\mathbf u\cdot \mathbf n) v \,ds @f]
+ *
+ * @author Guido Kanschat
+ * @date 2011
*/
template<int dim>
void
* @f[
* \int_F (\mathbf u\cdot \mathbf n) v \,ds
* @f]
+ *
+ * @author Guido Kanschat
+ * @date 2011
*/
template<int dim>
void
* @f[
* \int_F (\mathbf u_1\cdot \mathbf n_1 + \mathbf u_2 \cdot \mathbf n_2) \frac{v_1+v_2}{2} \,ds
* @f]
+ *
+ * @author Guido Kanschat
+ * @date 2011
*/
template<int dim>
void
* @f[
* \int_Z \nabla\!\cdot\!u \nabla\!\cdot\!v \,dx
* @f]
+ *
+ * @author Guido Kanschat
+ * @date 2011
*/
template <int dim>
void grad_div_matrix (
* (\mathbf v_1\cdot \mathbf n_1 + \mathbf v_2 \cdot \mathbf n_2)
* \,ds
* @f]
+ *
+ * @author Guido Kanschat
+ * @date 2011
*/
template<int dim>
void
}
}
}
-
+
+ /**
+ * The <i>L</i><sup>2</sup>-norm of the divergence over the
+ * quadrature set determined by the FEValuesBase object.
+ *
+ * The vector is expected to consist of dim vectors of length
+ * equal to the number of quadrature points. The number of
+ * components of the finite element has to be equal to the space
+ * dimension.
+ *
+ * @author Guido Kanschat
+ * @date 2013
+ */
template <int dim>
double norm(const FEValuesBase<dim> &fe,
const VectorSlice<const std::vector<std::vector<Tensor<1,dim> > > > &Du)
double div = Du[0][k][0];
for (unsigned int d=1; d<dim; ++d)
div += Du[d][k][d];
- result += div*div;
+ result += div*div*fe.JxW(k);
}
return result;
}