From 3890490d846063b7b6508603676cd7a5c19bcc68 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 26 Apr 2018 22:38:06 +0200 Subject: [PATCH] Address comments --- source/base/function_lib.cc | 16 ++++++++-------- source/distributed/tria.cc | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) 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) -- 2.39.5