]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix one TODO (how to generate infinity).
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 29 Mar 2001 14:26:06 +0000 (14:26 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 29 Mar 2001 14:26:06 +0000 (14:26 +0000)
git-svn-id: https://svn.dealii.org/trunk@4326 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/function_lib.cc

index bf5221eb31a14cf9be91545bb54f2ce83f38f7ae..f85934393451e7332173165df631df74c8f2c868 100644 (file)
@@ -859,11 +859,13 @@ LSingularityFunction::gradient (const Point<2>   &p,
 
   if ((x>=0) && (y>=0))
     {
-//TODO: should return infinity, but how to do that?
-      static const double infty[2] = {0., 0.};
+                                      // in this region, the gradient
+                                      // does not exist, so return
+                                      // infinity
+      static const double infty[2] = { atof("Inf"), atof("Inf") };
       return Tensor<1,2>(infty);
     }
-  
+
 //  double phi = atan2(y,-x)+M_PI;
 //  double r2 = x*x+y*y;
 

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.