]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add access to the raw number of level objects
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 13 Feb 2006 16:16:59 +0000 (16:16 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Mon, 13 Feb 2006 16:16:59 +0000 (16:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@12361 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/tria.h
deal.II/deal.II/source/grid/tria.cc

index ec40f38ac50c85b6b6a8379be7e6c321c7b09c73..6bb75d92e7eb02d0347c2d11cbda4cdb3054a4d2 100644 (file)
@@ -2580,6 +2580,22 @@ class Triangulation : public Subscriptor
                                      */
     unsigned int n_active_faces (const unsigned int level) const;
 
+
+                                    /**
+                                     * Number of lines, used or unused.
+                                     */
+    unsigned int n_raw_lines(const unsigned int level) const;
+
+                                    /**
+                                     * Number of quads, used or unused.
+                                     */
+    unsigned int n_raw_quads(const unsigned int level) const;
+
+                                    /**
+                                     * Number of hexes, used or unused.
+                                     */
+    unsigned int n_raw_hexs(const unsigned int level) const;
+
                                     /**
                                      * Return number of levels in use. This
                                      * may be less than the number of levels
@@ -2627,7 +2643,7 @@ class Triangulation : public Subscriptor
                                      */
     const std::vector<Point<dim> > &
     get_vertices () const;
-    
+
                                     /**
                                      * Return the number of vertices
                                      * that are presently in use,
@@ -3071,9 +3087,9 @@ class Triangulation : public Subscriptor
     friend class TriaRawIterator<3,TriaObjectAccessor<3, 3> >;
     friend class TriaRawIterator<3,CellAccessor<3> >;
 
-    friend class DoFHandler<dim>;
-    friend class hp::DoFHandler<dim>;
-    friend class MGDoFHandler<dim>;
+//    friend class DoFHandler<dim>;
+//    friend class hp::DoFHandler<dim>;
+//    friend class MGDoFHandler<dim>;
 };
 
 
index c73d65c6fee961bd78022e2dbad4d5ec99975cee..b905d30af7998056038a8581e9f671f4d5c93552 100644 (file)
@@ -4057,6 +4057,14 @@ unsigned int Triangulation<dim>::n_lines () const {
 }
 
 
+template <int dim>
+unsigned int Triangulation<dim>::n_raw_lines (const unsigned int level) const
+{
+  Assert(levels<n_levels(), ExcIndexRange(level,0,n_levels()));
+  return levels[level]->lines.lines.size();
+}
+
+
 template <int dim>
 unsigned int Triangulation<dim>::n_lines (const unsigned int level) const {
   Assert (level < number_cache.n_lines_level.size(),
@@ -4097,6 +4105,20 @@ unsigned int Triangulation<1>::n_quads (const unsigned int) const
 }
 
 
+template <int dim>
+unsigned int Triangulation<dim>::n_raw_quads (const unsigned int level) const
+{
+  return 0;
+}
+
+
+template <int dim>
+unsigned int Triangulation<dim>::n_raw_hexs (const unsigned int level) const
+{
+  return 0;
+}
+
+
 template <>
 unsigned int Triangulation<1>::n_active_quads (const unsigned int) const
 {
@@ -4129,6 +4151,21 @@ unsigned int Triangulation<dim>::n_quads (const unsigned int level) const {
 }
 
 
+template <int dim>
+unsigned int Triangulation<dim>::n_raw_quads (const unsigned int level) const
+{
+  Assert(levels<n_levels(), ExcIndexRange(level,0,n_levels()));
+  return levels[level]->quads.quads.size();
+}
+
+
+template <int dim>
+unsigned int Triangulation<dim>::n_raw_hexs (const unsigned int level) const
+{
+  return 0;
+}
+
+
 template <int dim>
 unsigned int Triangulation<dim>::n_active_quads () const {
   return number_cache.n_active_quads;
@@ -4199,6 +4236,22 @@ unsigned int Triangulation<dim>::n_hexs (const unsigned int level) const
 
 
 
+template <int dim>
+unsigned int Triangulation<dim>::n_raw_quads (const unsigned int level) const
+{
+  Assert(levels<n_levels(), ExcIndexRange(level,0,n_levels()));
+  return levels[level]->quads.quads.size();
+}
+
+
+template <int dim>
+unsigned int Triangulation<dim>::n_raw_hexs (const unsigned int level) const
+{
+  Assert(levels<n_levels(), ExcIndexRange(level,0,n_levels()));
+  return levels[level]->hexs.hexs.size();
+}
+
+
 template <int dim>
 unsigned int Triangulation<dim>::n_active_hexs () const
 {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.