From b4828e14d323c660ef22cb4b2e277a09cb9d4b80 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Wed, 11 Aug 2010 14:00:36 +0000 Subject: [PATCH] Fixed typo in documentation. git-svn-id: https://svn.dealii.org/trunk@21644 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/quadrature_lib.h | 40 +++++++++++----------- deal.II/base/source/quadrature_lib.cc | 16 ++++----- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/deal.II/base/include/base/quadrature_lib.h b/deal.II/base/include/base/quadrature_lib.h index 78efbce072..c51533b26c 100644 --- a/deal.II/base/include/base/quadrature_lib.h +++ b/deal.II/base/include/base/quadrature_lib.h @@ -64,10 +64,10 @@ class QGauss : public Quadrature * the Gauss-Lobatto-Legendre quadrature (alpha = beta = 0) * is a special case. * - * @sa http://en.wikipedia.org/wiki/Handbook_of_Mathematical_Functions + * @sa http://en.wikipedia.org/wiki/Handbook_of_Mathematical_Functions * @sa Karniadakis, G.E. and Sherwin, S.J.: - * Spectral/hp element methods for computational fluid dynamics. - * Oxford: Oxford University Press, 2005 + * Spectral/hp element methods for computational fluid dynamics. + * Oxford: Oxford University Press, 2005 * * @author Guido Kanschat, 2005, 2006; F. Prill, 2006 */ @@ -113,7 +113,7 @@ class QGaussLobatto : public Quadrature compute_quadrature_weights (const std::vector &x, const int alpha, const int beta) const; - + /** * Evaluate a Jacobi polynomial * $ P^{\alpha, \beta}_n(x) $ @@ -131,13 +131,13 @@ class QGaussLobatto : public Quadrature /** * Evaluate the Gamma function - * $ \Gamma(n) = (n-1)! $. + * $ \Gamma(n) = (n-1)! $. * @param n point of evaluation (integer). */ long double gamma(const unsigned int n) const; }; - + /** * @deprecated Use QGauss for arbitrary order Gauss formulae instead! @@ -263,7 +263,7 @@ class QMidpoint : public Quadrature /** - * Simpson quadrature rule, exact for polynomials of degree 3. + * Simpson quadrature rule, exact for polynomials of degree 3. */ template class QSimpson : public Quadrature @@ -329,20 +329,20 @@ class QGaussLog : public Quadrature public: /** * Generate a formula with - * n quadrature points + * n quadrature points */ QGaussLog(const unsigned int n, const bool revert=false); - - protected: - /** + + protected: + /** * Sets the points of the * quadrature formula. */ std::vector set_quadrature_points(const unsigned int n) const; - /** + /** * Sets the weights of the * quadrature formula. */ @@ -375,7 +375,7 @@ class QGaussLog : public Quadrature * alpha is 1, then this quadrature is the same as QGaussLog. * * The last argument from the constructor allows you to use this - * quadrature rule in one of two possible ways: + * quadrature rule in one of two possible ways: * \f[ * \int_0^1 g(x) dx = * \int_0^1 f(x) \ln\left(\frac{|x-x_0|}{\alpha}\right) dx @@ -413,8 +413,8 @@ class QGaussLogR : public Quadrature * it is factored out, to be included in * the integrand. */ - QGaussLogR(const unsigned int n, - const Point x0 = Point(), + QGaussLogR(const unsigned int n, + const Point x0 = Point(), const double alpha = 1, const bool factor_out_singular_weight=false); @@ -434,7 +434,7 @@ class QGaussLogR : public Quadrature * element $[0,1]^2$, where $f$ is a smooth function without * singularities, and $R$ is the distance from the point $x$ to the vertex * $\xi$, given at construction time by specifying its index. Notice that - * this distance is evaluated in the reference element. + * this distance is evaluated in the reference element. * * This quadrature formula is obtained from two QGauss quadrature * formulas, upon transforming them into polar coordinate system @@ -450,7 +450,7 @@ class QGaussLogR : public Quadrature * Upon construction it is possible to specify wether we want the * singularity removed, or not. In other words, this quadrature can be * used to integrate $g(x) = 1/R\ f(x)$, or simply $f(x)$, with the $1/R$ - * factor already included in the quadrature weights. + * factor already included in the quadrature weights. */ template class QGaussOneOverR : public Quadrature @@ -490,7 +490,7 @@ class QGaussOneOverR : public Quadrature * } * @endcode */ - QGaussOneOverR(const unsigned int n, + QGaussOneOverR(const unsigned int n, const Point singularity, const bool factor_out_singular_weight=false); /** @@ -529,7 +529,7 @@ class QGaussOneOverR : public Quadrature * } * @endcode */ - QGaussOneOverR(const unsigned int n, + QGaussOneOverR(const unsigned int n, const unsigned int vertex_index, const bool factor_out_singular_weight=false); private: @@ -559,7 +559,7 @@ template <> long double QGaussLobatto<1>:: JacobiP(const long double, const int, const int, const unsigned int) const; template <> -long double +long double QGaussLobatto<1>::gamma(const unsigned int n) const; template <> std::vector QGaussLog<1>::set_quadrature_points(const unsigned int) const; diff --git a/deal.II/base/source/quadrature_lib.cc b/deal.II/base/source/quadrature_lib.cc index 3331fa173a..4370d4bf51 100644 --- a/deal.II/base/source/quadrature_lib.cc +++ b/deal.II/base/source/quadrature_lib.cc @@ -90,7 +90,7 @@ QGauss<1>::QGauss (const unsigned int n) // double exists and is described // by std::numeric_limits, we may // not actually get the additional - // precission. One case where this + // precision. One case where this // happens is on x86, where one can // set hardware flags that disable // long double precision even for @@ -104,7 +104,7 @@ QGauss<1>::QGauss (const unsigned int n) // a similar situation exists, btw, // when running programs under // valgrind up to and including at - // least version 3.1: valgrind's + // least version 3.3: valgrind's // emulator only supports 64 bit // arithmetic, even for 80 bit long // doubles. @@ -1034,21 +1034,21 @@ QGaussOneOverR<2>::QGaussOneOverR(const unsigned int n, origins.push_back(Point<2>(singularity[0],0.)); origins.push_back(Point<2>(0.,singularity[1])); origins.push_back(singularity); - + // Lexycographical ordering. - + double eps = 1e-8; unsigned int q_id = 0; // Current quad point index. double area = 0; Point<2> dist; - for(unsigned int box=0; box<4; ++box) + for(unsigned int box=0; box<4; ++box) { dist = (singularity-GeometryInfo<2>::unit_cell_vertex(box)); - dist = Point<2>(std::abs(dist[0]), std::abs(dist[1])); + dist = Point<2>(std::abs(dist[0]), std::abs(dist[1])); area = dist[0]*dist[1]; - if(area > eps) - for(unsigned int q=0; q eps) + for(unsigned int q=0; q &qp = quads[box].point(q); this->quadrature_points[q_id] = -- 2.39.5