]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
exception and documentation added
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 7 Nov 2006 16:40:18 +0000 (16:40 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 7 Nov 2006 16:40:18 +0000 (16:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@14171 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe_tools.h
deal.II/deal.II/source/fe/fe_tools.cc

index 2977d6f5847b41d824f76f4203f9f0f658a5ef91..5021bf6424e55c00fc01e5f0bb54c0a3a7ed2880 100644 (file)
@@ -1135,29 +1135,68 @@ class FETools
                                      * custom element that must be
                                      * added using add_fe_name()
                                      * first.
+                                     *
+                                     * @ingroup Exceptions
                                      */
     DeclException1 (ExcInvalidFEName,
                    std::string,
                    << "Can't re-generate a finite element from the string '"
                    << arg1 << "'.");
     
+                                    /**
+                                     * The string used for
+                                     * get_fe_from_name() cannot be
+                                     * translated to a finite
+                                     * element.
+                                     *
+                                     * Dimension arguments in finite
+                                     * element names should be
+                                     * avoided. If they are there,
+                                     * the dimension should be
+                                     * <tt>dim</tt> or
+                                     * <tt>d</tt>. Here, you gave a
+                                     * numeric dimension argument,
+                                     * which does not match the
+                                     * template dimension of the
+                                     * finite element class.
+                                     *
+                                     * @ingroup Exceptions
+                                     */
+    DeclException2 (ExcInvalidFEDimension,
+                   char, int,
+                   << "The dimension " << arg1
+                   << " in the finite element string must match "
+                   << "the space dimension "
+                   << arg2 << ".");
+    
                                     /**
                                      * Exception
+                                     *
+                                     * @ingroup Exceptions
                                      */
     DeclException0 (ExcInvalidFE);
 
                                      /**
                                       * The finite element must be
                                      * @ref GlossPrimitive "primitive".
+                                     *
+                                     * @ingroup Exceptions
                                       */
     DeclException0 (ExcFEMustBePrimitive);
                                     /**
                                      * Exception
+                                     *
+                                     * @ingroup Exceptions
                                      */
     DeclException0 (ExcTriangulationMismatch);
 
                                     /**
-                                     * Exception
+                                     * A continuous element is used
+                                     * on a mesh with hanging nodes,
+                                     * but the constraint matrices
+                                     * are missing.
+                                     *
+                                     * @ingroup Exceptions
                                      */
     DeclException1 (ExcHangingNodesNotAllowed,
                    int,
@@ -1167,10 +1206,16 @@ class FETools
                    << "additional ConstraintMatrix argument(s), instead.");
                                     /**
                                      * You need at least two grid levels.
+                                     *
+                                     * @ingroup Exceptions
                                      */
     DeclException0 (ExcGridNotRefinedAtLeastOnce);
                                     /**
-                                     * Exception
+                                     * The dimensions of the matrix
+                                     * used did not match the
+                                     * expected dimensions.
+                                     *
+                                     * @ingroup Exceptions
                                      */
     DeclException4 (ExcMatrixDimensionMismatch,
                    int, int, int, int,
@@ -1181,6 +1226,8 @@ class FETools
                                      * Exception thrown if an
                                      * embedding matrix was computed
                                      * inaccurately.
+                                     *
+                                     * @ingroup Exceptions
                                      */
     DeclException1(ExcLeastSquaresError, double,
                   << "Least squares fit leaves a gap of " << arg1);
index 5cfde3e3c169c64d6efa6f014730b91b3de34975..3b17e2ae8a9ab217fadb2ba4f22f90ea4d18af3a 100644 (file)
@@ -1526,10 +1526,9 @@ FETools::get_fe_from_name (const std::string &parameter_name)
       if (pos2-pos1 == 2)
        {
          const char dimchar = '0' + dim;
-//TODO: Write a more explicit exception here!
          if (name.at(pos1+1) != 'd')
            Assert (name.at(pos1+1) == dimchar,
-                   ExcInvalidFEName(name));
+                   ExcInvalidFEDimension(name.at(pos1+1), dim));
        }
       else
         Assert(pos2-pos1 == 4, ExcInvalidFEName(name));

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.