From: Timo Heister Date: Tue, 19 Nov 2013 19:55:52 +0000 (+0000) Subject: replace include of dof_handler_policy.h in dof_handler.h by forward declaration X-Git-Tag: v8.1.0~242 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4794af260d2ef29ad8ef4ec3ea49b1f19768cf49;p=dealii.git replace include of dof_handler_policy.h in dof_handler.h by forward declaration git-svn-id: https://svn.dealii.org/trunk@31713 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/dofs/dof_handler.h b/deal.II/include/deal.II/dofs/dof_handler.h index aa3ac71149..c56d20ed5e 100644 --- a/deal.II/include/deal.II/dofs/dof_handler.h +++ b/deal.II/include/deal.II/dofs/dof_handler.h @@ -28,7 +28,6 @@ #include #include #include -#include #include @@ -46,6 +45,12 @@ namespace internal template class DoFFaces; struct Implementation; + + namespace Policy + { + template 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 - std::string policy_to_string(const dealii::internal::DoFHandler::Policy::PolicyBase & policy) - { - std::string policy_name; - if (dynamic_cast*>(&policy)) - policy_name = "Policy::Sequential<"; - else - if (dynamic_cast*>(&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 & policy); } diff --git a/deal.II/source/dofs/dof_handler.cc b/deal.II/source/dofs/dof_handler.cc index 6aaaef2dd8..119a9ee2c5 100644 --- a/deal.II/source/dofs/dof_handler.cc +++ b/deal.II/source/dofs/dof_handler.cc @@ -65,6 +65,23 @@ namespace internal namespace internal { + template + std::string policy_to_string(const dealii::internal::DoFHandler::Policy::PolicyBase & policy) + { + std::string policy_name; + if (dynamic_cast*>(&policy)) + policy_name = "Policy::Sequential<"; + else + if (dynamic_cast*>(&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 diff --git a/deal.II/source/dofs/dof_handler.inst.in b/deal.II/source/dofs/dof_handler.inst.in index 594bbd4c4a..dbc912bead 100644 --- a/deal.II/source/dofs/dof_handler.inst.in +++ b/deal.II/source/dofs/dof_handler.inst.in @@ -21,8 +21,13 @@ for (deal_II_dimension : DIMENSIONS) namespace internal \{ template const types::global_dof_index * dummy (); + template std::string policy_to_string(const dealii::internal::DoFHandler::Policy:: + PolicyBase &); + #if deal_II_dimension < 3 template const types::global_dof_index * dummy (); + template std::string policy_to_string(const dealii::internal::DoFHandler::Policy:: + PolicyBase &); #endif \}