]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Q1WedgeFunction only makes sense if dim>=2
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 15 Jan 2004 22:27:16 +0000 (22:27 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 15 Jan 2004 22:27:16 +0000 (22:27 +0000)
git-svn-id: https://svn.dealii.org/trunk@8321 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/function_lib.cc

index b1892e52d68cb73097488b4386b75832d4d9c4e7..c6879c456375d3bee5b92eefd9215c285b3c9134 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -117,6 +117,7 @@ namespace Functions
   Q1WedgeFunction<dim>::value (const Point<dim>   &p,
                               const unsigned int) const
   {
+    Assert (dim>=2, ExcInternalError());
     return p(0)*p(1);
   }
   
@@ -128,6 +129,7 @@ namespace Functions
                                    std::vector<double>            &values,
                                    const unsigned int) const
   {
+    Assert (dim>=2, ExcInternalError());
     Assert (values.size() == points.size(),
            ExcDimensionMismatch(values.size(), points.size()));
     
@@ -144,6 +146,7 @@ namespace Functions
   Q1WedgeFunction<dim>::laplacian (const Point<dim>   &,
                                   const unsigned int) const
   {
+    Assert (dim>=2, ExcInternalError());
     return 0.;
   }
   
@@ -154,6 +157,7 @@ namespace Functions
                                        std::vector<double>            &values,
                                        const unsigned int) const
   {
+    Assert (dim>=2, ExcInternalError());
     Assert (values.size() == points.size(),
            ExcDimensionMismatch(values.size(), points.size()));
     
@@ -168,6 +172,7 @@ namespace Functions
   Q1WedgeFunction<dim>::gradient (const Point<dim>   &p,
                                  const unsigned int) const
   {
+    Assert (dim>=2, ExcInternalError());
     Tensor<1,dim> erg;
     erg[0] = p(1);
     erg[1] = p(0);
@@ -182,6 +187,7 @@ namespace Functions
                                       std::vector<Tensor<1,dim> >    &gradients,
                                       const unsigned int) const
   {
+    Assert (dim>=2, ExcInternalError());
     Assert (gradients.size() == points.size(),
            ExcDimensionMismatch(gradients.size(), points.size()));
     

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.