From: Wolfgang Bangerth Date: Sun, 28 Sep 2014 18:05:49 +0000 (-0500) Subject: Reindent and fix the issues discussed in the original pull request. X-Git-Tag: v8.2.0-rc1~122^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3371eb75dac8c7612d9dadb0020ba67420193151;p=dealii.git Reindent and fix the issues discussed in the original pull request. --- diff --git a/examples/step-36/step-36.cc b/examples/step-36/step-36.cc index 4b5c78c59b..9e9eaf98a1 100644 --- a/examples/step-36/step-36.cc +++ b/examples/step-36/step-36.cc @@ -1,6 +1,6 @@ /* --------------------------------------------------------------------- * - * Copyright (C) 2009 - 2013 by the deal.II authors + * Copyright (C) 2009 - 2014 by the deal.II authors * * This file is part of the deal.II library. * @@ -294,25 +294,22 @@ namespace Step36 mass_matrix.compress (VectorOperation::add); - // Before leaving the function, - // we calculate spurious eigenvalues, + // Before leaving the function, we calculate spurious eigenvalues, // introduced to the system by zero Dirichlet constraints. - double min_ev = 1e+10, - max_ev = -min_ev; + double min_ev = std::numeric_limits::max(), + max_ev = -std::numeric_limits::max(); for (unsigned int ind = 0; ind < dof_handler.n_dofs(); ind++) if (constraints.is_constrained(ind)) - { - const double ev = stiffness_matrix(ind,ind)/mass_matrix(ind,ind); - if ( min_ev > ev ) - min_ev = ev; - if ( max_ev < ev ) - max_ev = ev; - } + { + const double ev = stiffness_matrix(ind,ind)/mass_matrix(ind,ind); + min_ev = std::min (min_ev, ev); + max_ev = std::max (max_ev, ev); + } std::cout << " Spurious eigenvalues are in " - << "["<