]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Merge a bunch of code.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 1 May 2006 22:00:23 +0000 (22:00 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 1 May 2006 22:00:23 +0000 (22:00 +0000)
git-svn-id: https://svn.dealii.org/trunk@12945 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_accessor.templates.h

index 2f4702ed62e1355ed623464c41885f0298c7157a..a3de91ff911da1e7ca6bb004f5fbfae7afe847a5 100644 (file)
@@ -190,6 +190,46 @@ DoFObjectAccessor (const Triangulation<DH::dimension> *tria,
 
 
 
+template <class DH>
+inline
+void
+DoFObjectAccessor<1,DH>::get_dof_indices (std::vector<unsigned int> &dof_indices,
+                                         const unsigned int         fe_index) const
+{
+  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
+          ExcMessage ("DoFHandler not initialized"));
+
+  Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0, typename BaseClass::ExcInvalidObject());
+  Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
+                                this->dof_handler->get_fe()[fe_index].dofs_per_line),
+         typename BaseClass::ExcVectorDoesNotMatch());
+
+                                  // this function really only makes
+                                  // sense on non-active objects if
+                                  // all degrees of freedom are
+                                  // located on vertices, since
+                                  // otherwise there are degrees of
+                                  // freedom on sub-objects which are
+                                  // not allocated for this
+                                  // non-active thing
+  Assert (!this->has_children() ||
+         (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
+          2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
+         typename BaseClass::ExcNotActive());
+  
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe()[fe_index].dofs_per_line;
+  std::vector<unsigned int>::iterator next = dof_indices.begin();
+  for (unsigned int vertex=0; vertex<2; ++vertex)
+    for (unsigned int d=0; d<dofs_per_vertex; ++d)
+      *next++ = this->vertex_dof_index(vertex,d,fe_index);
+  for (unsigned int d=0; d<dofs_per_line; ++d)
+    *next++ = dof_index(d,fe_index);
+}
+
+
+
 
 
 /*------------------------- Functions: DoFObjectAccessor<2,dim> -----------------------*/
@@ -226,6 +266,53 @@ DoFObjectAccessor<2,DH>::line (const unsigned int i) const
 
 
 
+template <class DH>
+inline
+void
+DoFObjectAccessor<2,DH>::get_dof_indices (std::vector<unsigned int> &dof_indices,
+                                         const unsigned int         fe_index) const
+{
+  Assert (this->dof_handler != 0,
+         typename BaseClass::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0,
+         typename BaseClass::ExcInvalidObject());
+  Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
+                                4*this->dof_handler->get_fe()[fe_index].dofs_per_line +
+                                this->dof_handler->get_fe()[fe_index].dofs_per_quad),
+         typename BaseClass::ExcVectorDoesNotMatch());
+
+                                  // this function really only makes
+                                  // sense on non-active objects if
+                                  // all degrees of freedom are
+                                  // located on vertices, since
+                                  // otherwise there are degrees of
+                                  // freedom on sub-objects which are
+                                  // not allocated for this
+                                  // non-active thing
+  Assert (!this->has_children() ||
+         (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
+          4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
+         typename BaseClass::ExcNotActive());
+  
+  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
+          ExcMessage ("DoFHandler not initialized"));
+  
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe()[fe_index].dofs_per_line,
+                    dofs_per_quad   = this->dof_handler->get_fe()[fe_index].dofs_per_quad;
+  std::vector<unsigned int>::iterator next = dof_indices.begin();
+  for (unsigned int vertex=0; vertex<4; ++vertex)
+    for (unsigned int d=0; d<dofs_per_vertex; ++d)
+      *next++ = this->vertex_dof_index(vertex,d,fe_index);
+  for (unsigned int line=0; line<4; ++line)
+    for (unsigned int d=0; d<dofs_per_line; ++d)
+      *next++ = this->line(line)->dof_index(d,fe_index);
+  for (unsigned int d=0; d<dofs_per_quad; ++d)
+    *next++ = dof_index(d,fe_index);
+}
+
+
+
 /*------------------------- Functions: DoFObjectAccessor<3,dim> -----------------------*/
 
 template <class DH>
@@ -274,50 +361,25 @@ DoFObjectAccessor<3,DH>::quad (const unsigned int i) const
 }
 
 
-/*--------------- Functions: DoFObjectAccessor<1,DoFHandler> -----------*/
-
-
-template <>
-inline
-unsigned int
-DoFObjectAccessor<1,DoFHandler<1> >::dof_index (const unsigned int i,
-                                               const unsigned int fe_index) const
-{
-  Assert (fe_index == DoFHandler<1>::default_fe_index,
-         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-
-  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
-                                  // make sure a FE has been selected
-                                  // and enough room was reserved
-  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
-  Assert (i<this->dof_handler->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line));
-
-  return this->dof_handler->levels[this->present_level]
-    ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i];
-}
-
-
 
-template <>
+template <class DH>
 inline
 void
-DoFObjectAccessor<1,DoFHandler<1> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
-                                                     const unsigned int         fe_index) const
+DoFObjectAccessor<3,DH>::get_dof_indices (std::vector<unsigned int> &dof_indices,
+                                         const unsigned int         fe_index) const
 {
-  Assert (fe_index == DoFHandler<1>::default_fe_index,
-         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
+  Assert (this->dof_handler != 0,
+         typename BaseClass::ExcInvalidObject());
+  Assert (&this->dof_handler->get_fe() != 0,
+         typename BaseClass::ExcInvalidObject());
+  Assert (dof_indices.size() == (8*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
+                                12*this->dof_handler->get_fe()[fe_index].dofs_per_line +
+                                6*this->dof_handler->get_fe()[fe_index].dofs_per_quad +
+                                this->dof_handler->get_fe()[fe_index].dofs_per_hex),
+         typename BaseClass::ExcVectorDoesNotMatch());
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
-  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
-  Assert (dof_indices.size() == (2*this->dof_handler->get_fe().dofs_per_vertex +
-                                this->dof_handler->get_fe().dofs_per_line),
-         BaseClass::ExcVectorDoesNotMatch());
-
                                   // this function really only makes
                                   // sense on non-active objects if
                                   // all degrees of freedom are
@@ -327,29 +389,43 @@ DoFObjectAccessor<1,DoFHandler<1> >::get_dof_indices (std::vector<unsigned int>
                                   // not allocated for this
                                   // non-active thing
   Assert (!this->has_children() ||
-         (this->dof_handler->get_fe().dofs_per_cell ==
-          2*this->dof_handler->get_fe().dofs_per_vertex),
-         BaseClass::ExcNotActive());
+         (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
+          8*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
+         typename BaseClass::ExcNotActive());
+  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
+          ExcMessage ("DoFHandler not initialized"));
   
-  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line;
+  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
+                    dofs_per_line   = this->dof_handler->get_fe()[fe_index].dofs_per_line,
+                    dofs_per_quad   = this->dof_handler->get_fe()[fe_index].dofs_per_quad,
+                    dofs_per_hex    = this->dof_handler->get_fe()[fe_index].dofs_per_hex;
   std::vector<unsigned int>::iterator next = dof_indices.begin();
-  for (unsigned int vertex=0; vertex<2; ++vertex)
+  for (unsigned int vertex=0; vertex<8; ++vertex)
     for (unsigned int d=0; d<dofs_per_vertex; ++d)
-      *next++ = this->vertex_dof_index(vertex,d);
-  for (unsigned int d=0; d<dofs_per_line; ++d)
-    *next++ = dof_index(d);
+      *next++ = this->vertex_dof_index(vertex,d,fe_index);
+  for (unsigned int line=0; line<12; ++line)
+    for (unsigned int d=0; d<dofs_per_line; ++d)
+      *next++ = this->line(line)->dof_index(d,fe_index);
+  for (unsigned int quad=0; quad<6; ++quad)
+    for (unsigned int d=0; d<dofs_per_quad; ++d)
+      *next++ = this->quad(quad)->dof_index(d,fe_index);
+  for (unsigned int d=0; d<dofs_per_hex; ++d)
+    *next++ = dof_index(d,fe_index);
 }
 
 
 
+
+/*--------------- Functions: DoFObjectAccessor<1,DoFHandler> -----------*/
+
+
 template <>
 inline
 unsigned int
-DoFObjectAccessor<1,DoFHandler<2> >::dof_index (const unsigned int i,
+DoFObjectAccessor<1,DoFHandler<1> >::dof_index (const unsigned int i,
                                                const unsigned int fe_index) const
 {
-  Assert (fe_index == DoFHandler<2>::default_fe_index,
+  Assert (fe_index == DoFHandler<1>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
@@ -369,9 +445,9 @@ DoFObjectAccessor<1,DoFHandler<2> >::dof_index (const unsigned int i,
 
 template <>
 inline
-void
-DoFObjectAccessor<1,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
-                                                     const unsigned int         fe_index) const
+unsigned int
+DoFObjectAccessor<1,DoFHandler<2> >::dof_index (const unsigned int i,
+                                               const unsigned int fe_index) const
 {
   Assert (fe_index == DoFHandler<2>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
@@ -379,32 +455,14 @@ DoFObjectAccessor<1,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int>
           ExcMessage ("DoFHandler not initialized"));
 
   Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
+                                  // make sure a FE has been selected
+                                  // and enough room was reserved
   Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
-  Assert (dof_indices.size() == (2*this->dof_handler->get_fe().dofs_per_vertex +
-                                this->dof_handler->get_fe().dofs_per_line),
-         BaseClass::ExcVectorDoesNotMatch());
+  Assert (i<this->dof_handler->get_fe().dofs_per_line,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line));
 
-                                  // this function really only makes
-                                  // sense on non-active objects if
-                                  // all degrees of freedom are
-                                  // located on vertices, since
-                                  // otherwise there are degrees of
-                                  // freedom on sub-objects which are
-                                  // not allocated for this
-                                  // non-active thing
-  Assert (!this->has_children() ||
-         (this->dof_handler->get_fe().dofs_per_cell ==
-          2*this->dof_handler->get_fe().dofs_per_vertex),
-         BaseClass::ExcNotActive());
-  
-  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line;
-  std::vector<unsigned int>::iterator next = dof_indices.begin();
-  for (unsigned int vertex=0; vertex<2; ++vertex)
-    for (unsigned int d=0; d<dofs_per_vertex; ++d)
-      *next++ = this->vertex_dof_index(vertex,d);
-  for (unsigned int d=0; d<dofs_per_line; ++d)
-    *next++ = dof_index(d);
+  return this->dof_handler->levels[this->present_level]
+    ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i];
 }
 
 
@@ -433,48 +491,6 @@ DoFObjectAccessor<1,DoFHandler<3> >::dof_index (const unsigned int i,
 
 
 
-template <>
-inline
-void
-DoFObjectAccessor<1,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
-                                                     const unsigned int         fe_index) const
-{
-  Assert (fe_index == DoFHandler<3>::default_fe_index,
-         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-
-  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
-  Assert (dof_indices.size() == (2*this->dof_handler->get_fe().dofs_per_vertex +
-                                this->dof_handler->get_fe().dofs_per_line),
-         BaseClass::ExcVectorDoesNotMatch());
-
-                                  // this function really only makes
-                                  // sense on non-active objects if
-                                  // all degrees of freedom are
-                                  // located on vertices, since
-                                  // otherwise there are degrees of
-                                  // freedom on sub-objects which are
-                                  // not allocated for this
-                                  // non-active thing
-  Assert (!this->has_children() ||
-         (this->dof_handler->get_fe().dofs_per_cell ==
-          2*this->dof_handler->get_fe().dofs_per_vertex),
-         BaseClass::ExcNotActive());
-  
-  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line;
-  std::vector<unsigned int>::iterator next = dof_indices.begin();
-  for (unsigned int vertex=0; vertex<2; ++vertex)
-    for (unsigned int d=0; d<dofs_per_vertex; ++d)
-      *next++ = this->vertex_dof_index(vertex,d);
-  for (unsigned int d=0; d<dofs_per_line; ++d)
-    *next++ = dof_index(d);
-}
-
-
-
 /*--------------- Functions: DoFObjectAccessor<2,DoFHandler> -----------*/
 
 template <>
@@ -504,57 +520,38 @@ DoFObjectAccessor<2,DoFHandler<2> >::dof_index (const unsigned int i,
 
 template <>
 inline
-void
-DoFObjectAccessor<2,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
-                                                     const unsigned int         fe_index) const
+unsigned int
+DoFObjectAccessor<2,DoFHandler<3> >::dof_index (const unsigned int i,
+                                               const unsigned int fe_index) const
 {
-  Assert (fe_index == DoFHandler<2>::default_fe_index,
+  Assert (fe_index == DoFHandler<3>::default_fe_index,
          ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
          BaseClass::ExcInvalidObject());
+                                  // make sure a FE has been selected
+                                  // and enough room was reserved
   Assert (&this->dof_handler->get_fe() != 0,
          BaseClass::ExcInvalidObject());
-  Assert (dof_indices.size() == (4*this->dof_handler->get_fe().dofs_per_vertex +
-                                4*this->dof_handler->get_fe().dofs_per_line +
-                                this->dof_handler->get_fe().dofs_per_quad),
-         BaseClass::ExcVectorDoesNotMatch());
-
-                                  // this function really only makes
-                                  // sense on non-active objects if
-                                  // all degrees of freedom are
-                                  // located on vertices, since
-                                  // otherwise there are degrees of
-                                  // freedom on sub-objects which are
-                                  // not allocated for this
-                                  // non-active thing
-  Assert (!this->has_children() ||
-         (this->dof_handler->get_fe().dofs_per_cell ==
-          4*this->dof_handler->get_fe().dofs_per_vertex),
-         BaseClass::ExcNotActive());
-  
+  Assert (i<this->dof_handler->get_fe().dofs_per_quad,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_quad));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
-  
-  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line,
-                    dofs_per_quad   = this->dof_handler->get_fe().dofs_per_quad;
-  std::vector<unsigned int>::iterator next = dof_indices.begin();
-  for (unsigned int vertex=0; vertex<4; ++vertex)
-    for (unsigned int d=0; d<dofs_per_vertex; ++d)
-      *next++ = this->vertex_dof_index(vertex,d);
-  for (unsigned int line=0; line<4; ++line)
-    for (unsigned int d=0; d<dofs_per_line; ++d)
-      *next++ = this->line(line)->dof_index(d);
-  for (unsigned int d=0; d<dofs_per_quad; ++d)
-    *next++ = dof_index(d);
+
+  return this->dof_handler->levels[this->present_level]
+    ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i];
 }
 
 
 
+/*--------------- Functions: DoFObjectAccessor<3,DoFHandler> -----------*/
+
+
+
+
 template <>
 inline
 unsigned int
-DoFObjectAccessor<2,DoFHandler<3> >::dof_index (const unsigned int i,
+DoFObjectAccessor<3,DoFHandler<3> >::dof_index (const unsigned int i,
                                                const unsigned int fe_index) const
 {
   Assert (fe_index == DoFHandler<3>::default_fe_index,
@@ -565,161 +562,27 @@ DoFObjectAccessor<2,DoFHandler<3> >::dof_index (const unsigned int i,
                                   // and enough room was reserved
   Assert (&this->dof_handler->get_fe() != 0,
          BaseClass::ExcInvalidObject());
-  Assert (i<this->dof_handler->get_fe().dofs_per_quad,
-         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_quad));
+  Assert (i<this->dof_handler->get_fe().dofs_per_hex,
+         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_hex));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
   return this->dof_handler->levels[this->present_level]
-    ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i];
+    ->hex_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_hex+i];
 }
 
 
 
+/* -------------- hp vertex dofs stuff ------------------------------------ */
+
+
+/*--------------- Functions: DoFObjectAccessor<1,hp::DoFHandler> -----------*/
+
 template <>
 inline
-void
-DoFObjectAccessor<2,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
-                                                     const unsigned int         fe_index) const
-{
-  Assert (fe_index == DoFHandler<3>::default_fe_index,
-         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
-  Assert (this->dof_handler != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (dof_indices.size() == (4*this->dof_handler->get_fe().dofs_per_vertex +
-                                4*this->dof_handler->get_fe().dofs_per_line +
-                                this->dof_handler->get_fe().dofs_per_quad),
-         BaseClass::ExcVectorDoesNotMatch());
-
-                                  // this function really only makes
-                                  // sense on non-active objects if
-                                  // all degrees of freedom are
-                                  // located on vertices, since
-                                  // otherwise there are degrees of
-                                  // freedom on sub-objects which are
-                                  // not allocated for this
-                                  // non-active thing
-  Assert (!this->has_children() ||
-         (this->dof_handler->get_fe().dofs_per_cell ==
-          4*this->dof_handler->get_fe().dofs_per_vertex),
-         BaseClass::ExcNotActive());
-  
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-  
-  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line,
-                    dofs_per_quad   = this->dof_handler->get_fe().dofs_per_quad;
-  std::vector<unsigned int>::iterator next = dof_indices.begin();
-  for (unsigned int vertex=0; vertex<4; ++vertex)
-    for (unsigned int d=0; d<dofs_per_vertex; ++d)
-      *next++ = this->vertex_dof_index(vertex,d);
-  for (unsigned int line=0; line<4; ++line)
-    for (unsigned int d=0; d<dofs_per_line; ++d)
-      *next++ = this->line(line)->dof_index(d);
-  for (unsigned int d=0; d<dofs_per_quad; ++d)
-    *next++ = dof_index(d);
-}
-
-
-
-/*--------------- Functions: DoFObjectAccessor<3,DoFHandler> -----------*/
-
-
-
-
-template <>
-inline
-unsigned int
-DoFObjectAccessor<3,DoFHandler<3> >::dof_index (const unsigned int i,
-                                               const unsigned int fe_index) const
-{
-  Assert (fe_index == DoFHandler<3>::default_fe_index,
-         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
-  Assert (this->dof_handler != 0,
-         BaseClass::ExcInvalidObject());
-                                  // make sure a FE has been selected
-                                  // and enough room was reserved
-  Assert (&this->dof_handler->get_fe() != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (i<this->dof_handler->get_fe().dofs_per_hex,
-         ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_hex));
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-
-  return this->dof_handler->levels[this->present_level]
-    ->hex_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_hex+i];
-}
-
-
-
-template <>
-inline
-void
-DoFObjectAccessor<3,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
-                                                     const unsigned int         fe_index) const
-{
-  Assert (fe_index == DoFHandler<3>::default_fe_index,
-         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
-  Assert (this->dof_handler != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (dof_indices.size() == (8*this->dof_handler->get_fe().dofs_per_vertex +
-                                12*this->dof_handler->get_fe().dofs_per_line +
-                                6*this->dof_handler->get_fe().dofs_per_quad +
-                                this->dof_handler->get_fe().dofs_per_hex),
-         BaseClass::ExcVectorDoesNotMatch());
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-
-                                  // this function really only makes
-                                  // sense on non-active objects if
-                                  // all degrees of freedom are
-                                  // located on vertices, since
-                                  // otherwise there are degrees of
-                                  // freedom on sub-objects which are
-                                  // not allocated for this
-                                  // non-active thing
-  Assert (!this->has_children() ||
-         (this->dof_handler->get_fe().dofs_per_cell ==
-          8*this->dof_handler->get_fe().dofs_per_vertex),
-         BaseClass::ExcNotActive());
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-  
-  const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex,
-                    dofs_per_line   = this->dof_handler->get_fe().dofs_per_line,
-                    dofs_per_quad   = this->dof_handler->get_fe().dofs_per_quad,
-                    dofs_per_hex    = this->dof_handler->get_fe().dofs_per_hex;
-  std::vector<unsigned int>::iterator next = dof_indices.begin();
-  for (unsigned int vertex=0; vertex<8; ++vertex)
-    for (unsigned int d=0; d<dofs_per_vertex; ++d)
-      *next++ = this->vertex_dof_index(vertex,d);
-  for (unsigned int line=0; line<12; ++line)
-    for (unsigned int d=0; d<dofs_per_line; ++d)
-      *next++ = this->line(line)->dof_index(d);
-  for (unsigned int quad=0; quad<6; ++quad)
-    for (unsigned int d=0; d<dofs_per_quad; ++d)
-      *next++ = this->quad(quad)->dof_index(d);
-  for (unsigned int d=0; d<dofs_per_hex; ++d)
-    *next++ = dof_index(d);
-}
-
-
-
-/* -------------- hp vertex dofs stuff ------------------------------------ */
-
-
-/*--------------- Functions: DoFObjectAccessor<1,hp::DoFHandler> -----------*/
-
-template <>
-inline
-unsigned int
-DoFObjectAccessor<1,hp::DoFHandler<1> >::dof_index (const unsigned int i,
-                                                   const unsigned int fe_index) const
+unsigned int
+DoFObjectAccessor<1,hp::DoFHandler<1> >::dof_index (const unsigned int i,
+                                                   const unsigned int fe_index) const
 {
   return this->dof_handler->levels[this->present_level]
     ->get_line_dof_index (*this->dof_handler,
@@ -730,46 +593,6 @@ DoFObjectAccessor<1,hp::DoFHandler<1> >::dof_index (const unsigned int i,
 
 
 
-template <>
-inline
-void
-DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
-                                                         const unsigned int         fe_index) const
-{
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-
-  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
-  Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
-                                this->dof_handler->get_fe()[fe_index].dofs_per_line),
-         BaseClass::ExcVectorDoesNotMatch());
-
-                                  // this function really only makes
-                                  // sense on non-active objects if
-                                  // all degrees of freedom are
-                                  // located on vertices, since
-                                  // otherwise there are degrees of
-                                  // freedom on sub-objects which are
-                                  // not allocated for this
-                                  // non-active thing
-  Assert (!this->has_children() ||
-         (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
-          2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         BaseClass::ExcNotActive());
-  
-  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
-                    dofs_per_line   = this->dof_handler->get_fe()[fe_index].dofs_per_line;
-  std::vector<unsigned int>::iterator next = dof_indices.begin();
-  for (unsigned int vertex=0; vertex<2; ++vertex)
-    for (unsigned int d=0; d<dofs_per_vertex; ++d)
-      *next++ = this->vertex_dof_index(vertex,d,fe_index);
-  for (unsigned int d=0; d<dofs_per_line; ++d)
-    *next++ = dof_index(d,fe_index);
-}
-
-
-
 template <>
 inline
 unsigned int
@@ -785,46 +608,6 @@ DoFObjectAccessor<1,hp::DoFHandler<2> >::dof_index (const unsigned int i,
 
 
 
-template <>
-inline
-void
-DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
-                                                         const unsigned int         fe_index) const
-{
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-
-  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
-  Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
-                                this->dof_handler->get_fe()[fe_index].dofs_per_line),
-         BaseClass::ExcVectorDoesNotMatch());
-
-                                  // this function really only makes
-                                  // sense on non-active objects if
-                                  // all degrees of freedom are
-                                  // located on vertices, since
-                                  // otherwise there are degrees of
-                                  // freedom on sub-objects which are
-                                  // not allocated for this
-                                  // non-active thing
-  Assert (!this->has_children() ||
-         (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
-          2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         BaseClass::ExcNotActive());
-  
-  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
-                    dofs_per_line   = this->dof_handler->get_fe()[fe_index].dofs_per_line;
-  std::vector<unsigned int>::iterator next = dof_indices.begin();
-  for (unsigned int vertex=0; vertex<2; ++vertex)
-    for (unsigned int d=0; d<dofs_per_vertex; ++d)
-      *next++ = this->vertex_dof_index(vertex,d,fe_index);
-  for (unsigned int d=0; d<dofs_per_line; ++d)
-    *next++ = dof_index(d,fe_index);
-}
-
-
-
 template <>
 inline
 unsigned int
@@ -840,46 +623,6 @@ DoFObjectAccessor<1,hp::DoFHandler<3> >::dof_index (const unsigned int i,
 
 
 
-template <>
-inline
-void
-DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
-                                                         const unsigned int         fe_index) const
-{
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-
-  Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
-  Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
-                                this->dof_handler->get_fe()[fe_index].dofs_per_line),
-         BaseClass::ExcVectorDoesNotMatch());
-
-                                  // this function really only makes
-                                  // sense on non-active objects if
-                                  // all degrees of freedom are
-                                  // located on vertices, since
-                                  // otherwise there are degrees of
-                                  // freedom on sub-objects which are
-                                  // not allocated for this
-                                  // non-active thing
-  Assert (!this->has_children() ||
-         (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
-          2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         BaseClass::ExcNotActive());
-  
-  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
-                    dofs_per_line   = this->dof_handler->get_fe()[fe_index].dofs_per_line;
-  std::vector<unsigned int>::iterator next = dof_indices.begin();
-  for (unsigned int vertex=0; vertex<2; ++vertex)
-    for (unsigned int d=0; d<dofs_per_vertex; ++d)
-      *next++ = this->vertex_dof_index(vertex,d,fe_index);
-  for (unsigned int d=0; d<dofs_per_line; ++d)
-    *next++ = dof_index(d,fe_index);
-}
-
-
-
 template <>
 inline
 void
@@ -996,101 +739,6 @@ DoFObjectAccessor<2, hp::DoFHandler<3> >::set_dof_index (const unsigned int i,
 
 
 
-template <>
-inline
-void
-DoFObjectAccessor<2,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
-                                                         const unsigned int         fe_index) const
-{
-  Assert (this->dof_handler != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
-                                4*this->dof_handler->get_fe()[fe_index].dofs_per_line +
-                                this->dof_handler->get_fe()[fe_index].dofs_per_quad),
-         BaseClass::ExcVectorDoesNotMatch());
-
-                                  // this function really only makes
-                                  // sense on non-active objects if
-                                  // all degrees of freedom are
-                                  // located on vertices, since
-                                  // otherwise there are degrees of
-                                  // freedom on sub-objects which are
-                                  // not allocated for this
-                                  // non-active thing
-  Assert (!this->has_children() ||
-         (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
-          4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         BaseClass::ExcNotActive());
-  
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-  
-  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
-                    dofs_per_line   = this->dof_handler->get_fe()[fe_index].dofs_per_line,
-                    dofs_per_quad   = this->dof_handler->get_fe()[fe_index].dofs_per_quad;
-  std::vector<unsigned int>::iterator next = dof_indices.begin();
-  for (unsigned int vertex=0; vertex<4; ++vertex)
-    for (unsigned int d=0; d<dofs_per_vertex; ++d)
-      *next++ = this->vertex_dof_index(vertex,d,fe_index);
-  for (unsigned int line=0; line<4; ++line)
-    for (unsigned int d=0; d<dofs_per_line; ++d)
-      *next++ = this->line(line)->dof_index(d,fe_index);
-  for (unsigned int d=0; d<dofs_per_quad; ++d)
-    *next++ = dof_index(d,fe_index);
-}
-
-
-
-template <>
-inline
-void
-DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
-                                                         const unsigned int         fe_index) const
-{
-  Assert (this->dof_handler != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
-                                4*this->dof_handler->get_fe()[fe_index].dofs_per_line +
-                                this->dof_handler->get_fe()[fe_index].dofs_per_quad),
-         BaseClass::ExcVectorDoesNotMatch());
-
-                                  // this function really only makes
-                                  // sense on non-active objects if
-                                  // all degrees of freedom are
-                                  // located on vertices, since
-                                  // otherwise there are degrees of
-                                  // freedom on sub-objects which are
-                                  // not allocated for this
-                                  // non-active thing
-  Assert (!this->has_children() ||
-         (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
-          4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         BaseClass::ExcNotActive());
-  
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-  
-  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
-                    dofs_per_line   = this->dof_handler->get_fe()[fe_index].dofs_per_line,
-                    dofs_per_quad   = this->dof_handler->get_fe()[fe_index].dofs_per_quad;
-  std::vector<unsigned int>::iterator next = dof_indices.begin();
-  for (unsigned int vertex=0; vertex<4; ++vertex)
-    for (unsigned int d=0; d<dofs_per_vertex; ++d)
-      *next++ = this->vertex_dof_index(vertex,d,fe_index);
-  for (unsigned int line=0; line<4; ++line)
-    for (unsigned int d=0; d<dofs_per_line; ++d)
-      *next++ = this->line(line)->dof_index(d,fe_index);
-  for (unsigned int d=0; d<dofs_per_quad; ++d)
-    *next++ = dof_index(d,fe_index);
-}
-
-
-
-
 
 /*------------- Functions: DoFObjectAccessor<3,hp::DoFHandler> -------------*/
 
@@ -1126,60 +774,6 @@ DoFObjectAccessor<3, hp::DoFHandler<3> >::set_dof_index (const unsigned int i,
 
 
 
-template <>
-inline
-void
-DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned int> &dof_indices,
-                                                         const unsigned int         fe_index) const
-{
-  Assert (this->dof_handler != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (&this->dof_handler->get_fe() != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (dof_indices.size() == (8*this->dof_handler->get_fe()[fe_index].dofs_per_vertex +
-                                12*this->dof_handler->get_fe()[fe_index].dofs_per_line +
-                                6*this->dof_handler->get_fe()[fe_index].dofs_per_quad +
-                                this->dof_handler->get_fe()[fe_index].dofs_per_hex),
-         BaseClass::ExcVectorDoesNotMatch());
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-
-                                  // this function really only makes
-                                  // sense on non-active objects if
-                                  // all degrees of freedom are
-                                  // located on vertices, since
-                                  // otherwise there are degrees of
-                                  // freedom on sub-objects which are
-                                  // not allocated for this
-                                  // non-active thing
-  Assert (!this->has_children() ||
-         (this->dof_handler->get_fe()[fe_index].dofs_per_cell ==
-          8*this->dof_handler->get_fe()[fe_index].dofs_per_vertex),
-         BaseClass::ExcNotActive());
-  Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
-          ExcMessage ("DoFHandler not initialized"));
-  
-  const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex,
-                    dofs_per_line   = this->dof_handler->get_fe()[fe_index].dofs_per_line,
-                    dofs_per_quad   = this->dof_handler->get_fe()[fe_index].dofs_per_quad,
-                    dofs_per_hex    = this->dof_handler->get_fe()[fe_index].dofs_per_hex;
-  std::vector<unsigned int>::iterator next = dof_indices.begin();
-  for (unsigned int vertex=0; vertex<8; ++vertex)
-    for (unsigned int d=0; d<dofs_per_vertex; ++d)
-      *next++ = this->vertex_dof_index(vertex,d,fe_index);
-  for (unsigned int line=0; line<12; ++line)
-    for (unsigned int d=0; d<dofs_per_line; ++d)
-      *next++ = this->line(line)->dof_index(d,fe_index);
-  for (unsigned int quad=0; quad<6; ++quad)
-    for (unsigned int d=0; d<dofs_per_quad; ++d)
-      *next++ = this->quad(quad)->dof_index(d,fe_index);
-  for (unsigned int d=0; d<dofs_per_hex; ++d)
-    *next++ = dof_index(d,fe_index);
-}
-
-
-
-
 /*------------------------- Functions: DoFCellAccessor -----------------------*/
 
 template <class DH>

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.