]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Guard a bunch of functions with deal_II_dimension==??? to make static linking possible.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 28 Apr 2006 14:01:07 +0000 (14:01 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 28 Apr 2006 14:01:07 +0000 (14:01 +0000)
git-svn-id: https://svn.dealii.org/trunk@12933 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/dofs/dof_accessor.cc

index d31c0147c340ce091a13cccfcb6ff77da325a4a5..68528722e52f7dee974e4761298f6cccfc1e4305 100644 (file)
@@ -445,6 +445,8 @@ DoFObjectAccessor<3,DH>::set_dof_values (const Vector<number> &local_values,
 // --------------- hp::DoFHandler specializations for 1d objects -----------
 
 
+#if deal_II_dimension == 1
+
 template <>
 void DoFObjectAccessor<1, hp::DoFHandler<1> >::set_vertex_dof_index (const unsigned int /*vertex*/,
                                                                      const unsigned int /*i*/,
@@ -456,6 +458,35 @@ void DoFObjectAccessor<1, hp::DoFHandler<1> >::set_vertex_dof_index (const unsig
   Assert (false, ExcInternalError());
 }
 
+template <>
+template <class InputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_values (const InputVector &/*values*/,
+                                                         Vector<number>    &/*local_values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class OutputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<1> >::set_dof_values (const Vector<number> &/*local_values*/,
+                                                         OutputVector         &/*values*/) const
+{
+  Assert (false, ExcNotImplemented());
+}
+
+#endif
+
+
+
+
+// --------------- hp::DoFHandler specializations for 2d objects -----------
+
+
+
+#if deal_II_dimension == 2
+
 template <>
 void DoFObjectAccessor<1, hp::DoFHandler<2> >::set_vertex_dof_index (const unsigned int /*vertex*/,
                                                                      const unsigned int /*i*/,
@@ -468,26 +499,16 @@ void DoFObjectAccessor<1, hp::DoFHandler<2> >::set_vertex_dof_index (const unsig
 }
 
 template <>
-void DoFObjectAccessor<1, hp::DoFHandler<3> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+void DoFObjectAccessor<2, hp::DoFHandler<2> >::set_vertex_dof_index (const unsigned int /*vertex*/,
                                                                      const unsigned int /*i*/,
                                                                      const unsigned int /*index*/,
                                              const unsigned int fe_index) const
 {
-  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+  Assert (fe_index != hp::DoFHandler<2>::default_fe_index,
          ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (false, ExcInternalError());
 }
 
-
-template <>
-template <class InputVector, typename number>
-void
-DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_values (const InputVector &/*values*/,
-                                                         Vector<number>    &/*local_values*/) const
-{
-  Assert (false, ExcNotImplemented());
-}
-
 template <>
 template <class InputVector, typename number>
 void
@@ -500,22 +521,12 @@ DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_values (const InputVector &/*va
 template <>
 template <class InputVector, typename number>
 void
-DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*values*/,
+DoFObjectAccessor<2,hp::DoFHandler<2> >::get_dof_values (const InputVector &/*values*/,
                                                          Vector<number>    &/*local_values*/) const
 {
   Assert (false, ExcNotImplemented());
 }
 
-
-template <>
-template <class OutputVector, typename number>
-void
-DoFObjectAccessor<1,hp::DoFHandler<1> >::set_dof_values (const Vector<number> &/*local_values*/,
-                                                         OutputVector         &/*values*/) const
-{
-  Assert (false, ExcNotImplemented());
-}
-
 template <>
 template <class OutputVector, typename number>
 void
@@ -525,28 +536,31 @@ DoFObjectAccessor<1,hp::DoFHandler<2> >::set_dof_values (const Vector<number> &/
   Assert (false, ExcNotImplemented());
 }
 
+
 template <>
 template <class OutputVector, typename number>
 void
-DoFObjectAccessor<1,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/*local_values*/,
+DoFObjectAccessor<2,hp::DoFHandler<2> >::set_dof_values (const Vector<number> &/*local_values*/,
                                                          OutputVector         &/*values*/) const
 {
   Assert (false, ExcNotImplemented());
 }
 
+#endif
 
 
 
-// --------------- hp::DoFHandler specializations for 2d objects -----------
+// --------------- hp::DoFHandler specializations for 3d objects -----------
 
+#if deal_II_dimension == 3
 
 template <>
-void DoFObjectAccessor<2, hp::DoFHandler<2> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+void DoFObjectAccessor<1, hp::DoFHandler<3> >::set_vertex_dof_index (const unsigned int /*vertex*/,
                                                                      const unsigned int /*i*/,
                                                                      const unsigned int /*index*/,
                                              const unsigned int fe_index) const
 {
-  Assert (fe_index != hp::DoFHandler<2>::default_fe_index,
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
          ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (false, ExcInternalError());
 }
@@ -563,10 +577,22 @@ void DoFObjectAccessor<2, hp::DoFHandler<3> >::set_vertex_dof_index (const unsig
 }
 
 
+template <>
+void DoFObjectAccessor<3, hp::DoFHandler<3> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+                                                                     const unsigned int /*i*/,
+                                                                     const unsigned int /*index*/,
+                                             const unsigned int fe_index) const
+{
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
+  Assert (false, ExcInternalError());
+}
+
+
 template <>
 template <class InputVector, typename number>
 void
-DoFObjectAccessor<2,hp::DoFHandler<2> >::get_dof_values (const InputVector &/*values*/,
+DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*values*/,
                                                          Vector<number>    &/*local_values*/) const
 {
   Assert (false, ExcNotImplemented());
@@ -583,45 +609,29 @@ DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*va
 
 
 template <>
-template <class OutputVector, typename number>
+template <class InputVector, typename number>
 void
-DoFObjectAccessor<2,hp::DoFHandler<2> >::set_dof_values (const Vector<number> &/*local_values*/,
-                                                         OutputVector         &/*values*/) const
+DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*values*/,
+                                                         Vector<number>    &/*local_values*/) const
 {
   Assert (false, ExcNotImplemented());
 }
 
+
 template <>
 template <class OutputVector, typename number>
 void
-DoFObjectAccessor<2,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/*local_values*/,
+DoFObjectAccessor<1,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/*local_values*/,
                                                          OutputVector         &/*values*/) const
 {
   Assert (false, ExcNotImplemented());
 }
 
-
-
-
-// --------------- hp::DoFHandler specializations for 3d objects -----------
-
-
 template <>
-void DoFObjectAccessor<3, hp::DoFHandler<3> >::set_vertex_dof_index (const unsigned int /*vertex*/,
-                                                                     const unsigned int /*i*/,
-                                                                     const unsigned int /*index*/,
-                                             const unsigned int fe_index) const
-{
-  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
-         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
-  Assert (false, ExcInternalError());
-}
-
-template <>
-template <class InputVector, typename number>
+template <class OutputVector, typename number>
 void
-DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*values*/,
-                                                         Vector<number>    &/*local_values*/) const
+DoFObjectAccessor<2,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/*local_values*/,
+                                                         OutputVector         &/*values*/) const
 {
   Assert (false, ExcNotImplemented());
 }
@@ -636,6 +646,8 @@ DoFObjectAccessor<3,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/
 }
 
 
+#endif
+
 
 /*------------------------- Functions: DoFCellAccessor -----------------------*/
 

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.