]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Changes required for static linking of the library.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 15 Jun 2006 07:59:27 +0000 (07:59 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 15 Jun 2006 07:59:27 +0000 (07:59 +0000)
git-svn-id: https://svn.dealii.org/trunk@13251 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_accessor.templates.h
deal.II/deal.II/include/grid/tria.h
deal.II/deal.II/source/dofs/hp_dof_levels.all_dimensions.cc
deal.II/deal.II/source/dofs/hp_dof_levels.cc
deal.II/deal.II/source/grid/tria.cc
deal.II/deal.II/source/grid/tria_accessor.cc
deal.II/deal.II/source/grid/tria_levels.all_dimensions.cc [new file with mode: 0644]
deal.II/deal.II/source/grid/tria_levels.cc

index 8cea838d5e12c542ee11359b9b60b8c9b8f3507a..1fa568d72f5f3a67f95ccf4c7705e14750926f23 100644 (file)
@@ -569,7 +569,7 @@ DoFCellAccessor<hp::DoFHandler<3> >::face (const unsigned int i) const
 }
 
 
-
+#if deal_II_dimension == 1 
 
 template <>
 inline
@@ -608,6 +608,7 @@ get_dof_indices (std::vector<unsigned int> &dof_indices) const
                                                                this->active_fe_index());
 }
 
+#endif
 
 
 template <>
index 201f409e7d7269d17290dd5c0aa8da1ab043628b..6727607fd32c1e3b908c0c0931c5798859220c4a 100644 (file)
@@ -3186,6 +3186,8 @@ template <> Triangulation<1>::raw_face_iterator Triangulation<1>::end_face () co
 template <> Triangulation<1>::raw_face_iterator Triangulation<1>::last_raw_face () const;
 template <> Triangulation<1>::face_iterator Triangulation<1>::last_face () const;
 template <> Triangulation<1>::active_face_iterator Triangulation<1>::last_active_face () const;
+template <> Triangulation<1>::raw_line_iterator Triangulation<1>::begin_raw_line (const unsigned int level) const;
+template <> Triangulation<1>::raw_line_iterator Triangulation<1>::last_raw_line (const unsigned int level) const;
 template <> Triangulation<1>::raw_quad_iterator Triangulation<1>::begin_raw_quad (const unsigned int) const;
 template <> Triangulation<1>::quad_iterator Triangulation<1>::begin_quad (const unsigned int) const;
 template <> Triangulation<1>::active_quad_iterator Triangulation<1>::begin_active_quad (const unsigned int) const;
@@ -3255,9 +3257,12 @@ template <> unsigned int Triangulation<2>::n_active_cells (const unsigned int le
 template <> unsigned int Triangulation<3>::n_raw_cells (const unsigned int level) const;
 template <> unsigned int Triangulation<3>::n_cells (const unsigned int level) const;
 template <> unsigned int Triangulation<3>::n_active_cells (const unsigned int level) const;
+template <> unsigned int Triangulation<1>::n_raw_lines (const unsigned int level) const;
 template <> unsigned int Triangulation<1>::n_quads () const;
 template <> unsigned int Triangulation<1>::n_quads (const unsigned int) const;
 template <> unsigned int Triangulation<1>::n_raw_quads (const unsigned int) const;
+template <> unsigned int Triangulation<2>::n_raw_quads (const unsigned int) const;
+template <> unsigned int Triangulation<1>::n_raw_quads () const;
 template <> unsigned int Triangulation<1>::n_raw_hexs (const unsigned int) const;
 template <> unsigned int Triangulation<1>::n_active_quads (const unsigned int) const;
 template <> unsigned int Triangulation<1>::n_active_quads () const;
index 8f5480aa74a00e966c525757d779b58dbc7b5976..0033a41da5b877d89052560dcf73740b8b4bee3b 100644 (file)
@@ -20,45 +20,12 @@ namespace internal
 {
   namespace hp
   {
+    
     unsigned int
     DoFLevel<0>::memory_consumption () const
     {
       return MemoryConsumption::memory_consumption (active_fe_indices);
     }
-
-#if deal_II_dimension == 1
-
-    unsigned int
-    DoFLevel<1>::memory_consumption () const
-    {
-      return (DoFLevel<0>::memory_consumption() +
-              MemoryConsumption::memory_consumption (lines));
-    }
     
-#endif
-
-
-#if deal_II_dimension == 2
-
-    unsigned int
-    DoFLevel<2>::memory_consumption () const
-    {
-      return (DoFLevel<0>::memory_consumption () +
-              MemoryConsumption::memory_consumption (quads));
-    }
-
-#endif
-
-
-#if deal_II_dimension == 3
-
-    unsigned int
-    DoFLevel<3>::memory_consumption () const
-    {
-      return (DoFLevel<0>::memory_consumption () +
-              MemoryConsumption::memory_consumption (hexes));
-    }
-
-#endif
   }
 }
index a733dc64b2fcb05d206d14aab317dd3d80128ce4..99e204e78c35664671bca49bc6c7506f4e7811ee 100644 (file)
 
 
 #include <base/memory_consumption.h>
-#include <fe/fe_collection.h>
+#include <dofs/hp_dof_levels.h>
+
 
 namespace internal
 {
   namespace hp
   {
 
+#if deal_II_dimension == 1
+
+    unsigned int
+    DoFLevel<1>::memory_consumption () const
+    {
+      return (DoFLevel<0>::memory_consumption() +
+              MemoryConsumption::memory_consumption (lines));
+    }
+    
+#endif
+
+
+#if deal_II_dimension == 2
+
+    unsigned int
+    DoFLevel<2>::memory_consumption () const
+    {
+      return (DoFLevel<0>::memory_consumption () +
+              MemoryConsumption::memory_consumption (quads));
+    }
+
+#endif
+
+
+#if deal_II_dimension == 3
+
+    unsigned int
+    DoFLevel<3>::memory_consumption () const
+    {
+      return (DoFLevel<0>::memory_consumption () +
+              MemoryConsumption::memory_consumption (hexes));
+    }
+
+#endif
+
   }
 }
index b21926db7b85af7ae021b5b05d4912f69b768982..5322ff288e8007bc124f6366c7ad00a46bca440e 100644 (file)
@@ -161,6 +161,7 @@ Triangulation<dim>::get_boundary_indicators () const
   --------- explicit specialization, which is not allowed.                */
 
 #if deal_II_dimension == 1
+
 template <>
 Triangulation<1>::cell_iterator
 Triangulation<1>::begin (const unsigned int level) const
@@ -176,17 +177,6 @@ Triangulation<1>::end () const
   return end_line ();
 }
 
-template <>
-Triangulation<1>::raw_line_iterator
-Triangulation<1>::begin_raw_line (const unsigned int level) const;
-
-template <>
-Triangulation<1>::raw_line_iterator
-Triangulation<1>::last_raw_line (const unsigned int level) const;
-
-template <>
-unsigned int
-Triangulation<1>::n_raw_lines (const unsigned int level) const;
 #endif
 
 
@@ -215,9 +205,6 @@ template <>
 Triangulation<2>::raw_quad_iterator
 Triangulation<2>::last_raw_quad (const unsigned int level) const;
 
-template <>
-unsigned int
-Triangulation<2>::n_raw_quads (const unsigned int level) const;
 #endif
 
 
@@ -3424,7 +3411,7 @@ Triangulation<dim>::begin_raw_line (const unsigned int level) const
                            0);
 }
 
-
+#if deal_II_dimension == 1
 
 template <>
 Triangulation<1>::raw_line_iterator
@@ -3440,21 +3427,25 @@ Triangulation<1>::begin_raw_line (const unsigned int level) const
                            0);
 }
 
+#endif
 
+#if deal_II_dimension == 3
 
+// TODO: why does specialization not work?!
 template <int dim>
 typename Triangulation<dim>::raw_quad_iterator
 Triangulation<dim>::begin_raw_quad (const unsigned int level) const
 {
-  Assert (dim>=2,ExcImpossibleInDim(dim));
-  Assert (dim<3 || level == 0, ExcFacesHaveNoLevel())
+  Assert (level == 0, ExcFacesHaveNoLevel())
 
   return raw_quad_iterator (const_cast<Triangulation<dim>*>(this),
                            0,
                            0);
 }
 
+#endif
 
+#if deal_II_dimension == 2
 
 template <>
 Triangulation<2>::raw_quad_iterator
@@ -3470,6 +3461,7 @@ Triangulation<2>::begin_raw_quad (const unsigned int level) const
                            0);
 }
 
+#endif
 
 
 template <int dim>
@@ -3630,6 +3622,8 @@ Triangulation<dim>::last_raw_line (const unsigned int level) const
 }
 
 
+#if deal_II_dimension == 1
+
 template <>
 Triangulation<1>::raw_line_iterator
 Triangulation<1>::last_raw_line (const unsigned int level) const
@@ -3643,6 +3637,8 @@ Triangulation<1>::last_raw_line (const unsigned int level) const
                            levels[level]->lines.cells.size()-1);
 }
 
+#endif
+
 
 template <int dim>
 typename Triangulation<dim>::raw_quad_iterator
@@ -3655,6 +3651,8 @@ Triangulation<dim>::last_raw_quad (const unsigned int level) const
 }
 
 
+#if deal_II_dimension == 2
+
 template <>
 Triangulation<2>::raw_quad_iterator
 Triangulation<2>::last_raw_quad (const unsigned int level) const
@@ -3668,6 +3666,8 @@ Triangulation<2>::last_raw_quad (const unsigned int level) const
                            levels[level]->quads.cells.size()-1);
 }
 
+#endif
+
 
 template <int dim>
 typename Triangulation<dim>::raw_hex_iterator
@@ -4270,40 +4270,37 @@ unsigned int Triangulation<dim>::n_quads () const
 template <int dim>
 unsigned int Triangulation<dim>::n_quads (const unsigned int level) const
 {
-  Assert (level < number_cache.n_quads_level.size(),
-         ExcIndexRange (level, 0, number_cache.n_quads_level.size()));
   Assert (dim == 2, ExcFacesHaveNoLevel());
-  
+  Assert (level < number_cache.n_quads_level.size(),
+         ExcIndexRange (level, 0, number_cache.n_quads_level.size()));  
   return number_cache.n_quads_level[level];
 }
 
+#if deal_II_dimension == 2
 
-template <int dim>
-unsigned int Triangulation<dim>::n_raw_quads (const unsigned int) const
-{
-  Assert (dim <3, ExcFacesHaveNoLevel());
-  Assert (dim >2, ExcImpossibleInDim(dim));
-  if (dim>2)
-    return n_raw_quads();
-  else
-    return 0;
-}
 
-#if deal_II_dimension == 2
 template <>
 unsigned int Triangulation<2>::n_raw_quads (const unsigned int level) const
 {
   Assert(level < n_levels(), ExcIndexRange(level,0,n_levels()));
   return levels[level]->quads.cells.size();
 }
+
 #endif
 
+#if deal_II_dimension == 3
+
 template <>
-unsigned int Triangulation<3>::n_raw_quads () const
+unsigned int Triangulation<3>::n_raw_quads (const unsigned int) const
 {
-  return faces->quads.cells.size();
+  Assert(false, ExcFacesHaveNoLevel());
+  return 0;
 }
 
+#endif
+
+
+
 
 template <int dim>
 unsigned int Triangulation<dim>::n_raw_quads () const
@@ -4313,6 +4310,15 @@ unsigned int Triangulation<dim>::n_raw_quads () const
 }
 
 
+#if deal_II_dimension == 3
+
+template <>
+unsigned int Triangulation<3>::n_raw_quads () const
+{
+  return faces->quads.cells.size();
+}
+
+#endif
 
 template <int dim>
 unsigned int Triangulation<dim>::n_active_quads () const
@@ -8937,7 +8943,7 @@ Triangulation<dim>::memory_consumption () const
 }
 
   
-
+#if deal_II_dimension == 1
 
 template <>
 void Triangulation<1>::update_number_cache_lines () 
@@ -8987,6 +8993,8 @@ void Triangulation<1>::update_number_cache_lines ()
     }
 }
 
+#endif
+
 
 template <int dim>
 void Triangulation<dim>::update_number_cache_lines () 
index 301f7d738bab921d083d25285ccba65bed8f8acb..24fa3791e50563eabff4b516cc8503e09d3e2793 100644 (file)
@@ -37,6 +37,7 @@ set (const internal::Triangulation::Line &line) const
 }
 
 
+#if deal_II_dimension == 1
 
 template <>
 void
@@ -47,25 +48,30 @@ set (const internal::Triangulation::Line &line) const
     ->lines.cells[this->present_index] = line;
 }
 
+#endif
 
+#if deal_II_dimension == 1
 
-template <int dim>
-int TriaObjectAccessor<1, dim>::vertex_index (const unsigned int i) const
+template <>
+int TriaObjectAccessor<1, 1>::vertex_index (const unsigned int i) const
 {
   Assert (i<2, ExcIndexRange(i,0,2));
-  return this->tria->faces->lines.cells[this->present_index].vertex (i);
+  return this->tria->levels[this->present_level]->lines.cells[this->present_index].vertex (i);
 }
 
+#endif
 
 
-template <>
-int TriaObjectAccessor<1, 1>::vertex_index (const unsigned int i) const
+#if deal_II_dimension != 1
+
+template <int dim>
+int TriaObjectAccessor<1, dim>::vertex_index (const unsigned int i) const
 {
   Assert (i<2, ExcIndexRange(i,0,2));
-  return this->tria->levels[this->present_level]->lines.cells[this->present_index].vertex (i);
+  return this->tria->faces->lines.cells[this->present_index].vertex (i);
 }
 
-
+#endif
 
 template <int dim>
 Point<dim> &
@@ -85,6 +91,7 @@ void TriaObjectAccessor<1, dim>::set_used_flag () const
 }
 
 
+#if deal_II_dimension == 1
 
 template <>
 void TriaObjectAccessor<1, 1>::set_used_flag () const
@@ -94,7 +101,7 @@ void TriaObjectAccessor<1, 1>::set_used_flag () const
   this->tria->levels[this->present_level]->lines.used[this->present_index] = true;
 }
 
-
+#endif
 
 template <int dim>
 void TriaObjectAccessor<1, dim>::clear_used_flag () const
@@ -105,6 +112,7 @@ void TriaObjectAccessor<1, dim>::clear_used_flag () const
 }
 
 
+#if deal_II_dimension == 1
 
 template <>
 void TriaObjectAccessor<1, 1>::clear_used_flag () const
@@ -115,7 +123,7 @@ void TriaObjectAccessor<1, 1>::clear_used_flag () const
   this->tria->levels[this->present_level]->lines.used[this->present_index] = false;
 }
 
-
+#endif
 
 template <int dim>
 void TriaObjectAccessor<1, dim>::recursively_set_user_flag () const
@@ -149,6 +157,7 @@ void TriaObjectAccessor<1, dim>::set_user_pointer (void *p) const
 }
 
 
+#if deal_II_dimension == 1
 
 template <>
 void TriaObjectAccessor<1, 1>::set_user_pointer (void *p) const
@@ -158,7 +167,7 @@ void TriaObjectAccessor<1, 1>::set_user_pointer (void *p) const
   this->tria->levels[this->present_level]->lines.user_pointers[this->present_index] = p;
 }
 
-
+#endif
 
 template <int dim>
 void TriaObjectAccessor<1, dim>::clear_user_pointer () const
@@ -168,6 +177,7 @@ void TriaObjectAccessor<1, dim>::clear_user_pointer () const
 }
 
 
+#if deal_II_dimension == 1
 
 template <>
 void TriaObjectAccessor<1, 1>::clear_user_pointer () const
@@ -177,6 +187,7 @@ void TriaObjectAccessor<1, 1>::clear_user_pointer () const
   this->tria->levels[this->present_level]->lines.user_pointers[this->present_index] = 0;
 }
 
+#endif
 
 
 template <int dim>
@@ -187,6 +198,7 @@ void * TriaObjectAccessor<1, dim>::user_pointer () const
 }
 
 
+#if deal_II_dimension == 1
 
 template <>
 void * TriaObjectAccessor<1, 1>::user_pointer () const
@@ -196,6 +208,7 @@ void * TriaObjectAccessor<1, 1>::user_pointer () const
   return this->tria->levels[this->present_level]->lines.user_pointers[this->present_index];
 }
 
+#endif
 
 
 template <int dim>
@@ -236,6 +249,7 @@ void TriaObjectAccessor<1, dim>::set_children (const int index) const
 }
 
 
+#if deal_II_dimension == 1
 
 template <>
 void TriaObjectAccessor<1, 1>::set_children (const int index) const
@@ -249,7 +263,7 @@ void TriaObjectAccessor<1, 1>::set_children (const int index) const
   this->tria->levels[this->present_level]->lines.children[this->present_index] = index;
 }
 
-
+#endif
 
 template <int dim>
 void TriaObjectAccessor<1, dim>::clear_children () const
@@ -269,6 +283,7 @@ unsigned char TriaObjectAccessor<1, dim>::boundary_indicator () const
 }
 
 
+#if deal_II_dimension == 1
 
 template <>
 unsigned char TriaObjectAccessor<1, 1>::boundary_indicator () const
@@ -277,6 +292,7 @@ unsigned char TriaObjectAccessor<1, 1>::boundary_indicator () const
   return 0;
 }
 
+#endif
 
 
 template <int dim>
@@ -289,6 +305,7 @@ void TriaObjectAccessor<1, dim>::set_boundary_indicator (const unsigned char bou
 }
 
 
+#if deal_II_dimension == 1
 
 template <>
 void TriaObjectAccessor<1, 1>::set_boundary_indicator (const unsigned char) const
@@ -296,7 +313,7 @@ void TriaObjectAccessor<1, 1>::set_boundary_indicator (const unsigned char) cons
   Assert (false, ExcImpossibleInDim(1));
 }
 
-
+#endif
 
 
 template <int dim>
@@ -368,6 +385,7 @@ set (const internal::Triangulation::Quad &quad) const
 }
 
 
+#if deal_II_dimension == 2
 
 template <>
 void
@@ -378,6 +396,7 @@ set (const internal::Triangulation::Quad &quad) const
     ->quads.cells[this->present_index] = quad;
 }
 
+#endif
 
 
 template <int dim>
@@ -409,6 +428,7 @@ TriaObjectAccessor<2, dim>::set_used_flag () const
 }
 
 
+#if deal_II_dimension == 2
 
 template <>
 void
@@ -420,6 +440,7 @@ TriaObjectAccessor<2, 2>::set_used_flag () const
   this->tria->levels[this->present_level]->quads.used[this->present_index] = true;
 }
 
+#endif
 
 
 template <int dim>
@@ -431,6 +452,7 @@ void TriaObjectAccessor<2, dim>::clear_used_flag () const
 }
 
 
+#if deal_II_dimension == 2
 
 template <>
 void TriaObjectAccessor<2, 2>::clear_used_flag () const
@@ -441,7 +463,7 @@ void TriaObjectAccessor<2, 2>::clear_used_flag () const
   this->tria->levels[this->present_level]->quads.used[this->present_index] = false;
 }
 
-
+#endif
 
 template <int dim>
 void TriaObjectAccessor<2, dim>::recursively_set_user_flag () const
@@ -475,6 +497,7 @@ void TriaObjectAccessor<2, dim>::set_user_pointer (void *p) const
 }
 
 
+#if deal_II_dimension == 2
 
 template <>
 void TriaObjectAccessor<2, 2>::set_user_pointer (void *p) const
@@ -484,6 +507,7 @@ void TriaObjectAccessor<2, 2>::set_user_pointer (void *p) const
   this->tria->levels[this->present_level]->quads.user_pointers[this->present_index] = p;
 }
 
+#endif
 
 
 template <int dim>
@@ -494,6 +518,7 @@ void TriaObjectAccessor<2, dim>::clear_user_pointer () const
 }
 
 
+#if deal_II_dimension == 2
 
 template <>
 void TriaObjectAccessor<2, 2>::clear_user_pointer () const
@@ -503,6 +528,7 @@ void TriaObjectAccessor<2, 2>::clear_user_pointer () const
   this->tria->levels[this->present_level]->quads.user_pointers[this->present_index] = 0;
 }
 
+#endif
 
 
 template <int dim>
@@ -513,6 +539,7 @@ void * TriaObjectAccessor<2, dim>::user_pointer () const
 }
 
 
+#if deal_II_dimension == 2
 
 template <>
 void * TriaObjectAccessor<2, 2>::user_pointer () const
@@ -522,6 +549,7 @@ void * TriaObjectAccessor<2, 2>::user_pointer () const
   return this->tria->levels[this->present_level]->quads.user_pointers[this->present_index];
 }
 
+#endif
 
 
 template <int dim>
@@ -563,6 +591,7 @@ void TriaObjectAccessor<2, dim>::set_children (const int index) const
 }
 
 
+#if deal_II_dimension == 2
 
 template <>
 void TriaObjectAccessor<2, 2>::set_children (const int index) const
@@ -577,6 +606,7 @@ void TriaObjectAccessor<2, 2>::set_children (const int index) const
   this->tria->levels[this->present_level]->quads.children[this->present_index] = index;
 }
 
+#endif
 
 
 template <int dim>
@@ -595,6 +625,7 @@ unsigned char TriaObjectAccessor<2, dim>::boundary_indicator () const
 }
 
 
+#if deal_II_dimension == 3
 
 template <>
 unsigned char TriaObjectAccessor<2, 3>::boundary_indicator () const
@@ -604,6 +635,7 @@ unsigned char TriaObjectAccessor<2, 3>::boundary_indicator () const
   return this->tria->faces->quads.material_id[this->present_index];
 }
 
+#endif
 
 
 template <int dim>
@@ -613,6 +645,7 @@ void TriaObjectAccessor<2, dim>::set_boundary_indicator (const unsigned char) co
 }
 
 
+#if deal_II_dimension == 3
 
 template <>
 void TriaObjectAccessor<2, 3>::set_boundary_indicator (const unsigned char boundary_ind) const
@@ -622,6 +655,7 @@ void TriaObjectAccessor<2, 3>::set_boundary_indicator (const unsigned char bound
   this->tria->faces->quads.material_id[this->present_index] = boundary_ind;
 }
 
+#endif
 
 
 template <int dim>
@@ -865,6 +899,8 @@ unsigned int TriaObjectAccessor<2, dim>::number_of_children () const
 
 /*------------------------ Functions: TriaObjectAccessor ---------------------------*/
 
+#if deal_II_dimension == 3
+
 template <>
 void
 TriaObjectAccessor<3, 3>::
@@ -874,6 +910,7 @@ set (const internal::Triangulation::Hexahedron &hex) const
     ->hexes.cells[this->present_index] = hex;
 }
 
+#endif
 
 
 template <int dim>
@@ -917,6 +954,7 @@ TriaObjectAccessor<3, dim>::vertex (const unsigned int i) const
 }
 
 
+#if deal_II_dimension == 3
 
 template <>
 void TriaObjectAccessor<3, 3>::set_used_flag () const
@@ -928,7 +966,6 @@ void TriaObjectAccessor<3, 3>::set_used_flag () const
 }
 
 
-
 template <>
 void TriaObjectAccessor<3, 3>::clear_used_flag () const
 {
@@ -938,6 +975,7 @@ void TriaObjectAccessor<3, 3>::clear_used_flag () const
   this->tria->levels[this->present_level]->hexes.used[this->present_index] = false;
 }
 
+#endif
 
 
 template <int dim>
@@ -963,6 +1001,7 @@ void TriaObjectAccessor<3, dim>::recursively_clear_user_flag () const
 }
 
 
+#if deal_II_dimension == 3
 
 template <>
 void TriaObjectAccessor<3, 3>::set_user_pointer (void *p) const
@@ -973,7 +1012,6 @@ void TriaObjectAccessor<3, 3>::set_user_pointer (void *p) const
 }
 
 
-
 template <>
 void TriaObjectAccessor<3, 3>::clear_user_pointer () const
 {
@@ -983,7 +1021,6 @@ void TriaObjectAccessor<3, 3>::clear_user_pointer () const
 }
 
 
-
 template <>
 void * TriaObjectAccessor<3, 3>::user_pointer () const
 {
@@ -992,6 +1029,7 @@ void * TriaObjectAccessor<3, 3>::user_pointer () const
   return this->tria->levels[this->present_level]->hexes.user_pointers[this->present_index];
 }
 
+#endif
 
 
 template <int dim>
@@ -1019,6 +1057,7 @@ TriaObjectAccessor<3, dim>::recursively_clear_user_pointer () const
 }
 
 
+#if deal_II_dimension == 3
 
 template <>
 void TriaObjectAccessor<3, 3>::set_children (const int index) const
@@ -1032,6 +1071,7 @@ void TriaObjectAccessor<3, 3>::set_children (const int index) const
   this->tria->levels[this->present_level]->hexes.children[this->present_index] = index;
 }
 
+#endif
 
 
 template <int dim>
@@ -1799,6 +1839,7 @@ unsigned int TriaObjectAccessor<3, dim>::number_of_children () const
 }
 
 
+#if deal_II_dimension == 3 
 
 template <>
 void
@@ -1822,7 +1863,7 @@ set_face_orientation (const unsigned int face,
                               face]  = orientation;
 }
 
-
+#endif
 // Remark: The following explicit instantiations needed to be moved to
 // this place here to work around a problem with gcc3.3 on Apple MacOSX.
 // The reason is that some of the functions instantiated here are used
diff --git a/deal.II/deal.II/source/grid/tria_levels.all_dimensions.cc b/deal.II/deal.II/source/grid/tria_levels.all_dimensions.cc
new file mode 100644 (file)
index 0000000..4129127
--- /dev/null
@@ -0,0 +1,103 @@
+//---------------------------------------------------------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2006 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//---------------------------------------------------------------------------
+
+
+#include <base/memory_consumption.h>
+#include <grid/tria_levels.h>
+
+namespace internal
+{
+  namespace Triangulation
+  {
+        
+    void
+    TriaLevel<0>::reserve_space (const unsigned int total_cells,
+                                          const unsigned int dimension)
+    {
+                                       // we need space for total_cells
+                                       // cells. Maybe we have more already
+                                       // with those cells which are unused,
+                                       // so only allocate new space if needed.
+                                       //
+                                       // note that all arrays should have equal
+                                       // sizes (checked by @p{monitor_memory}
+      if (total_cells > refine_flags.size()) 
+        {
+          refine_flags.reserve (total_cells);
+          refine_flags.insert (refine_flags.end(),
+                               total_cells - refine_flags.size(),
+                               false);
+      
+          coarsen_flags.reserve (total_cells);
+          coarsen_flags.insert (coarsen_flags.end(),
+                                total_cells - coarsen_flags.size(),
+                                false);
+      
+          subdomain_ids.reserve (total_cells);
+          subdomain_ids.insert (subdomain_ids.end(),
+                                total_cells - subdomain_ids.size(),
+                                0);
+      
+          neighbors.reserve (total_cells*(2*dimension));
+          neighbors.insert (neighbors.end(),
+                            total_cells*(2*dimension) - neighbors.size(),
+                            std::make_pair(-1,-1));
+        };
+    }
+
+
+
+    void
+    TriaLevel<0>::monitor_memory (const unsigned int true_dimension) const
+    {
+                                       // check that we have not allocated
+                                       // too much memory. note that bool
+                                       // vectors allocate their memory in
+                                       // chunks of whole integers, so
+                                       // they may over-allocate by up to
+                                       // as many elements as an integer
+                                       // has bits
+      Assert (refine_flags.size() <= refine_flags.capacity() + sizeof(int)*8 ||
+              refine_flags.size()<DEAL_II_MIN_BOOL_VECTOR_CAPACITY,
+              ExcMemoryWasted ("refine_flags",
+                               refine_flags.size(), refine_flags.capacity()));
+      Assert (coarsen_flags.size() <= coarsen_flags.capacity() + sizeof(int)*8 ||
+              coarsen_flags.size()<DEAL_II_MIN_BOOL_VECTOR_CAPACITY,
+              ExcMemoryWasted ("coarsen_flags",
+                               coarsen_flags.size(), coarsen_flags.capacity()));
+      Assert (neighbors.size() ==  neighbors.capacity() ||
+              neighbors.size()<DEAL_II_MIN_VECTOR_CAPACITY,
+              ExcMemoryWasted ("neighbors",
+                               neighbors.size(), neighbors.capacity()));
+      Assert (subdomain_ids.size() ==  subdomain_ids.capacity() ||
+              subdomain_ids.size()<DEAL_II_MIN_VECTOR_CAPACITY,
+              ExcMemoryWasted ("subdomain_ids",
+                               subdomain_ids.size(), subdomain_ids.capacity()));
+      Assert (2*true_dimension*refine_flags.size() == neighbors.size(),
+              ExcMemoryInexact (refine_flags.size(), neighbors.size()));
+      Assert (2*true_dimension*coarsen_flags.size() == neighbors.size(),
+              ExcMemoryInexact (coarsen_flags.size(), neighbors.size()));
+    }
+
+
+
+    unsigned int
+    TriaLevel<0>::memory_consumption () const
+    {
+      return (MemoryConsumption::memory_consumption (refine_flags) +
+              MemoryConsumption::memory_consumption (coarsen_flags) +
+              MemoryConsumption::memory_consumption (neighbors));
+    }
+
+  }
+}
index 305da34e61b03b2ebdefdd17c1b4877762776090..02943daa0daf9c3ba4b369ac300561668bbfddaf 100644 (file)
@@ -19,85 +19,6 @@ namespace internal
 {
   namespace Triangulation
   {
-        
-    void
-    TriaLevel<0>::reserve_space (const unsigned int total_cells,
-                                          const unsigned int dimension)
-    {
-                                       // we need space for total_cells
-                                       // cells. Maybe we have more already
-                                       // with those cells which are unused,
-                                       // so only allocate new space if needed.
-                                       //
-                                       // note that all arrays should have equal
-                                       // sizes (checked by @p{monitor_memory}
-      if (total_cells > refine_flags.size()) 
-        {
-          refine_flags.reserve (total_cells);
-          refine_flags.insert (refine_flags.end(),
-                               total_cells - refine_flags.size(),
-                               false);
-      
-          coarsen_flags.reserve (total_cells);
-          coarsen_flags.insert (coarsen_flags.end(),
-                                total_cells - coarsen_flags.size(),
-                                false);
-      
-          subdomain_ids.reserve (total_cells);
-          subdomain_ids.insert (subdomain_ids.end(),
-                                total_cells - subdomain_ids.size(),
-                                0);
-      
-          neighbors.reserve (total_cells*(2*dimension));
-          neighbors.insert (neighbors.end(),
-                            total_cells*(2*dimension) - neighbors.size(),
-                            std::make_pair(-1,-1));
-        };
-    }
-
-
-
-    void
-    TriaLevel<0>::monitor_memory (const unsigned int true_dimension) const
-    {
-                                       // check that we have not allocated
-                                       // too much memory. note that bool
-                                       // vectors allocate their memory in
-                                       // chunks of whole integers, so
-                                       // they may over-allocate by up to
-                                       // as many elements as an integer
-                                       // has bits
-      Assert (refine_flags.size() <= refine_flags.capacity() + sizeof(int)*8 ||
-              refine_flags.size()<DEAL_II_MIN_BOOL_VECTOR_CAPACITY,
-              ExcMemoryWasted ("refine_flags",
-                               refine_flags.size(), refine_flags.capacity()));
-      Assert (coarsen_flags.size() <= coarsen_flags.capacity() + sizeof(int)*8 ||
-              coarsen_flags.size()<DEAL_II_MIN_BOOL_VECTOR_CAPACITY,
-              ExcMemoryWasted ("coarsen_flags",
-                               coarsen_flags.size(), coarsen_flags.capacity()));
-      Assert (neighbors.size() ==  neighbors.capacity() ||
-              neighbors.size()<DEAL_II_MIN_VECTOR_CAPACITY,
-              ExcMemoryWasted ("neighbors",
-                               neighbors.size(), neighbors.capacity()));
-      Assert (subdomain_ids.size() ==  subdomain_ids.capacity() ||
-              subdomain_ids.size()<DEAL_II_MIN_VECTOR_CAPACITY,
-              ExcMemoryWasted ("subdomain_ids",
-                               subdomain_ids.size(), subdomain_ids.capacity()));
-      Assert (2*true_dimension*refine_flags.size() == neighbors.size(),
-              ExcMemoryInexact (refine_flags.size(), neighbors.size()));
-      Assert (2*true_dimension*coarsen_flags.size() == neighbors.size(),
-              ExcMemoryInexact (coarsen_flags.size(), neighbors.size()));
-    }
-
-
-
-    unsigned int
-    TriaLevel<0>::memory_consumption () const
-    {
-      return (MemoryConsumption::memory_consumption (refine_flags) +
-              MemoryConsumption::memory_consumption (coarsen_flags) +
-              MemoryConsumption::memory_consumption (neighbors));
-    }
 
 #if deal_II_dimension == 1
 

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.