]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move around a few more classes into internal namespaces.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 18 Jan 2006 02:16:16 +0000 (02:16 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 18 Jan 2006 02:16:16 +0000 (02:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@12075 0785d39b-7218-0410-832d-ea1e28bc413d

12 files changed:
deal.II/deal.II/include/dofs/dof_handler.h
deal.II/deal.II/include/dofs/dof_levels.h
deal.II/deal.II/include/dofs/hp_dof_handler.h
deal.II/deal.II/include/dofs/hp_dof_levels.h
deal.II/deal.II/include/fe/hp_fe_values.h
deal.II/deal.II/include/multigrid/mg_dof_handler.h
deal.II/deal.II/source/dofs/dof_handler.cc
deal.II/deal.II/source/dofs/dof_levels.cc
deal.II/deal.II/source/dofs/hp_dof_handler.cc
deal.II/deal.II/source/dofs/hp_dof_levels.cc
deal.II/deal.II/source/fe/hp_fe_values.cc
deal.II/deal.II/source/multigrid/mg_dof_handler.cc

index a6a7651f3d608652020c637be4348e00ecd80f40..c45fcd4c3d7c58d34848169b287e4b0d60185770 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 #include <map>
 #include <set>
 
-template <int dim> class DoFLevel;
+namespace internal
+{
+  namespace DoFHandler
+  {
+    template <int dim> class DoFLevel;
+  }
+}
 
 
 /**
@@ -39,7 +45,7 @@ template <int dim> class DoFLevel;
  * to the fact that indices in global vectors and matrices also refer to all
  * degrees of freedom and some kind of condensation is needed to restrict the
  * systems of equations to the unconstrained degrees of freedom only. The
- * actual layout of storage of the indices is described in the DoFLevel class
+ * actual layout of storage of the indices is described in the internal::DoFHandler::DoFLevel class
  * documentation.
  *
  * The class offers iterators to traverse all cells, in much the same way as
@@ -1026,7 +1032,7 @@ class DoFHandler  :  public Subscriptor
                                      * <tt>levels[]</tt> tree of the Triangulation
                                      * objects.
                                      */
-    std::vector<DoFLevel<dim>*>    levels;
+    std::vector<internal::DoFHandler::DoFLevel<dim>*>    levels;
 
                                     /**
                                      * Store the number of dofs created last
index 5b1ec37744d621f3937df5570b9d27966b7ccf3b..279fa6c9c037cfd2d8ee0b52631506de71ab08a7 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 #include <vector>
 
 
+namespace internal
+{
+/**
+ * A namespace for internal data structures of the DoFHandler group of classes.
+ *
+ * @ingroup dofs
+ */
+  namespace DoFHandler
+  {
+    
 /**
  * Store the indices of the degrees of freedom which are located on
  * objects of dimension @p N.  Declare this general template
  * @ingroup dofs
  * @author Wolfgang Bangerth, 1998
  */
-template <int N>
-class DoFLevel
-{
-  private:
-                                    /**
-                                     * Make the constructor private
-                                     * to avoid that someone uses
-                                     * this class.
-                                     */
-    DoFLevel ();
-};
+    template <int N>
+    class DoFLevel
+    {
+      private:
+                                         /**
+                                          * Make the constructor private
+                                          * to avoid that someone uses
+                                          * this class.
+                                          */
+        DoFLevel ();
+    };
 
 
 /**
@@ -90,25 +100,25 @@ class DoFLevel
  * @ingroup dofs
  * @author Wolfgang Bangerth, 1998
  */
-template <>
-class DoFLevel<1>
-{
-  public:
-                                    /**
-                                     * Store the global indices of
-                                     * the degrees of freedom. See
-                                     * DoFLevel for detailed
-                                     * information.
-                                     */
-    std::vector<unsigned int> line_dofs;
-
-                                    /**
-                                     * Determine an estimate for the
-                                     * memory consumption (in bytes)
-                                     * of this object.
-                                     */
-    unsigned int memory_consumption () const;
-};
+    template <>
+    class DoFLevel<1>
+    {
+      public:
+                                         /**
+                                          * Store the global indices of
+                                          * the degrees of freedom. See
+                                          * DoFLevel for detailed
+                                          * information.
+                                          */
+        std::vector<unsigned int> line_dofs;
+
+                                         /**
+                                          * Determine an estimate for the
+                                          * memory consumption (in bytes)
+                                          * of this object.
+                                          */
+        unsigned int memory_consumption () const;
+    };
 
 
 
@@ -119,25 +129,25 @@ class DoFLevel<1>
  * @ingroup dofs
  * @author Wolfgang Bangerth, 1998
  */
-template <>
-class DoFLevel<2> : public DoFLevel<1>
-{
-  public:
-                                    /**
-                                     * Store the global indices of
-                                     * the degrees of freedom. See
-                                     * DoFLevel for detailed
-                                     * information.
-                                     */
-    std::vector<unsigned int> quad_dofs;
-
-                                    /**
-                                     * Determine an estimate for the
-                                     * memory consumption (in bytes)
-                                     * of this object.
-                                     */
-    unsigned int memory_consumption () const;
-};
+    template <>
+    class DoFLevel<2> : public DoFLevel<1>
+    {
+      public:
+                                         /**
+                                          * Store the global indices of
+                                          * the degrees of freedom. See
+                                          * DoFLevel for detailed
+                                          * information.
+                                          */
+        std::vector<unsigned int> quad_dofs;
+
+                                         /**
+                                          * Determine an estimate for the
+                                          * memory consumption (in bytes)
+                                          * of this object.
+                                          */
+        unsigned int memory_consumption () const;
+    };
 
 
 
@@ -148,25 +158,28 @@ class DoFLevel<2> : public DoFLevel<1>
  * @ingroup dofs
  * @author Wolfgang Bangerth, 1998
  */
-template <>
-class DoFLevel<3> : public DoFLevel<2>
-{
-  public:
-                                    /**
-                                     * Store the global indices of
-                                     * the degrees of freedom. See
-                                     * DoFLevel for detailed
-                                     * information.
-                                     */
-    std::vector<unsigned int> hex_dofs;
-
-                                    /**
-                                     * Determine an estimate for the
-                                     * memory consumption (in bytes)
-                                     * of this object.
-                                     */
-    unsigned int memory_consumption () const;
-};
-
+    template <>
+    class DoFLevel<3> : public DoFLevel<2>
+    {
+      public:
+                                         /**
+                                          * Store the global indices of
+                                          * the degrees of freedom. See
+                                          * DoFLevel for detailed
+                                          * information.
+                                          */
+        std::vector<unsigned int> hex_dofs;
+
+                                         /**
+                                          * Determine an estimate for the
+                                          * memory consumption (in bytes)
+                                          * of this object.
+                                          */
+        unsigned int memory_consumption () const;
+    };
+    
+  }
+  
+}
 
 #endif
index 5c6b90ce342029a09535fbe2ca9b211382724c4f..d93f157be906041c06e05d4afdc5fc450f8b4b63 100644 (file)
 #include <set>
 
 
+namespace internal
+{
+  namespace hp
+  {
+    template <int> class DoFLevel;
+  }
+}
+
+    
+
 /**
  * A namespace that holds all the classes that have to do with hp finite
  * elements.
@@ -36,9 +46,6 @@
 namespace hp
 {
 
-  template <int> class DoFLevel;
-
-
 /**
  * Manage the distribution and numbering of the degrees of freedom for
  * hp-FEM algorithms.
@@ -944,7 +951,7 @@ namespace hp
                                        /**
                                         *  Create default tables for the
                                         *  active_fe_indices in the
-                                        *  hp::DoFLevels. They are
+                                        *  internal::hp::DoFLevels. They are
                                         *  initialized with the base fe.
                                         *  This method is called before
                                         *  refinement and before distribute_dofs
@@ -972,7 +979,7 @@ namespace hp
                                         * <tt>levels[]</tt> tree of the Triangulation
                                         * objects.
                                         */
-      std::vector<hp::DoFLevel<dim>*>    levels;
+      std::vector<internal::hp::DoFLevel<dim>*>    levels;
 
                                        /**
                                         * Store the number of dofs created last
index 1908a3bb187ae3c916020713b94570955dc2c322..8259f93a5b5952e7635dcddd1dad23fba7b93307 100644 (file)
 #include <vector>
 
 
-namespace hp
+namespace internal
 {
+  namespace hp
+  {
 
 /**
  * Store the indices of the degrees of freedom which are located on
@@ -31,17 +33,17 @@ namespace hp
  *
  * @author Wolfgang Bangerth, 1998, Oliver Kayser-Herold 2003.
  */
-  template <int N>
-  class DoFLevel
-  {
-    private:
-                                       /**
-                                        * Make the constructor private
-                                        * to avoid that someone uses
-                                        * this class.
-                                        */
-      DoFLevel ();
-  };
+    template <int N>
+    class DoFLevel
+    {
+      private:
+                                         /**
+                                          * Make the constructor private
+                                          * to avoid that someone uses
+                                          * this class.
+                                          */
+        DoFLevel ();
+    };
 
 
 /**
@@ -55,26 +57,26 @@ namespace hp
  * 
  * @ingroup hp
  */
-  template <>
-  class DoFLevel<0>
-  {
-    public:
-                                       /**
-                                        *  Indices specifying the finite
-                                        *  element of hp::FECollection to use
-                                        *  for the different cells. The
-                                        *  meaning what a cell is, is
-                                        *  dimension specific, therefore also
-                                        *  the length of this vector depends
-                                        *  on the dimension: in one dimension,
-                                        *  the length of this vector equals
-                                        *  the length of the @p lines vector,
-                                        *  in two dimensions that of the @p
-                                        *  quads vector, etc.
-                                        */
-
-      std::vector<unsigned int> active_fe_indices;
-  };
+    template <>
+    class DoFLevel<0>
+    {
+      public:
+                                         /**
+                                          *  Indices specifying the finite
+                                          *  element of hp::FECollection to use
+                                          *  for the different cells. The
+                                          *  meaning what a cell is, is
+                                          *  dimension specific, therefore also
+                                          *  the length of this vector depends
+                                          *  on the dimension: in one dimension,
+                                          *  the length of this vector equals
+                                          *  the length of the @p lines vector,
+                                          *  in two dimensions that of the @p
+                                          *  quads vector, etc.
+                                          */
+
+        std::vector<unsigned int> active_fe_indices;
+    };
 
 
 /**
@@ -131,33 +133,33 @@ namespace hp
  * @ingroup hp
  * @author Wolfgang Bangerth, 1998, Oliver Kayser-Herold 2003.
  */
-  template <>
-  class DoFLevel<1> : public DoFLevel<0>
-  {
-    public:
-
-                                       /**
-                                       * Store the start index for
-                                       * the degrees of freedom of each
-                                       * line in the @p line_dofs array.
-                                       */
-      std::vector<unsigned int> dof_line_index_offset;
-
-                                       /**
-                                        * Store the global indices of
-                                        * the degrees of freedom. See
-                                        * DoFLevel() for detailed
-                                        * information.
-                                        */
-      std::vector<unsigned int> line_dofs;
-
-                                       /**
-                                        * Determine an estimate for the
-                                        * memory consumption (in bytes)
-                                        * of this object.
-                                        */
-      unsigned int memory_consumption () const;
-  };
+    template <>
+    class DoFLevel<1> : public DoFLevel<0>
+    {
+      public:
+
+                                         /**
+                                          * Store the start index for
+                                          * the degrees of freedom of each
+                                          * line in the @p line_dofs array.
+                                          */
+        std::vector<unsigned int> dof_line_index_offset;
+
+                                         /**
+                                          * Store the global indices of
+                                          * the degrees of freedom. See
+                                          * DoFLevel() for detailed
+                                          * information.
+                                          */
+        std::vector<unsigned int> line_dofs;
+
+                                         /**
+                                          * Determine an estimate for the
+                                          * memory consumption (in bytes)
+                                          * of this object.
+                                          */
+        unsigned int memory_consumption () const;
+    };
 
 
 /**
@@ -168,33 +170,33 @@ namespace hp
  *
  * @author Wolfgang Bangerth, 1998, Oliver Kayser-Herold 2003.
  */
-  template <>
-  class DoFLevel<2> : public DoFLevel<1>
-  {
-    public:
-
-                                       /**
-                                       * Store the start index for
-                                       * the degrees of freedom of each
-                                       * quad in the @p quad_dofs array.
-                                       */
-      std::vector<unsigned int> dof_quad_index_offset;
-
-                                       /**
-                                        * Store the global indices of
-                                        * the degrees of freedom. See
-                                        * DoFLevel() for detailed
-                                        * information.
-                                        */
-      std::vector<unsigned int> quad_dofs;
-
-                                       /**
-                                        * Determine an estimate for the
-                                        * memory consumption (in bytes)
-                                        * of this object.
-                                        */
-      unsigned int memory_consumption () const;
-  };
+    template <>
+    class DoFLevel<2> : public DoFLevel<1>
+    {
+      public:
+
+                                         /**
+                                          * Store the start index for
+                                          * the degrees of freedom of each
+                                          * quad in the @p quad_dofs array.
+                                          */
+        std::vector<unsigned int> dof_quad_index_offset;
+
+                                         /**
+                                          * Store the global indices of
+                                          * the degrees of freedom. See
+                                          * DoFLevel() for detailed
+                                          * information.
+                                          */
+        std::vector<unsigned int> quad_dofs;
+
+                                         /**
+                                          * Determine an estimate for the
+                                          * memory consumption (in bytes)
+                                          * of this object.
+                                          */
+        unsigned int memory_consumption () const;
+    };
 
 
 
@@ -206,34 +208,36 @@ namespace hp
  *
  * @author Wolfgang Bangerth, 1998, Oliver Kayser-Herold 2003.
  */
-  template <>
-  class DoFLevel<3> : public DoFLevel<2>
-  {
-    public:
-
-                                       /**
-                                       * Store the start index for
-                                       * the degrees of freedom of each
-                                       * hex in the @p hex_dofs array.
-                                       */
-      std::vector<unsigned int> dof_hex_index_offset;
-
-                                       /**
-                                        * Store the global indices of
-                                        * the degrees of freedom. See
-                                        * DoFLevel() for detailed
-                                        * information.
-                                        */
-      std::vector<unsigned int> hex_dofs;
-
-                                       /**
-                                        * Determine an estimate for the
-                                        * memory consumption (in bytes)
-                                        * of this object.
-                                        */
-      unsigned int memory_consumption () const;
-  };
+    template <>
+    class DoFLevel<3> : public DoFLevel<2>
+    {
+      public:
+
+                                         /**
+                                          * Store the start index for
+                                          * the degrees of freedom of each
+                                          * hex in the @p hex_dofs array.
+                                          */
+        std::vector<unsigned int> dof_hex_index_offset;
+
+                                         /**
+                                          * Store the global indices of
+                                          * the degrees of freedom. See
+                                          * DoFLevel() for detailed
+                                          * information.
+                                          */
+        std::vector<unsigned int> hex_dofs;
+
+                                         /**
+                                          * Determine an estimate for the
+                                          * memory consumption (in bytes)
+                                          * of this object.
+                                          */
+        unsigned int memory_consumption () const;
+    };
+  
+  } // namespace hp
   
-} // namespace hp
+} // namespace internal
 
 #endif
index cd8acb0f8e90e74713f0a800534a615182853299..b8a3862954bdcf5dc5a94f977767c1aadfcd99d4 100644 (file)
@@ -27,15 +27,9 @@ template <int dim> class MappingQ1;
 template <int dim> class FiniteElement;
 
 
-namespace hp
+namespace internal
 {
-
-/**
- * A namespace for hp implementation details.
- * 
- * @ingroup hp
- */
-  namespace internal 
+  namespace hp
   {
 /**
  * Map between finite element objects and @p FEValues (the second
@@ -176,8 +170,8 @@ namespace hp
                                           * indicated by the parameters
                                           * to the constructor.
                                           */
-        FEValuesBase (const hp::MappingCollection<dim> &mapping_collection,
-                      const hp::QCollection<q_dim>     &q_collection,
+        FEValuesBase (const ::hp::MappingCollection<dim> &mapping_collection,
+                      const ::hp::QCollection<q_dim>     &q_collection,
                       const UpdateFlags             update_flags);
 
 
@@ -190,7 +184,7 @@ namespace hp
                                           * object for the mapping
                                           * object.
                                           */
-        FEValuesBase (const hp::QCollection<q_dim> &q_collection,
+        FEValuesBase (const ::hp::QCollection<q_dim> &q_collection,
                       const UpdateFlags         update_flags);
 
 
@@ -201,7 +195,7 @@ namespace hp
                                           * upon construction of the
                                           * object.
                                           */
-        const hp::MappingCollection<dim> mapping_collection;
+        const ::hp::MappingCollection<dim> mapping_collection;
     
                                          /**
                                           * Copy of the quadrature
@@ -209,7 +203,7 @@ namespace hp
                                           * provided to the
                                           * constructor.
                                           */
-        const hp::QCollection<q_dim> q_collection;
+        const ::hp::QCollection<q_dim> q_collection;
 
                                          /**
                                           * Values of the update flags as
@@ -217,16 +211,22 @@ namespace hp
                                           */
         const UpdateFlags update_flags;
     };
+
   }
+  
+}
 
 
+namespace hp
+{
+  
 /**
  * 
  * @ingroup hp
  */  
   template <int dim>
-  class FEValues : public hp::internal::FEValuesMap<dim,::FEValues<dim> >,
-                   protected hp::internal::FEValuesBase<dim,dim>
+  class FEValues : public internal::hp::FEValuesMap<dim,::FEValues<dim> >,
+                   protected internal::hp::FEValuesBase<dim,dim>
   {
     public:
                                        /**
@@ -249,9 +249,9 @@ namespace hp
                                         * <tt>DoFHandler::get_fe()</tt>
                                         * function.
                                         */
-      FEValues (const hp::MappingCollection<dim> &mapping_collection,
-                const hp::FECollection<dim>  &fe_collection,
-                const hp::QCollection<dim>       &q_collection,
+      FEValues (const ::hp::MappingCollection<dim> &mapping_collection,
+                const ::hp::FECollection<dim>  &fe_collection,
+                const ::hp::QCollection<dim>       &q_collection,
                 const UpdateFlags             update_flags);
 
 
@@ -313,8 +313,8 @@ namespace hp
  * @ingroup hp
  */  
   template <int dim>
-  class FEFaceValues : public hp::internal::FEValuesMap<dim,::FEFaceValues<dim> >,
-                       protected hp::internal::FEValuesBase<dim,dim-1>
+  class FEFaceValues : public internal::hp::FEValuesMap<dim,::FEFaceValues<dim> >,
+                       protected internal::hp::FEValuesBase<dim,dim-1>
   {
     public:
                                        /**
@@ -426,8 +426,8 @@ namespace hp
  * @ingroup hp
  */  
   template <int dim>
-  class FESubfaceValues : public hp::internal::FEValuesMap<dim,::FESubfaceValues<dim> >,
-                          protected hp::internal::FEValuesBase<dim,dim-1>
+  class FESubfaceValues : public internal::hp::FEValuesMap<dim,::FESubfaceValues<dim> >,
+                          protected internal::hp::FEValuesBase<dim,dim-1>
   {
     public:
                                        /**
@@ -534,11 +534,15 @@ namespace hp
       create_fe_values (const FiniteElement<dim> &fe,
                         const unsigned int active_fe_index) const;
   };
+  
+}
 
 
 // -------------- inline and template functions --------------
 
-  namespace internal 
+namespace internal 
+{
+  namespace hp
   {
     template <int dim, class FEValues>
     inline
index e6e8869b288ea59620ffe6b7cc04dc156b9d4ee3..8812e485860e732768e16f6017f8e8a45b34b5e8 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -1135,7 +1135,7 @@ class MGDoFHandler : public DoFHandler<dim>
                                      * are numbers which start from
                                      * zero on each level.
                                      */
-    std::vector<DoFLevel<dim>*>    mg_levels;
+    std::vector<internal::DoFHandler::DoFLevel<dim>*>    mg_levels;
 
                                     /**
                                      * For each vertex there is a
index 705b3e54d1e2966b94a78814ce3d9958a51d9f62..f59756d61521792c54f13dec49064e8d7721ac80 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -1980,7 +1980,7 @@ void DoFHandler<1>::reserve_space () {
     
   for (unsigned int i=0; i<tria->n_levels(); ++i) 
     {
-      levels.push_back (new DoFLevel<1>);
+      levels.push_back (new internal::DoFHandler::DoFLevel<1>);
 
       levels.back()->line_dofs = std::vector<unsigned int>(tria->levels[i]->lines.lines.size() *
                                                           selected_fe->dofs_per_line,
@@ -2010,7 +2010,7 @@ void DoFHandler<2>::reserve_space () {
 
   for (unsigned int i=0; i<tria->n_levels(); ++i) 
     {
-      levels.push_back (new DoFLevel<2>);
+      levels.push_back (new internal::DoFHandler::DoFLevel<2>);
 
       levels.back()->line_dofs = std::vector<unsigned int> (tria->levels[i]->lines.lines.size() *
                                                            selected_fe->dofs_per_line,
@@ -2042,7 +2042,7 @@ void DoFHandler<3>::reserve_space () {
 
   for (unsigned int i=0; i<tria->n_levels(); ++i) 
     {
-      levels.push_back (new DoFLevel<3>);
+      levels.push_back (new internal::DoFHandler::DoFLevel<3>);
 
       levels.back()->line_dofs = std::vector<unsigned int> (tria->levels[i]->lines.lines.size() *
                                                            selected_fe->dofs_per_line,
index 9915d5e0ee9feca677354338c0b18687df9ba53f..3cf22e4417743e0c786a98ee949dce373902a7fc 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2002, 2003, 2005 by the deal.II authors
+//    Copyright (C) 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
 #include <dofs/dof_levels.h>
 
 
-
-unsigned int
-DoFLevel<1>::memory_consumption () const
-{
-  return MemoryConsumption::memory_consumption (line_dofs);
-}
-
-
-
-unsigned int
-DoFLevel<2>::memory_consumption () const
+namespace internal
 {
-  return (DoFLevel<1>::memory_consumption () +
-          MemoryConsumption::memory_consumption (quad_dofs));
+  namespace DoFHandler
+  {
+    
+    unsigned int
+    DoFLevel<1>::memory_consumption () const
+    {
+      return MemoryConsumption::memory_consumption (line_dofs);
+    }
+
+
+
+    unsigned int
+    DoFLevel<2>::memory_consumption () const
+    {
+      return (DoFLevel<1>::memory_consumption () +
+              MemoryConsumption::memory_consumption (quad_dofs));
+    }
+
+
+
+    unsigned int
+    DoFLevel<3>::memory_consumption () const
+    {
+      return (DoFLevel<2>::memory_consumption () +
+              MemoryConsumption::memory_consumption (hex_dofs));
+    }
+    
+  }
+  
 }
-
-
-
-unsigned int
-DoFLevel<3>::memory_consumption () const
-{
-  return (DoFLevel<2>::memory_consumption () +
-          MemoryConsumption::memory_consumption (hex_dofs));
-}
-
index d4045a9e02d38e6cdb5dee4486cc92177c49485d..d4d0f23fe5f2675d43bfe90b5f20011fa6024870 100644 (file)
@@ -1939,7 +1939,7 @@ namespace hp
 
     for (unsigned int i=0; i<tria->n_levels(); ++i) 
       {
-        levels.push_back (new hp::DoFLevel<1>);
+        levels.push_back (new internal::hp::DoFLevel<1>);
         std::swap (active_fe_backup[i], levels.back()->active_fe_indices);
 
         levels.back()->dof_line_index_offset = std::vector<unsigned int>
@@ -1991,7 +1991,7 @@ namespace hp
 // number of DoFs due to the different active_fe_index of the adjacent cells.
     for (unsigned int i=0; i<tria->n_levels(); ++i) 
       {
-        levels.push_back (new hp::DoFLevel<2>);
+        levels.push_back (new internal::hp::DoFLevel<2>);
         std::swap (active_fe_backup[i], levels.back()->active_fe_indices);
 
         levels.back()->dof_line_index_offset = std::vector<unsigned int>
@@ -2155,7 +2155,7 @@ namespace hp
 // number of DoFs due to the different active_fe_index of the adjacent cells.
     for (unsigned int i=0; i<tria->n_levels(); ++i) 
       {
-        levels.push_back (new hp::DoFLevel<3>);
+        levels.push_back (new internal::hp::DoFLevel<3>);
         std::swap (active_fe_backup[i], levels.back()->active_fe_indices);
 
         levels.back()->dof_line_index_offset = std::vector<unsigned int>
@@ -2217,7 +2217,7 @@ namespace hp
   {
                                      // Create sufficiently many hpDoFLevels.
     while (levels.size () < tria->n_levels ())
-      levels.push_back (new hp::DoFLevel<dim>);
+      levels.push_back (new internal::hp::DoFLevel<dim>);
 
     for (unsigned int i=0; i<levels.size(); ++i)
       {
@@ -2345,7 +2345,7 @@ namespace hp
                                      // it is appended to the DoFHandler
                                      // levels.
     if (levels.size () < tria.n_levels ())
-      levels.push_back (new hp::DoFLevel<dim>);
+      levels.push_back (new internal::hp::DoFLevel<dim>);
 
                                      // Coarsening can lead to the loss
                                      // of levels. Hence remove them.
index 42c1beaaa96c9f5302670d999ed44c61b88fda78..8df4c7259849db8764517907a4b0b92ffead5e5d 100644 (file)
 #include <dofs/hp_dof_levels.h>
 
 
-namespace hp
+namespace internal
 {
-  unsigned int
-  DoFLevel<1>::memory_consumption () const
+  namespace hp
   {
-    return (MemoryConsumption::memory_consumption (line_dofs) +
-            MemoryConsumption::memory_consumption (dof_line_index_offset));
-  }
+    unsigned int
+    DoFLevel<1>::memory_consumption () const
+    {
+      return (MemoryConsumption::memory_consumption (line_dofs) +
+              MemoryConsumption::memory_consumption (dof_line_index_offset));
+    }
 
 
 
-  unsigned int
-  DoFLevel<2>::memory_consumption () const
-  {
-    return (hp::DoFLevel<1>::memory_consumption () +
-            MemoryConsumption::memory_consumption (quad_dofs) +
-            MemoryConsumption::memory_consumption (dof_quad_index_offset));
-  }
+    unsigned int
+    DoFLevel<2>::memory_consumption () const
+    {
+      return (DoFLevel<1>::memory_consumption () +
+              MemoryConsumption::memory_consumption (quad_dofs) +
+              MemoryConsumption::memory_consumption (dof_quad_index_offset));
+    }
 
 
 
-  unsigned int
-  DoFLevel<3>::memory_consumption () const
-  {
-    return (hp::DoFLevel<2>::memory_consumption () +
-            MemoryConsumption::memory_consumption (hex_dofs) +
-            MemoryConsumption::memory_consumption (dof_hex_index_offset));
+    unsigned int
+    DoFLevel<3>::memory_consumption () const
+    {
+      return (DoFLevel<2>::memory_consumption () +
+              MemoryConsumption::memory_consumption (hex_dofs) +
+              MemoryConsumption::memory_consumption (dof_hex_index_offset));
+    }
   }
 }
index 6c059a0eb0f8094985ac4e2ad17a1771cf47799d..8ac956e8ebfc7a10b7371cda106f86a5494db000 100644 (file)
 
 // -------------------------- FEValuesMap -------------------------
 
-namespace hp
+namespace internal
 {
   
-  namespace internal 
+  namespace hp
   {
     template <int dim, class FEValues>
     FEValuesMap<dim,FEValues>::~FEValuesMap () 
@@ -61,8 +61,8 @@ namespace hp
 
     template <int dim, int q_dim>
     FEValuesBase<dim,q_dim>::FEValuesBase (
-      const hp::MappingCollection<dim> &mapping_collection,
-      const hp::QCollection<q_dim>     &q_collection,
+      const ::hp::MappingCollection<dim> &mapping_collection,
+      const ::hp::QCollection<q_dim>     &q_collection,
       const UpdateFlags             update_flags)
                     :
                     mapping_collection (mapping_collection),
@@ -72,17 +72,22 @@ namespace hp
 
 
     template <int dim, int q_dim>
-    FEValuesBase<dim,q_dim>::FEValuesBase (const hp::QCollection<q_dim> &q_collection,
+    FEValuesBase<dim,q_dim>::FEValuesBase (const ::hp::QCollection<q_dim> &q_collection,
                                            const UpdateFlags         update_flags)
                     :
                     mapping_collection (default_mapping),
                     q_collection (q_collection),
                     update_flags (update_flags)
     {}
-
+    
   }
+}
 
 
+
+namespace hp
+{
+  
 // -------------------------- FEValues -------------------------
 
 
@@ -92,9 +97,9 @@ namespace hp
                            const hp::QCollection<dim>       &q_collection,
                            const UpdateFlags             update_flags)
                   :
-                  internal::FEValuesBase<dim,dim> (mapping,
-                                                   q_collection,
-                                                   update_flags)
+                  internal::hp::FEValuesBase<dim,dim> (mapping,
+                                                       q_collection,
+                                                       update_flags)
   {}
 
 
@@ -103,8 +108,8 @@ namespace hp
                            const hp::QCollection<dim>      &q_collection,
                            const UpdateFlags            update_flags)
                   :
-                  internal::FEValuesBase<dim,dim> (q_collection,
-                                                   update_flags)
+                  internal::hp::FEValuesBase<dim,dim> (q_collection,
+                                                       update_flags)
   {}
 
 
@@ -139,9 +144,9 @@ namespace hp
                                    const hp::QCollection<dim-1> &q_collection,
                                    const UpdateFlags         update_flags)
                   :
-                  internal::FEValuesBase<dim,dim-1> (mapping,
-                                                     q_collection,
-                                                     update_flags)
+                  internal::hp::FEValuesBase<dim,dim-1> (mapping,
+                                                         q_collection,
+                                                         update_flags)
   {}
 
 
@@ -150,8 +155,8 @@ namespace hp
                                    const hp::QCollection<dim-1> &q_collection,
                                    const UpdateFlags         update_flags)
                   :
-                  internal::FEValuesBase<dim,dim-1> (q_collection,
-                                                     update_flags)
+                  internal::hp::FEValuesBase<dim,dim-1> (q_collection,
+                                                         update_flags)
   {}
 
 
@@ -197,9 +202,9 @@ namespace hp
                                          const hp::QCollection<dim-1> &q_collection,
                                          const UpdateFlags         update_flags)
                   :
-                  internal::FEValuesBase<dim,dim-1> (mapping,
-                                                     q_collection,
-                                                     update_flags)
+                  internal::hp::FEValuesBase<dim,dim-1> (mapping,
+                                                         q_collection,
+                                                         update_flags)
   {}
 
 
@@ -208,8 +213,8 @@ namespace hp
                                          const hp::QCollection<dim-1> &q_collection,
                                          const UpdateFlags         update_flags)
                   :
-                  internal::FEValuesBase<dim,dim-1> (q_collection,
-                                                     update_flags)
+                  internal::hp::FEValuesBase<dim,dim-1> (q_collection,
+                                                         update_flags)
   {}
 
 
@@ -246,17 +251,23 @@ namespace hp
       this->q_collection.get_quadrature (active_fe_index),
       this->update_flags);
   }
+}
 
 
 // explicit instantiations
-  namespace internal
+namespace internal
+{
+  namespace hp
   {
     template class FEValuesBase<deal_II_dimension,deal_II_dimension>;
 #if deal_II_dimension >= 2
     template class FEValuesBase<deal_II_dimension,deal_II_dimension-1>;
 #endif
   }
+}
 
+namespace hp
+{
   template class FEValues<deal_II_dimension>;
 #if deal_II_dimension >= 2
   template class FEFaceValues<deal_II_dimension>;
@@ -267,6 +278,6 @@ namespace hp
 // Putting the following explicit instantiations into the brackets 
 // of the appropriate namespace somehow causes problems with the 
 // Apple gcc3.3. Therefore these are separated.
-template class hp::internal::FEValuesMap<deal_II_dimension,FEValues<deal_II_dimension> >;
-template class hp::internal::FEValuesMap<deal_II_dimension,FEFaceValues<deal_II_dimension> >;
-template class hp::internal::FEValuesMap<deal_II_dimension,FESubfaceValues<deal_II_dimension> >;
+template class internal::hp::FEValuesMap<deal_II_dimension,FEValues<deal_II_dimension> >;
+template class internal::hp::FEValuesMap<deal_II_dimension,FEFaceValues<deal_II_dimension> >;
+template class internal::hp::FEValuesMap<deal_II_dimension,FESubfaceValues<deal_II_dimension> >;
index 384d12e3a06d2d907bdf2eb6e067189a798b89be..272c2367b598a57d4e4d70041443cc4c90001a95 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -1701,7 +1701,7 @@ void MGDoFHandler<1>::reserve_space () {
                                   // lines on each level
   for (unsigned int i=0; i<this->tria->n_levels(); ++i) 
     {
-      mg_levels.push_back (new DoFLevel<1>);
+      mg_levels.push_back (new internal::DoFHandler::DoFLevel<1>);
 
       mg_levels.back()->line_dofs = std::vector<unsigned int>(this->tria->levels[i]->lines.lines.size() *
                                                         this->selected_fe->dofs_per_line,
@@ -1774,7 +1774,7 @@ void MGDoFHandler<2>::reserve_space () {
                                   // lines and quads on each level
   for (unsigned int i=0; i<this->tria->n_levels(); ++i) 
     {
-      mg_levels.push_back (new DoFLevel<2>);
+      mg_levels.push_back (new internal::DoFHandler::DoFLevel<2>);
 
       mg_levels.back()->line_dofs = std::vector<unsigned int> (this->tria->levels[i]->lines.lines.size() *
                                                          this->selected_fe->dofs_per_line,
@@ -1863,7 +1863,7 @@ void MGDoFHandler<3>::reserve_space () {
                                   // lines and quads on each level
   for (unsigned int i=0; i<this->tria->n_levels(); ++i) 
     {
-      mg_levels.push_back (new DoFLevel<3>);
+      mg_levels.push_back (new internal::DoFHandler::DoFLevel<3>);
 
       mg_levels.back()->line_dofs = std::vector<unsigned int> (this->tria->levels[i]->lines.lines.size() *
                                                          this->selected_fe->dofs_per_line,

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.