// $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
* 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
* polynomials.
*/
unsigned int n_pols;
-
+
/**
* Auxiliary memory.
*/
return n_pols;
}
+template <int dim>
+inline unsigned int
+PolynomialsBDM<dim>::degree() const
+{
+ return polynomial_space.degree() - 1;
+}
+
#endif
// $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
std::vector<Tensor<3,dim> > &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);
for (unsigned int j=0;j<dim;++j)
{
values[i+j*n_sub][j] = p_values[i];
-// std::cerr << i+j*n_sub << ' ' << j << ' ' << p_values[i] << std::endl;
}
}
for (unsigned int i=0;i<legendre.size();++i)
legendre[i] = Legendre(i);
- QGauss<1> qface(polynomial_space.degree());
+ QGauss<1> qface(polynomial_space.degree()+1);
Table<2,double> integrals (n(), n());
p(1) = x;
break;
}
-// std::cerr << p << std::endl;
-
compute (p, values, grads, grad_grads);
for (unsigned int i=0;i<n();++i)
{