*/
unsigned int n_active_cells (const unsigned int level) const;
+ /**
+ * Return total number of used faces,
+ * active or not.
+ * Maps to <tt>n_lines()</tt> in two space
+ * dimensions and so on.
+ */
+ unsigned int n_faces () const;
+
+ /**
+ * Return total number of used faces,
+ * active or not, on level @p level.
+ * Maps to <tt>n_lines(level)</tt> in two space
+ * dimensions and so on.
+ */
+ unsigned int n_faces (const unsigned int level) const;
+
+ /**
+ * Return total number of active faces.
+ * Maps to <tt>n_active_lines()</tt> in two space
+ * dimensions and so on.
+ */
+ unsigned int n_active_faces () const;
+
+ /**
+ * Return total number of active faces
+ * on level @p level.
+ * Maps to <tt>n_active_lines(level)</tt> in two
+ * space dimensions and so on.
+ */
+ unsigned int n_active_faces (const unsigned int level) const;
+
/**
* Return number of levels in use. This
* may be less than the number of levels
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
}
-
bool
SubCellData::check_consistency (const unsigned int dim) const
{
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
template <int dim>
typename TriaDimensionInfo<dim>::hex_iterator
-Triangulation<dim>::end_hex (const unsigned int level) const {
+Triangulation<dim>::end_hex (const unsigned int level) const
+{
return (level == levels.size()-1 ?
hex_iterator(end_hex()) :
begin_hex (level+1));
template <int dim>
typename TriaDimensionInfo<dim>::active_hex_iterator
-Triangulation<dim>::end_active_hex (const unsigned int level) const {
+Triangulation<dim>::end_active_hex (const unsigned int level) const
+{
return (level == levels.size()-1 ?
active_hex_iterator(end_hex()) :
begin_active_hex (level+1));
template <int dim>
-unsigned int Triangulation<dim>::n_cells () const {
+unsigned int Triangulation<dim>::n_cells () const
+{
unsigned int n=0;
for (unsigned int l=0; l<levels.size(); ++l)
n += n_cells (l);
template <int dim>
-unsigned int Triangulation<dim>::n_active_cells () const {
+unsigned int Triangulation<dim>::n_active_cells () const
+{
unsigned int n=0;
for (unsigned int l=0; l<levels.size(); ++l)
n += n_active_cells (l);
}
+template <int dim>
+unsigned int Triangulation<dim>::n_faces () const
+{
+ unsigned int n=0;
+ for (unsigned int l=0; l<levels.size(); ++l)
+ n += n_faces (l);
+ return n;
+}
+
+
+template <int dim>
+unsigned int Triangulation<dim>::n_active_faces () const
+{
+ unsigned int n=0;
+ for (unsigned int l=0; l<levels.size(); ++l)
+ n += n_active_faces (l);
+ return n;
+}
+
+
+template <int dim>
+unsigned int
+Triangulation<dim>::n_faces(unsigned int l) const
+{
+ if (dim==2) return n_lines(l);
+ if (dim==3) return n_quads(l);
+ return 0;
+}
+
+
+
+template <int dim>
+unsigned int
+Triangulation<dim>::n_active_faces(unsigned int l) const
+{
+ if (dim==2) return n_active_lines(l);
+ if (dim==3) return n_active_quads(l);
+ return 0;
+}
+
+
+
#if deal_II_dimension == 1
template <>