]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Define some functions only for the dimension we are presently in. This
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 19 Dec 2000 14:52:24 +0000 (14:52 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 19 Dec 2000 14:52:24 +0000 (14:52 +0000)
avoid trouble when linking with static libs.

git-svn-id: https://svn.dealii.org/trunk@3576 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/tria.cc

index fc21e14a58eb69d4fe5f58cccc05e858424ff269..5ad1391713780dbff2c06183642ff335020a84c0 100644 (file)
@@ -3476,72 +3476,55 @@ unsigned int Triangulation<dim>::n_active_quads (const unsigned int level) const
 
 #if deal_II_dimension < 3
 
-template <>
-unsigned int Triangulation<1>::n_hexs () const {
+template <int dim>
+unsigned int Triangulation<dim>::n_hexs () const
+{
   Assert (false, ExcFunctionNotUseful());
   return 0;
 };
 
 
-template <>
-unsigned int Triangulation<1>::n_hexs (const unsigned int) const {
-  Assert (false, ExcFunctionNotUseful());
-  return 0;
-};
-
 
-template <>
-unsigned int Triangulation<1>::n_active_hexs () const {
+template <int dim>
+unsigned int Triangulation<dim>::n_hexs (const unsigned int) const
+{
   Assert (false, ExcFunctionNotUseful());
   return 0;
 };
 
 
-template <>
-unsigned int Triangulation<1>::n_active_hexs (const unsigned int) const {
-  Assert (false, ExcFunctionNotUseful());
-  return 0;
-};
-
 
-template <>
-unsigned int Triangulation<2>::n_hexs () const {
+template <int dim>
+unsigned int Triangulation<dim>::n_active_hexs () const
+{
   Assert (false, ExcFunctionNotUseful());
   return 0;
 };
 
 
-template <>
-unsigned int Triangulation<2>::n_hexs (const unsigned int) const {
-  Assert (false, ExcFunctionNotUseful());
-  return 0;
-};
-
 
-template <>
-unsigned int Triangulation<2>::n_active_hexs () const {
+template <int dim>
+unsigned int Triangulation<dim>::n_active_hexs (const unsigned int) const
+{
   Assert (false, ExcFunctionNotUseful());
   return 0;
 };
 
 
-template <>
-unsigned int Triangulation<2>::n_active_hexs (const unsigned int) const {
-  Assert (false, ExcFunctionNotUseful());
-  return 0;
-};
-
-#endif
+#else
 
 
 template <int dim>
-unsigned int Triangulation<dim>::n_hexs () const {
+unsigned int Triangulation<dim>::n_hexs () const
+{
   return number_cache.n_hexes;
 };
 
 
+
 template <int dim>
-unsigned int Triangulation<dim>::n_hexs (const unsigned int level) const {
+unsigned int Triangulation<dim>::n_hexs (const unsigned int level) const
+{
   Assert (level < number_cache.n_hexes_level.size(),
          ExcIndexRange (level, 0, number_cache.n_hexes_level.size()));
   
@@ -3549,14 +3532,18 @@ unsigned int Triangulation<dim>::n_hexs (const unsigned int level) const {
 };
 
 
+
 template <int dim>
-unsigned int Triangulation<dim>::n_active_hexs () const {
+unsigned int Triangulation<dim>::n_active_hexs () const
+{
   return number_cache.n_active_hexes;
 };
 
 
+
 template <int dim>
-unsigned int Triangulation<dim>::n_active_hexs (const unsigned int level) const {
+unsigned int Triangulation<dim>::n_active_hexs (const unsigned int level) const
+{
   Assert (level < number_cache.n_hexes_level.size(),
          ExcIndexRange (level, 0, number_cache.n_hexes_level.size()));
   
@@ -3564,8 +3551,12 @@ unsigned int Triangulation<dim>::n_active_hexs (const unsigned int level) const
 };
 
 
+#endif
+
+
 template <int dim>
-unsigned int Triangulation<dim>::n_levels () const {
+unsigned int Triangulation<dim>::n_levels () const
+{
   if (levels.size() == 0)
     return 0;
                                   // check whether there are

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.