]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Remove functions that are only for the general template, which should never be used.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 12 Jul 2004 13:54:03 +0000 (13:54 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 12 Jul 2004 13:54:03 +0000 (13:54 +0000)
git-svn-id: https://svn.dealii.org/trunk@9500 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 76c1ae4a5e8b4841ec68924deb08db8c19003bee..e6e220f044d96d7a1da0c2f0b818856762d98b7e 100644 (file)
@@ -2,7 +2,7 @@
 //    $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
@@ -25,8 +25,6 @@
 #include <cmath>
 
 
-//TODO[WB]: TriaObjectAccessor<dim,N> should never be used since we have specializations. Can we remove the implementations of functions, or what are they there for?
-
 /*------------------------ Functions: TriaAccessor ---------------------------*/
 
 template <int dim>
@@ -821,288 +819,6 @@ TriaObjectAccessor<3,dim>::operator -- ()
 }
 
 
-/*------------------------ Functions: TriaObjectAccessor ---------------------------*/
-
-
-template <int celldim, int dim>
-inline
-bool
-TriaObjectAccessor<celldim,dim>::used () const
-{
-  Assert (this->state() == IteratorState::valid,
-         typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
-  return this->tria->levels[this->present_level]->hexes.used[this->present_index];
-}
-
-
-
-template<int celldim, int dim>
-inline
-bool
-TriaObjectAccessor<celldim,dim>::user_flag_set () const
-{
-  Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
-  return this->tria->levels[this->present_level]->hexes.user_flags[this->present_index];
-}
-
-
-
-template<int celldim, int dim>
-inline
-void
-TriaObjectAccessor<celldim,dim>::set_user_flag () const
-{
-  Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
-  this->tria->levels[this->present_level]->hexes.user_flags[this->present_index] = true;
-}
-
-
-
-template<int celldim, int dim>
-inline
-void TriaObjectAccessor<celldim,dim>::clear_user_flag () const
-{
-  Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
-  this->tria->levels[this->present_level]->hexes.user_flags[this->present_index] = false;
-}
-
-
-
-template<int celldim, int dim>
-inline
-TriaIterator<dim,TriaObjectAccessor<1,dim> >
-TriaObjectAccessor<celldim,dim>::line (const unsigned int i) const
-{
-  Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
-  Assert (i < GeometryInfo<celldim>::lines_per_cell,
-         ExcIndexRange(i,0,GeometryInfo<celldim>::lines_per_cell));
-
-  switch(celldim)
-    {
-      case 2:
-           return
-             TriaIterator<dim,TriaObjectAccessor<1,dim> >
-             (
-               this->tria,
-               this->present_level,
-               line_index (i)
-             );
-      case 3:
-           if (i<4)
-             return quad(0)->line(i);
-           else
-             if (i<8)
-               return quad(1)->line(i-4);
-             else
-               switch (i) 
-                 {
-                   case 8:
-                         return quad(2)->line(3);
-                   case 9:
-                         return quad(2)->line(1);
-                   case 10:
-                         return quad(4)->line(1);
-                   case 11:
-                         return quad(4)->line(3);
-                 }
-           break;
-      default:
-           Assert(false, ExcNotImplemented());
-    }
-  
-  return TriaIterator<dim,TriaObjectAccessor<1,dim> >(this->tria, -1, -1, 0);
-}
-
-
-
-template<int celldim, int dim>
-inline
-TriaIterator<dim,TriaObjectAccessor<2,dim> >
-TriaObjectAccessor<celldim,dim>::quad (const unsigned int i) const
-{
-  Assert (this->used(), typename TriaAccessor<dim>::ExcCellNotUsed());
-  Assert (i < GeometryInfo<celldim>::quads_per_cell,
-         ExcIndexRange(i,0,GeometryInfo<celldim>::quads_per_cell));
-  return
-    TriaIterator<dim,TriaObjectAccessor<2,dim> >
-    (
-      this->tria,
-      this->present_level,
-      quad_index (i)
-    );
-}
-
-
-
-template<int celldim, int dim>
-inline
-unsigned int
-TriaObjectAccessor<celldim,dim>::line_index (const unsigned int i) const
-{
-  Assert (i < GeometryInfo<celldim>::lines_per_cell,
-         ExcIndexRange(i,0,GeometryInfo<celldim>::lines_per_cell));
-
-  switch(celldim)
-    {
-      case 2:
-           return this->tria->levels[this->present_level]
-             ->quads.quads[this->present_index].line(i);
-      case 3:
-           if (i<4)
-             return quad(0)->line_index(i);
-           else
-             if (i<8)
-               return quad(1)->line_index(i-4);
-             else
-               switch (i) 
-                 {
-                   case 8:
-                         return quad(2)->line_index(3);
-                   case 9:
-                         return quad(2)->line_index(1);
-                   case 10:
-                         return quad(4)->line_index(1);
-                   case 11:
-                         return quad(4)->line_index(3);
-                 };
-           break;
-      default:
-           Assert(false, ExcNotImplemented());
-    }    
-  return 0;
-}
-
-
-
-template<int celldim, int dim>
-inline
-unsigned int
-TriaObjectAccessor<celldim,dim>::quad_index (const unsigned int i) const
-{
-  Assert (i < GeometryInfo<celldim>::quads_per_cell,
-         ExcIndexRange(i,0,GeometryInfo<celldim>::quads_per_cell));
-
-  return this->tria->levels[this->present_level]->hexes.hexes[this->present_index].quad(i);
-}
-
-
-
-template<int celldim, int dim>
-inline
-TriaIterator<dim,TriaObjectAccessor<celldim,dim> >
-TriaObjectAccessor<celldim,dim>::child (const unsigned int i) const
-{
-  Assert (i < GeometryInfo<celldim>::children_per_cell,
-         ExcIndexRange(i,0,GeometryInfo<celldim>::children_per_cell));
-  
-  TriaIterator<dim,TriaObjectAccessor<celldim,dim> >
-    q (this->tria, this->present_level+1, child_index (i));
-  
-  Assert ((q.state() == IteratorState::past_the_end) || q->used(),
-         typename TriaAccessor<dim>::ExcUnusedCellAsChild());
-
-  return q;
-}
-
-
-
-template<int celldim, int dim>
-inline
-int TriaObjectAccessor<celldim,dim>::child_index (const unsigned int i) const
-{
-  Assert (i < GeometryInfo<celldim>::children_per_cell,
-         ExcIndexRange(i,0,GeometryInfo<celldim>::children_per_cell));
-  return this->tria->levels[this->present_level]->hexes.children[this->present_index]+i;
-}
-
-
-
-template<int celldim, int dim>
-bool TriaObjectAccessor<celldim,dim>::has_children () const
-{
-  Assert (this->state() == IteratorState::valid,
-         typename TriaAccessor<dim>::ExcDereferenceInvalidObject());
-  return (this->tria->levels[this->present_level]->hexes.children[this->present_index] != -1);
-}
-
-
-
-template<int celldim, int dim>
-inline
-unsigned int
-TriaObjectAccessor<celldim,dim>::max_refinement_depth () const
-{
-  if (!has_children())
-    return 0;
-
-  const unsigned int depths[8] = { child(0)->max_refinement_depth() + 1,
-                                  child(1)->max_refinement_depth() + 1,
-                                  child(2)->max_refinement_depth() + 1,
-                                  child(3)->max_refinement_depth() + 1,
-                                  child(4)->max_refinement_depth() + 1,
-                                  child(5)->max_refinement_depth() + 1,
-                                  child(6)->max_refinement_depth() + 1,
-                                  child(7)->max_refinement_depth() + 1  };
-  return std::max (std::max (std::max (depths[0], depths[1]),
-                            std::max (depths[2], depths[3])),
-                  std::max (std::max (depths[4], depths[5]),
-                            std::max (depths[6], depths[7])));
-}
-
-
-
-template<int celldim, int dim>
-inline
-void
-TriaObjectAccessor<celldim,dim>::operator ++ ()
-{
-  ++this->present_index;
-                                  // is index still in the range of
-                                  // the vector?
-  while (this->present_index
-        >=
-        static_cast<int>(this->tria->levels[this->present_level]->hexes.hexes.size()))
-    {
-                                      // no -> go one level up
-      ++this->present_level;
-      this->present_index = 0;
-                                      // highest level reached?
-      if (this->present_level >= static_cast<int>(this->tria->levels.size()))
-       {
-                                          // return with past the end pointer
-         this->present_level = this->present_index = -1;
-         return;
-       };
-    };
-}
-
-
-
-template<int celldim, int dim>
-inline
-void
-TriaObjectAccessor<celldim,dim>::operator -- ()
-{
-  --this->present_index;
-                                  // is index still in the range of
-                                  // the vector?
-  while (this->present_index < 0) 
-    {
-                                      // no -> go one level down
-      --this->present_level;
-                                      // lowest level reached?
-      if (this->present_level == -1) 
-       {
-                                          // return with past the end pointer
-         this->present_level = this->present_index = -1;
-         return;
-       };
-                                      // else
-      this->present_index = this->tria->levels[this->present_level]->hexes.hexes.size()-1;
-    };
-}
-
-
 /*------------------------ Functions: CellAccessor<dim> -----------------------*/
 
 

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.