]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Move the NormType enum to VectorTools.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 29 Nov 2001 10:08:40 +0000 (10:08 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 29 Nov 2001 10:08:40 +0000 (10:08 +0000)
git-svn-id: https://svn.dealii.org/trunk@5304 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/vectors.h
deal.II/examples/step-11/step-11.cc
deal.II/examples/step-7/step-7.cc

index ad684a8d3e0f7d70d80d7f62fcf693e8de313037..dd2e555363c86789292732bf94c96e36b7bf6ac0 100644 (file)
@@ -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
index e09b19f9da2fa250ec370bcd03085c00b03f44bd..757ad155d66240ff12f1e9cef4800a44f210f07f 100644 (file)
@@ -561,7 +561,7 @@ void LaplaceProblem<dim>::assemble_and_solve ()
                                     ZeroFunction<dim>(),
                                     norm_per_cell,
                                     QGauss<dim>(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
index 10e939827c05b554cd76c753f5fb8893a0b6bc35..9475ec96b05153b0171310beab79208203708f27 100644 (file)
@@ -1164,7 +1164,7 @@ void LaplaceProblem<dim>::process_solution (const unsigned int cycle)
                                     Solution<dim>(),
                                     difference_per_cell,
                                     QGauss3<dim>(),
-                                    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<dim>::process_solution (const unsigned int cycle)
                                     Solution<dim>(),
                                     difference_per_cell,
                                     QGauss3<dim>(),
-                                    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<dim>::process_solution (const unsigned int cycle)
                                     Solution<dim>(),
                                     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:

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.