From 2143d6f4a0903f95777a3f778b0f8d492a22925b Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Thu, 22 Dec 2005 10:06:38 +0000 Subject: [PATCH] template signature simplified git-svn-id: https://svn.dealii.org/trunk@11918 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/include/dofs/dof_renumbering.h | 12 +++---- .../deal.II/source/dofs/dof_renumbering.cc | 34 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/deal.II/deal.II/include/dofs/dof_renumbering.h b/deal.II/deal.II/include/dofs/dof_renumbering.h index a60e7cd4c7..cbefc4e832 100644 --- a/deal.II/deal.II/include/dofs/dof_renumbering.h +++ b/deal.II/deal.II/include/dofs/dof_renumbering.h @@ -218,11 +218,11 @@ class DoFRenumbering * of this class for details on * the different methods. */ - template class DH> + template static void - Cuthill_McKee (DH &dof_handler, - const bool reversed_numbering = false, - const bool use_constraints = false, + Cuthill_McKee (DH& dof_handler, + const bool reversed_numbering = false, + const bool use_constraints = false, const std::vector &starting_indices = std::vector()); /** @@ -234,10 +234,10 @@ class DoFRenumbering * returns the renumbering * vector. */ - template class DH> + template static void compute_Cuthill_McKee (std::vector& new_dof_indices, - const DH&, + const DH&, const bool reversed_numbering = false, const bool use_constraints = false, const std::vector &starting_indices = std::vector()); diff --git a/deal.II/deal.II/source/dofs/dof_renumbering.cc b/deal.II/deal.II/source/dofs/dof_renumbering.cc index a35ceabd62..4c0a33cbf4 100644 --- a/deal.II/deal.II/source/dofs/dof_renumbering.cc +++ b/deal.II/deal.II/source/dofs/dof_renumbering.cc @@ -139,16 +139,16 @@ struct CompareDownstream -template class DH> +template void DoFRenumbering:: -Cuthill_McKee (DH &dof_handler, +Cuthill_McKee (DH& dof_handler, const bool reversed_numbering, const bool use_constraints, const std::vector &starting_indices) { std::vector renumbering(dof_handler.n_dofs(), - DoFHandler::invalid_dof_index); + DH::invalid_dof_index); compute_Cuthill_McKee(renumbering, dof_handler, reversed_numbering, use_constraints, starting_indices); @@ -160,11 +160,11 @@ Cuthill_McKee (DH &dof_handler, -template class DH> +template void DoFRenumbering:: compute_Cuthill_McKee (std::vector& new_indices, - const DH& dof_handler, + const DH& dof_handler, const bool reversed_numbering, const bool use_constraints, const std::vector& starting_indices) @@ -189,7 +189,7 @@ compute_Cuthill_McKee (std::vector& new_indices, constraints.close (); SparsityPattern sparsity; - if (dim <= 2) + if (DH::dimension <= 2) { sparsity.reinit (dof_handler.n_dofs(), dof_handler.n_dofs(), @@ -223,13 +223,13 @@ compute_Cuthill_McKee (std::vector& new_indices, // delete disallowed elements for (unsigned int i=0; i::invalid_dof_index) || + if ((last_round_dofs[i]==DH::invalid_dof_index) || (last_round_dofs[i]>=n_dofs)) - last_round_dofs[i] = DoFHandler::invalid_dof_index; + last_round_dofs[i] = DH::invalid_dof_index; std::remove_if (last_round_dofs.begin(), last_round_dofs.end(), std::bind2nd(std::equal_to(), - DoFHandler::invalid_dof_index)); + DH::invalid_dof_index)); // now if no valid points remain: // find dof with lowest coordination @@ -237,7 +237,7 @@ compute_Cuthill_McKee (std::vector& new_indices, if (last_round_dofs.size() == 0) { - unsigned int starting_point = DoFHandler::invalid_dof_index; + unsigned int starting_point = DH::invalid_dof_index; unsigned int min_coordination = n_dofs; for (unsigned int row=0; row& new_indices, // if that should be the case, we can // chose an arbitrary dof as starting // point, e.g. the one with number zero - if (starting_point == DoFHandler::invalid_dof_index) + if (starting_point == DH::invalid_dof_index) starting_point = 0; // initialize the first dof @@ -317,7 +317,7 @@ compute_Cuthill_McKee (std::vector& new_indices, // eliminate dofs which are // already numbered for (int s=next_round_dofs.size()-1; s>=0; --s) - if (new_indices[next_round_dofs[s]] != DoFHandler::invalid_dof_index) + if (new_indices[next_round_dofs[s]] != DH::invalid_dof_index) next_round_dofs.erase (next_round_dofs.begin() + s); // check whether there are any new @@ -381,7 +381,7 @@ compute_Cuthill_McKee (std::vector& new_indices, // In any case, if not all DoFs // have been reached, renumbering // will not be possible - if (std::find (new_indices.begin(), new_indices.end(), DoFHandler::invalid_dof_index) + if (std::find (new_indices.begin(), new_indices.end(), DH::invalid_dof_index) != new_indices.end()) Assert (false, ExcRenumberingIncomplete()); @@ -1244,7 +1244,7 @@ compute_subdomain_wise (std::vector &new_dof_indices, // explicit instantiations template -void DoFRenumbering::Cuthill_McKee +void DoFRenumbering::Cuthill_McKee > (DoFHandler&, const bool, const bool, @@ -1252,7 +1252,7 @@ void DoFRenumbering::Cuthill_McKee template void -DoFRenumbering::compute_Cuthill_McKee +DoFRenumbering::compute_Cuthill_McKee > (std::vector&, const DoFHandler&, const bool, @@ -1261,7 +1261,7 @@ DoFRenumbering::compute_Cuthill_McKee template -void DoFRenumbering::Cuthill_McKee +void DoFRenumbering::Cuthill_McKee > (hpDoFHandler&, const bool, const bool, @@ -1269,7 +1269,7 @@ void DoFRenumbering::Cuthill_McKee template void -DoFRenumbering::compute_Cuthill_McKee +DoFRenumbering::compute_Cuthill_McKee > (std::vector&, const hpDoFHandler&, const bool, -- 2.39.5