From: Wolfgang Bangerth Date: Thu, 29 Nov 2001 10:08:40 +0000 (+0000) Subject: Move the NormType enum to VectorTools. X-Git-Tag: v8.0.0~18531 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16b5279fcfbd676ca38a04d40705640750b80102;p=dealii.git Move the NormType enum to VectorTools. git-svn-id: https://svn.dealii.org/trunk@5304 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/numerics/vectors.h b/deal.II/deal.II/include/numerics/vectors.h index ad684a8d3e..dd2e555363 100644 --- a/deal.II/deal.II/include/numerics/vectors.h +++ b/deal.II/deal.II/include/numerics/vectors.h @@ -30,35 +30,6 @@ class ConstraintMatrix; -/** - * Denote which norm/integral is to be computed. The following possibilities - * are implemented: - * @begin{itemize} - * @item @p{mean}: the function or difference of functions is integrated - * on each cell. - * @item @p{L1_norm}: the absolute value of the function is integrated. - * @item @p{L2_norm}: the square of the function is integrated on each - * cell; afterwards the root is taken of this value. - * @item @p{Linfty_norm}: the maximum absolute value of the function. - * @item @p{H1_seminorm}: the square of the function gradient is - * integrated on each cell; afterwards the root is taken of this - * value. - * @item @p{H1_norm}: the square of the function plus the square of - * the function gradient is integrated on each cell; afterwards the - * root is taken of this. I.e. the square of this norm is the - * square of the @p{L2_norm} plus the square of the - * @p{H1_seminorm}. - * @end{itemize} - */ -enum NormType { - mean, - L1_norm, - L2_norm, - Linfty_norm, - H1_seminorm, - H1_norm -}; - /** * Provide a class which offers some operations on vectors. Amoung these are @@ -259,7 +230,7 @@ enum NormType { * * Presently, there is the possibility to compute the following values from the * difference, on each cell: @p{mean}, @p{L1_norm}, @p{L2_norm}, @p{Linfty_norm}, - * @p{H1_seminorm} and @p{H1_norm}, see @p{NormType}. + * @p{H1_seminorm} and @p{H1_norm}, see @p{VectorTools::NormType}. * For the mean difference value, the reference function minus the numerical * solution is computed, not the other way round. * @@ -314,6 +285,57 @@ enum NormType { class VectorTools { public: + + /** + * Denote which norm/integral is + * to be computed by the + * @p{integrate_difference} + * function of this class. The + * following possibilities are + * implemented: + * @begin{itemize} + * @item @p{mean}: the function + * or difference of functions + * is integrated on each cell. + * @item @p{L1_norm}: the + * absolute value of the + * function is integrated. + * @item @p{L2_norm}: the square + * of the function is + * integrated on each cell; + * afterwards the root is + * taken of this value. + * @item @p{Linfty_norm}: the + * maximum absolute value of the + * function. + * @item @p{H1_seminorm}: the + * square of the function + * gradient is integrated on + * each cell; afterwards the + * root is taken of this * + * value. + * @item @p{H1_norm}: the square + * of the function plus the + * square of the function + * gradient is integrated on + * each cell; afterwards the + * root is taken of + * this. I.e. the square of + * this norm is the square of + * the @p{L2_norm} plus the + * square of the + * @p{H1_seminorm}. + * @end{itemize} + */ + enum NormType { + mean, + L1_norm, + L2_norm, + Linfty_norm, + H1_seminorm, + H1_norm + }; + /** * Compute the interpolation of * @p{function} at the support diff --git a/deal.II/examples/step-11/step-11.cc b/deal.II/examples/step-11/step-11.cc index e09b19f9da..757ad155d6 100644 --- a/deal.II/examples/step-11/step-11.cc +++ b/deal.II/examples/step-11/step-11.cc @@ -561,7 +561,7 @@ void LaplaceProblem::assemble_and_solve () ZeroFunction(), norm_per_cell, QGauss(gauss_degree+1), - H1_seminorm); + VectorTools::H1_seminorm); // Then, the function just called // returns its results as a vector // of values each of which denotes diff --git a/deal.II/examples/step-7/step-7.cc b/deal.II/examples/step-7/step-7.cc index 10e939827c..9475ec96b0 100644 --- a/deal.II/examples/step-7/step-7.cc +++ b/deal.II/examples/step-7/step-7.cc @@ -1164,7 +1164,7 @@ void LaplaceProblem::process_solution (const unsigned int cycle) Solution(), difference_per_cell, QGauss3(), - L2_norm); + VectorTools::L2_norm); // Finally, we want to get the // global L2 norm. This can of // course be obtained by summing @@ -1183,7 +1183,7 @@ void LaplaceProblem::process_solution (const unsigned int cycle) Solution(), difference_per_cell, QGauss3(), - H1_seminorm); + VectorTools::H1_seminorm); const double H1_error = difference_per_cell.l2_norm(); // Finally, we compute the maximum @@ -1218,7 +1218,7 @@ void LaplaceProblem::process_solution (const unsigned int cycle) Solution(), difference_per_cell, q_iterated, - Linfty_norm); + VectorTools::Linfty_norm); // Obviously, the maximal error // globally is the maximum over the // maximal errors on each cell: