]> https://gitweb.dealii.org/ - dealii.git/commitdiff
replace include of dof_handler_policy.h in dof_handler.h by forward declaration
authorTimo Heister <timo.heister@gmail.com>
Tue, 19 Nov 2013 19:55:52 +0000 (19:55 +0000)
committerTimo Heister <timo.heister@gmail.com>
Tue, 19 Nov 2013 19:55:52 +0000 (19:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@31713 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/dofs/dof_handler.h
deal.II/source/dofs/dof_handler.cc
deal.II/source/dofs/dof_handler.inst.in

index aa3ac71149a3e8cca133cda989197b1b946e56a6..c56d20ed5e67ece060b9c0207f3275e9aae68881 100644 (file)
@@ -28,7 +28,6 @@
 #include <deal.II/dofs/dof_iterator_selector.h>
 #include <deal.II/dofs/number_cache.h>
 #include <deal.II/dofs/function_map.h>
-#include <deal.II/dofs/dof_handler_policy.h>
 
 #include <boost/serialization/split_member.hpp>
 
@@ -46,6 +45,12 @@ namespace internal
     template <int dim> class DoFFaces;
 
     struct Implementation;
+
+    namespace Policy
+    {
+      template <int dim, int spacedim> class PolicyBase;
+      struct Implementation;
+    }
   }
 
   namespace DoFAccessor
@@ -1254,22 +1259,11 @@ namespace internal
    * returns a string representing the dynamic type of the given argument. This is
    * basically the same what typeid(...).name() does, but it turns out this is broken
    * on Intel 13+.
+   *
+   * Defined in dof_handler.cc.
    */
     template<int dim, int spacedim>
-    std::string policy_to_string(const dealii::internal::DoFHandler::Policy::PolicyBase<dim,spacedim> & policy)
-    {
-      std::string policy_name;
-      if (dynamic_cast<const typename dealii::internal::DoFHandler::Policy::Sequential<dim,spacedim>*>(&policy))
-          policy_name = "Policy::Sequential<";
-      else
-        if (dynamic_cast<const typename dealii::internal::DoFHandler::Policy::ParallelDistributed<dim,spacedim>*>(&policy))
-            policy_name = "Policy::ParallelDistributed<";
-        else
-          AssertThrow(false, ExcNotImplemented());
-      policy_name += Utilities::int_to_string(dim)+
-              ","+Utilities::int_to_string(spacedim)+">";
-      return policy_name;
-    }
+    std::string policy_to_string(const dealii::internal::DoFHandler::Policy::PolicyBase<dim,spacedim> & policy);
 
 }
 
index 6aaaef2dd86d7fa7940b919b4bd119b952f3386a..119a9ee2c5e28461e983e074d5f8dafe196167a8 100644 (file)
@@ -65,6 +65,23 @@ namespace internal
 
 namespace internal
 {
+  template<int dim, int spacedim>
+  std::string policy_to_string(const dealii::internal::DoFHandler::Policy::PolicyBase<dim,spacedim> & policy)
+  {
+    std::string policy_name;
+    if (dynamic_cast<const typename dealii::internal::DoFHandler::Policy::Sequential<dim,spacedim>*>(&policy))
+        policy_name = "Policy::Sequential<";
+    else
+      if (dynamic_cast<const typename dealii::internal::DoFHandler::Policy::ParallelDistributed<dim,spacedim>*>(&policy))
+          policy_name = "Policy::ParallelDistributed<";
+      else
+        AssertThrow(false, ExcNotImplemented());
+    policy_name += Utilities::int_to_string(dim)+
+            ","+Utilities::int_to_string(spacedim)+">";
+    return policy_name;
+  }
+
+
   namespace DoFHandler
   {
     // access class
index 594bbd4c4a951550d8dab4a3eddd831bf8e2d084..dbc912bead396910815fbb8a537edcf20bcabc72 100644 (file)
@@ -21,8 +21,13 @@ for (deal_II_dimension : DIMENSIONS)
     namespace internal
     \{
       template const types::global_dof_index * dummy<deal_II_dimension,deal_II_dimension> ();
+      template std::string policy_to_string(const dealii::internal::DoFHandler::Policy::
+      PolicyBase<deal_II_dimension,deal_II_dimension> &);
+      
 #if deal_II_dimension < 3
       template const types::global_dof_index * dummy<deal_II_dimension,deal_II_dimension+1> ();
+      template std::string policy_to_string(const dealii::internal::DoFHandler::Policy::
+      PolicyBase<deal_II_dimension,deal_II_dimension+1> &);
 #endif
     \}
 

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.