]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Address comments 6344/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 26 Apr 2018 20:38:06 +0000 (22:38 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 26 Apr 2018 20:46:41 +0000 (22:46 +0200)
source/base/function_lib.cc
source/distributed/tria.cc

index ae9838e1495ca0729259b39c80869027878fa9d1..9d4949c363f9960b95f323cca69dec9bd212543e 100644 (file)
@@ -2194,11 +2194,11 @@ namespace Functions
   {
     Assert(dim==2, ExcNotImplemented());
     const double r = p.distance(center);
-#ifdef DEAL_II_HAVE_JN
-    return jn(order, r*wave_number);
-#else
+#ifndef DEAL_II_HAVE_JN
     Assert(false, ExcMessage("The Bessel function jn was not found by CMake."));
     return r;
+#else
+    return jn(order, r*wave_number);
 #endif
   }
 
@@ -2232,7 +2232,11 @@ namespace Functions
                           const unsigned int) const
   {
     Assert(dim==2, ExcNotImplemented());
-#ifdef DEAL_II_HAVE_JN
+#ifndef DEAL_II_HAVE_JN
+    (void) p;
+    Assert(false, ExcMessage("The Bessel function jn was not found by CMake."));
+    return Tensor<1,dim>();
+#else
     const double r = p.distance(center);
     const double co = (r==0.) ? 0. : (p(0)-center(0))/r;
     const double si = (r==0.) ? 0. : (p(1)-center(1))/r;
@@ -2244,10 +2248,6 @@ namespace Functions
     result[0] = wave_number * co * dJn;
     result[1] = wave_number * si * dJn;
     return result;
-#else
-    (void) p;
-    Assert(false, ExcMessage("The Bessel function jn was not found by CMake."));
-    return Tensor<1,dim>();
 #endif
   }
 
index d653e0421b77c493404a87c4e6875b6dd52e2fb3..21a554bb65783e3488f57def8c438ed5d994e3e7 100644 (file)
@@ -514,14 +514,14 @@ namespace
 
   template <int dim, int spacedim>
   void
-  match_quadrant (const dealii::Triangulation<dim,spacedim>      *tria,
-                  unsigned int                                    dealii_index,
-                  typename internal::p4est::types<dim>::quadrant &ghost_quadrant,
-                  types::subdomain_id                             ghost_owner)
+  match_quadrant (const dealii::Triangulation<dim,spacedim>            *tria,
+                  unsigned int                                          dealii_index,
+                  const typename internal::p4est::types<dim>::quadrant &ghost_quadrant,
+                  types::subdomain_id                                   ghost_owner)
   {
-    int l = ghost_quadrant.level;
+    const int l = ghost_quadrant.level;
 
-    for (int i = 0; i < l; i++)
+    for (int i = 0; i < l; ++i)
       {
         typename Triangulation<dim,spacedim>::cell_iterator cell (tria, i, dealii_index);
         if (cell->has_children () == false)

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.