]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
an unrefined cell has no children
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 Jul 2008 10:03:08 +0000 (10:03 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 Jul 2008 10:03:08 +0000 (10:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@16447 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/tria_accessor.h
deal.II/deal.II/include/grid/tria_accessor.templates.h

index 83bb7515cadb965012c843d7243f885d7865bfb0..0db0d914401540b729f67de0f666718fb4482a79 100644 (file)
@@ -894,12 +894,9 @@ class TriaObjectAccessor :  public TriaAccessor<celldim,dim>
 
                                     /**
                                      * Return the number of immediate
-                                     * children of this object.
-                                     *
-                                     * An assertion assures that this
-                                     * function can only be called
-                                     * for TriaObjects with
-                                     * <tt>has_children()==true</tt>.
+                                     * children of this object. The
+                                     * number of children of an
+                                     * unrefined cell is zero.
                                      */
     unsigned int n_children() const;
     
@@ -1647,11 +1644,6 @@ class TriaObjectAccessor<1, dim> :  public TriaAccessor<1,dim>
                                     /**
                                      * Return the number of immediate
                                      * children of this object.
-                                     *
-                                     * An assertion assures that this
-                                     * function can only be called
-                                     * for TriaObjects with
-                                     * <tt>has_children()==true</tt>.
                                      */
     unsigned int n_children() const;
 
@@ -2372,11 +2364,6 @@ class TriaObjectAccessor<2, dim> :  public TriaAccessor<2,dim>
                                     /**
                                      * Return the number of immediate
                                      * children of this object.
-                                     *
-                                     * An assertion assures that this
-                                     * function can only be called
-                                     * for TriaObjects with
-                                     * <tt>has_children()==true</tt>.
                                      */
     unsigned int n_children() const;
 
@@ -3152,11 +3139,6 @@ class TriaObjectAccessor<3, dim> :  public TriaAccessor<3,dim>
                                     /**
                                      * Return the number of immediate
                                      * children of this object.
-                                     *
-                                     * An assertion assures that this
-                                     * function can only be called
-                                     * for TriaObjects with
-                                     * <tt>has_children()==true</tt>.
                                      */
     unsigned int n_children() const;
 
index 87326b5840f69b5c61c628da8263cfa2793935b0..955b57c12445770cbb8facc1a625798c686bdc41 100644 (file)
@@ -395,8 +395,7 @@ inline
 unsigned int
 TriaObjectAccessor<1,dim>::n_children () const
 {
-  Assert (has_children()==true, TriaAccessorExceptions::ExcCellHasNoChildren());
-  return GeometryInfo<1>::max_children_per_cell;
+  return (has_children() ? GeometryInfo<1>::max_children_per_cell : 0);
 }
 
 
@@ -833,12 +832,10 @@ inline
 unsigned int
 TriaObjectAccessor<2,dim>::n_children () const
 {
-  Assert (has_children()==true, TriaAccessorExceptions::ExcCellHasNoChildren());
   Assert (static_cast<unsigned int> (this->present_index) <
          objects().refinement_cases.size(),
          ExcIndexRange(this->present_index, 0,
                        objects().refinement_cases.size()));
-
   return GeometryInfo<2>::n_children(refinement_case());
 }
 
@@ -1301,7 +1298,6 @@ inline
 unsigned int
 TriaObjectAccessor<3,3>::n_children () const
 {
-  Assert (has_children()==true, TriaAccessorExceptions::ExcCellHasNoChildren());
   Assert (static_cast<unsigned int> (this->present_index) <
          this->tria->levels[this->present_level]->cells.refinement_cases.size(),
          ExcIndexRange(this->present_index, 0,

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.