]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make a few functions inline to avoid linker errors. The functions are small enough...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 20 Dec 2005 05:23:30 +0000 (05:23 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 20 Dec 2005 05:23:30 +0000 (05:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@11891 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_accessor.templates.h
deal.II/deal.II/source/dofs/hp_dof_accessor.cc

index 22e75dd93caf04f28292fad727903e6738279b98..ed06a2af09ff5833c25619ea21496bba9cac5ee3 100644 (file)
@@ -1169,6 +1169,85 @@ DoFObjectAccessor<1,3,hpDoFHandler>::dof_index (const unsigned int i) const
 }
 
 
+
+template <>
+inline
+void
+DoFObjectAccessor<1, 1, hpDoFHandler>::set_dof_index (const unsigned int i,
+                                                      const unsigned int index) const
+{
+  typedef DoFAccessor<1, hpDoFHandler> BaseClass;
+
+  Assert (this->dof_handler != 0,
+         BaseClass::ExcInvalidObject());
+                                  // make sure a FE has been selected
+                                  // and enough room was reserved
+  Assert (&this->get_fe() != 0,
+         BaseClass::ExcInvalidObject());
+  Assert (i<this->get_fe().dofs_per_line,
+         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+
+  const unsigned int offset = this->dof_handler->levels[this->present_level]
+                              ->dof_line_index_offset[this->present_index];
+  this->dof_handler->levels[this->present_level]
+    ->line_dofs[offset+i] = index;
+}
+
+
+template <>
+inline
+void
+DoFObjectAccessor<1, 2, hpDoFHandler>::set_dof_index (const unsigned int i,
+                                                      const unsigned int index) const
+{
+  typedef DoFAccessor<2, hpDoFHandler> BaseClass;
+
+  Assert (this->dof_handler != 0,
+         BaseClass::ExcInvalidObject());
+                                  // make sure a FE has been selected
+                                  // and enough room was reserved
+  Assert (&this->get_fe() != 0,
+         BaseClass::ExcInvalidObject());
+  Assert (i<this->get_fe().dofs_per_line,
+         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+
+//TODO:[?] In two dimension it could happen that we have different active_fe_indices
+// on a line between to cells. Hence we have to differentiate between these two cases.
+// Unfortunately, this requires more information then available now.
+
+  const unsigned int offset = this->dof_handler->levels[this->present_level]
+                              ->dof_line_index_offset[this->present_index];
+  this->dof_handler->levels[this->present_level]
+    ->line_dofs[offset+i] = index;
+}
+
+
+template <>
+inline
+void
+DoFObjectAccessor<1, 3, hpDoFHandler>::set_dof_index (const unsigned int i,
+                                                      const unsigned int index) const
+{
+  typedef DoFAccessor<3, hpDoFHandler> BaseClass;
+
+  Assert (this->dof_handler != 0,
+         BaseClass::ExcInvalidObject());
+                                  // make sure a FE has been selected
+                                  // and enough room was reserved
+  Assert (&this->get_fe() != 0,
+         BaseClass::ExcInvalidObject());
+  Assert (i<this->get_fe().dofs_per_line,
+         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+
+  const unsigned int offset = this->dof_handler->levels[this->present_level]
+                              ->dof_line_index_offset[this->present_index];
+  this->dof_handler->levels[this->present_level]
+    ->line_dofs[offset+i] = index;
+}
+
+
+
+
 template <>
 inline
 const FiniteElement<1> &
@@ -1322,6 +1401,55 @@ unsigned int DoFObjectAccessor<2,3,hpDoFHandler>::dof_index (const unsigned int
 }
 
 
+template <>
+inline
+void
+DoFObjectAccessor<2, 2, hpDoFHandler>::set_dof_index (const unsigned int i,
+                                                      const unsigned int index) const
+{
+  typedef DoFAccessor<2, hpDoFHandler> BaseClass;
+
+  Assert (this->dof_handler != 0,
+         BaseClass::ExcInvalidObject());
+                                  // make sure a FE has been selected
+                                  // and enough room was reserved
+  Assert (&this->get_fe() != 0,
+         BaseClass::ExcInvalidObject());
+  Assert (i<this->get_fe().dofs_per_quad,
+         ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+
+  const unsigned int offset = this->dof_handler->levels[this->present_level]
+                              ->dof_quad_index_offset[this->present_index];
+  this->dof_handler->levels[this->present_level]
+    ->quad_dofs[offset+i] = index;
+}
+
+
+template <>
+inline
+void
+DoFObjectAccessor<2, 3, hpDoFHandler>::set_dof_index (const unsigned int i,
+                                                      const unsigned int index) const
+{
+  typedef DoFAccessor<3, hpDoFHandler> BaseClass;
+
+  Assert (this->dof_handler != 0,
+         BaseClass::ExcInvalidObject());
+                                  // make sure a FE has been selected
+                                  // and enough room was reserved
+  Assert (&this->get_fe() != 0,
+         BaseClass::ExcInvalidObject());
+  Assert (i<this->get_fe().dofs_per_quad,
+         ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+
+  const unsigned int offset = this->dof_handler->levels[this->present_level]
+                              ->dof_quad_index_offset[this->present_index];
+  this->dof_handler->levels[this->present_level]
+    ->quad_dofs[offset+i] = index;
+}
+
+
+
 template <>
 inline
 const FiniteElement<2> &
@@ -1329,6 +1457,9 @@ DoFObjectAccessor<2,2,hpDoFHandler>::get_fe () const
 {
   return dof_handler->finite_elements->get_fe(active_fe_index ());
 }
+
+
+
 template <>
 inline
 const FiniteElement<3> &
@@ -1338,6 +1469,7 @@ DoFObjectAccessor<2,3,hpDoFHandler>::get_fe () const
 }
 
 
+
 template <>
 inline
 unsigned int
@@ -1427,6 +1559,31 @@ DoFObjectAccessor<3,3,hpDoFHandler>::dof_index (const unsigned int i) const
 }
 
 
+template <>
+inline
+void
+DoFObjectAccessor<3, 3, hpDoFHandler>::set_dof_index (const unsigned int i,
+                                                      const unsigned int index) const
+{
+  typedef DoFAccessor<3, hpDoFHandler> BaseClass;
+    
+  Assert (this->dof_handler != 0,
+         BaseClass::ExcInvalidObject());
+                                  // make sure a FE has been selected
+                                  // and enough room was reserved
+  Assert (&this->get_fe() != 0,
+         BaseClass::ExcInvalidObject());
+  Assert (i<this->get_fe().dofs_per_hex,
+         ExcIndexRange (i, 0, this->get_fe().dofs_per_hex));
+
+  const unsigned int offset = this->dof_handler->levels[this->present_level]
+                              ->dof_hex_index_offset[this->present_index];
+  this->dof_handler->levels[this->present_level]
+    ->hex_dofs[offset+i] = index;
+}
+
+
+
 template <>
 inline
 const FiniteElement<3> &
@@ -1450,6 +1607,7 @@ DoFObjectAccessor<3,3,hpDoFHandler>::active_fe_index () const
 }
 
 
+
 template <>
 inline
 void
index 47052bfd77620633adde894e871c6836ac960f35..1c63f8f06a7edb69c0e441c554009771990c2223 100644 (file)
@@ -66,145 +66,3 @@ DoFCellAccessor<3,hpDoFHandler>::face (const unsigned int i) const
 
 #endif
 
-
-/*----------------- Functions: DoFObjectAccessor<1,dim,hpDoFHander> ----------*/
-
-template <>
-void DoFObjectAccessor<1, 1, hpDoFHandler>::set_dof_index (const unsigned int i,
-                                                          const unsigned int index) const
-{
-  typedef DoFAccessor<1, hpDoFHandler> BaseClass;
-
-  Assert (this->dof_handler != 0,
-         BaseClass::ExcInvalidObject());
-                                  // make sure a FE has been selected
-                                  // and enough room was reserved
-  Assert (&this->get_fe() != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
-
-  const unsigned int offset = this->dof_handler->levels[this->present_level]
-                              ->dof_line_index_offset[this->present_index];
-  this->dof_handler->levels[this->present_level]
-      ->line_dofs[offset+i] = index;
-}
-
-
-template <>
-void DoFObjectAccessor<1, 2, hpDoFHandler>::set_dof_index (const unsigned int i,
-                                                          const unsigned int index) const
-{
-  typedef DoFAccessor<2, hpDoFHandler> BaseClass;
-
-  Assert (this->dof_handler != 0,
-         BaseClass::ExcInvalidObject());
-                                  // make sure a FE has been selected
-                                  // and enough room was reserved
-  Assert (&this->get_fe() != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
-
-//TODO:[?] In two dimension it could happen that we have different active_fe_indices
-// on a line between to cells. Hence we have to differentiate between these two cases.
-// Unfortunately, this requires more information then available now.
-
-  const unsigned int offset = this->dof_handler->levels[this->present_level]
-                              ->dof_line_index_offset[this->present_index];
-  this->dof_handler->levels[this->present_level]
-      ->line_dofs[offset+i] = index;
-}
-
-
-template <>
-void DoFObjectAccessor<1, 3, hpDoFHandler>::set_dof_index (const unsigned int i,
-                                                          const unsigned int index) const
-{
-  typedef DoFAccessor<3, hpDoFHandler> BaseClass;
-
-  Assert (this->dof_handler != 0,
-         BaseClass::ExcInvalidObject());
-                                  // make sure a FE has been selected
-                                  // and enough room was reserved
-  Assert (&this->get_fe() != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_line,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
-
-  const unsigned int offset = this->dof_handler->levels[this->present_level]
-                              ->dof_line_index_offset[this->present_index];
-  this->dof_handler->levels[this->present_level]
-      ->line_dofs[offset+i] = index;
-}
-
-
-
-/*----------------- Functions: DoFObjectAccessor<2,dim,hpDoFHander> ----------*/
-
-template <>
-void DoFObjectAccessor<2, 2, hpDoFHandler>::set_dof_index (const unsigned int i,
-                                                          const unsigned int index) const
-{
-  typedef DoFAccessor<2, hpDoFHandler> BaseClass;
-
-  Assert (this->dof_handler != 0,
-         BaseClass::ExcInvalidObject());
-                                  // make sure a FE has been selected
-                                  // and enough room was reserved
-  Assert (&this->get_fe() != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_quad,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
-
-  const unsigned int offset = this->dof_handler->levels[this->present_level]
-                              ->dof_quad_index_offset[this->present_index];
-  this->dof_handler->levels[this->present_level]
-      ->quad_dofs[offset+i] = index;
-}
-
-
-template <>
-void DoFObjectAccessor<2, 3, hpDoFHandler>::set_dof_index (const unsigned int i,
-                                                          const unsigned int index) const
-{
-  typedef DoFAccessor<3, hpDoFHandler> BaseClass;
-
-  Assert (this->dof_handler != 0,
-         BaseClass::ExcInvalidObject());
-                                  // make sure a FE has been selected
-                                  // and enough room was reserved
-  Assert (&this->get_fe() != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_quad,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
-
-  const unsigned int offset = this->dof_handler->levels[this->present_level]
-                              ->dof_quad_index_offset[this->present_index];
-  this->dof_handler->levels[this->present_level]
-      ->quad_dofs[offset+i] = index;
-}
-
-
-/*----------------- Functions: DoFObjectAccessor<3,dim,hpDoFHander> ----------*/
-
-template <>
-void DoFObjectAccessor<3, 3, hpDoFHandler>::set_dof_index (const unsigned int i,
-                                                          const unsigned int index) const
-{
-  typedef DoFAccessor<3, hpDoFHandler> BaseClass;
-    
-  Assert (this->dof_handler != 0,
-         BaseClass::ExcInvalidObject());
-                                  // make sure a FE has been selected
-                                  // and enough room was reserved
-  Assert (&this->get_fe() != 0,
-         BaseClass::ExcInvalidObject());
-  Assert (i<this->get_fe().dofs_per_hex,
-         ExcIndexRange (i, 0, this->get_fe().dofs_per_hex));
-
-  const unsigned int offset = this->dof_handler->levels[this->present_level]
-                              ->dof_hex_index_offset[this->present_index];
-  this->dof_handler->levels[this->present_level]
-      ->hex_dofs[offset+i] = index;
-}

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.