From: Daniel Arndt Date: Thu, 26 Apr 2018 20:38:06 +0000 (+0200) Subject: Address comments X-Git-Tag: v9.0.0-rc1~99^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3890490d846063b7b6508603676cd7a5c19bcc68;p=dealii.git Address comments --- diff --git a/source/base/function_lib.cc b/source/base/function_lib.cc index ae9838e149..9d4949c363 100644 --- a/source/base/function_lib.cc +++ b/source/base/function_lib.cc @@ -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 } diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index d653e0421b..21a554bb65 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -514,14 +514,14 @@ namespace template void - match_quadrant (const dealii::Triangulation *tria, - unsigned int dealii_index, - typename internal::p4est::types::quadrant &ghost_quadrant, - types::subdomain_id ghost_owner) + match_quadrant (const dealii::Triangulation *tria, + unsigned int dealii_index, + const typename internal::p4est::types::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::cell_iterator cell (tria, i, dealii_index); if (cell->has_children () == false)