]> https://gitweb.dealii.org/ - dealii.git/commitdiff
JumpFunction: Fix an unset variable warning. 17188/head
authorDavid Wells <drwells@email.unc.edu>
Mon, 1 Jul 2024 12:34:41 +0000 (08:34 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 1 Jul 2024 12:34:59 +0000 (08:34 -0400)
Not really a bug but my compiler complains about it.

source/base/function_lib.cc

index 3fbe3e185f778be425a10965d861747860f5039b..bf1dad3ccd31c84f4494553b092920715596a324 100644 (file)
@@ -1811,7 +1811,8 @@ namespace Functions
         case 2:
           angle = std::atan2(direction[0], direction[1]);
           break;
-        case 3:
+        default:
+          angle = std::numeric_limits<double>::signaling_NaN();
           DEAL_II_NOT_IMPLEMENTED();
       }
     sine   = std::sin(angle);

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.