From 7494202a4a8d566232f118e07ff8ff6eae4525a5 Mon Sep 17 00:00:00 2001 From: guido Date: Mon, 19 Jan 2004 11:13:59 +0000 Subject: [PATCH] some cleaning git-svn-id: https://svn.dealii.org/trunk@8324 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/base/include/base/polynomials_bdm.h | 24 +++++++++++++-------- deal.II/base/source/polynomials_bdm.cc | 13 +++++------ 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/deal.II/base/include/base/polynomials_bdm.h b/deal.II/base/include/base/polynomials_bdm.h index 26fa58d8b4..701102564e 100644 --- a/deal.II/base/include/base/polynomials_bdm.h +++ b/deal.II/base/include/base/polynomials_bdm.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2000, 2001, 2002, 2003 by the deal.II authors +// Copyright (C) 2004 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -186,15 +186,14 @@ class PolynomialsBDM * Returns the number of BDM polynomials. */ unsigned int n () const; - + /** - * Exception. + * Returns the degree of the BDM + * space, which is one less than + * the highest polynomial degree. */ - DeclException3 (ExcDimensionMismatch2, - int, int, int, - << "Dimension " << arg1 << " not equal to " << arg2 << " nor to " << arg3); - - + unsigned int degree () const; + private: /** * An object representing the @@ -219,7 +218,7 @@ class PolynomialsBDM * polynomials. */ unsigned int n_pols; - + /** * Auxiliary memory. */ @@ -243,4 +242,11 @@ PolynomialsBDM::n() const return n_pols; } +template +inline unsigned int +PolynomialsBDM::degree() const +{ + return polynomial_space.degree() - 1; +} + #endif diff --git a/deal.II/base/source/polynomials_bdm.cc b/deal.II/base/source/polynomials_bdm.cc index 02862b7490..1a6d62fae3 100644 --- a/deal.II/base/source/polynomials_bdm.cc +++ b/deal.II/base/source/polynomials_bdm.cc @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2000, 2001, 2002, 2003, 2004 by the deal.II authors +// Copyright (C) 2004 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -45,11 +45,11 @@ PolynomialsBDM::compute (const Point &unit_point, std::vector > &grad_grads) const { Assert(values.size()==n_pols || values.size()==0, - ExcDimensionMismatch2(values.size(), n_pols, 0)); + ExcDimensionMismatch(values.size(), n_pols)); Assert(grads.size()==n_pols|| grads.size()==0, - ExcDimensionMismatch2(grads.size(), n_pols, 0)); + ExcDimensionMismatch(grads.size(), n_pols)); Assert(grad_grads.size()==n_pols|| grad_grads.size()==0, - ExcDimensionMismatch2(grad_grads.size(), n_pols, 0)); + ExcDimensionMismatch(grad_grads.size(), n_pols)); const unsigned int n_sub = polynomial_space.n(); p_values.resize((values.size() == 0) ? 0 : n_sub); @@ -69,7 +69,6 @@ PolynomialsBDM::compute (const Point &unit_point, for (unsigned int j=0;j::compute_node_matrix (Table<2,double>& A) const for (unsigned int i=0;i qface(polynomial_space.degree()); + QGauss<1> qface(polynomial_space.degree()+1); Table<2,double> integrals (n(), n()); @@ -147,8 +146,6 @@ PolynomialsBDM::compute_node_matrix (Table<2,double>& A) const p(1) = x; break; } -// std::cerr << p << std::endl; - compute (p, values, grads, grad_grads); for (unsigned int i=0;i