// $Id$
// Version: $Name$
//
-// Copyright (C) 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
class PolynomialSpace
{
public:
+ /**
+ * Access to the dimension of
+ * this object, for checking and
+ * automatic setting of dimension
+ * in other classes.
+ */
+ static const unsigned int dimension = dim;
+
/**
* Constructor. <tt>pols</tt> is a
* vector of pointers to
// $Id$
// Version: $Name$
//
-// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
class TensorProductPolynomials
{
public:
+ /**
+ * Access to the dimension of
+ * this object, for checking and
+ * automatic setting of dimension
+ * in other classes.
+ */
+ static const unsigned int dimension = dim;
+
/**
* Constructor. <tt>pols</tt> is
* a vector of objects that
// $Id$
// Version: $Name$
//
-// Copyright (C) 2004, 2005, 2006, 2007 by the deal.II authors
+// Copyright (C) 2004, 2005, 2006, 2007, 2009 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
* functions depend on the cells in real space, the update_once() and
* update_each() functions must be overloaded.
*
- * Todos:
- * - checke dim of POLY
- * - templatisiere nur auf POLY, dim ergibt sich durch POLY::dim
- *
* @author Ralf Hartmann 2004
**/
-template <class POLY, int dim/*=POLY::dim*/, int spacedim=dim>
+template <class POLY, int dim=POLY::dimension, int spacedim=dim>
class FE_Poly : public FiniteElement<dim,spacedim>
{
public:
restriction_is_additive_flags,
nonzero_components),
poly_space(poly_space)
-{}
+{
+ AssertDimension(dim, POLY::dimension);
+}
template <class POLY, int dim, int spacedim>