From 9b22537f2a9a4be87ed017fce02fbaf98f3e6fa1 Mon Sep 17 00:00:00 2001 From: bangerth Date: Sun, 30 Jul 2006 15:27:05 +0000 Subject: [PATCH] Use int2type from ::internal, rather than re-inventing it. git-svn-id: https://svn.dealii.org/trunk@13515 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/fe/fe_dgq.cc | 16 +++++----------- deal.II/deal.II/source/fe/fe_q.cc | 19 +++++++------------ 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/deal.II/deal.II/source/fe/fe_dgq.cc b/deal.II/deal.II/source/fe/fe_dgq.cc index 507fd0da0b..c7d9df570d 100644 --- a/deal.II/deal.II/source/fe/fe_dgq.cc +++ b/deal.II/deal.II/source/fe/fe_dgq.cc @@ -12,6 +12,7 @@ //--------------------------------------------------------------------------- #include +#include #include #include @@ -26,13 +27,6 @@ // are thus not very interesting to the outside world namespace { - // auxiliary type to allow for some - // kind of explicit template - // specialization of the following - // functions - template struct int2type {}; - - // given an integer N, compute its // integer square root (if it // exists, otherwise give up) @@ -65,7 +59,7 @@ namespace inline Point<1> generate_unit_point (const unsigned int i, const unsigned int N, - const int2type<1> ) + const ::internal::int2type<1> ) { Assert (i generate_unit_point (const unsigned int i, const unsigned int N, - const int2type<2> ) + const ::internal::int2type<2> ) { Assert (i generate_unit_point (const unsigned int i, const unsigned int N, - const int2type<3> ) + const ::internal::int2type<3> ) { Assert (i &x_source_fe, // cell and evaluate the // shape functions there const Point p = generate_unit_point (j, this->dofs_per_cell, - int2type()); + ::internal::int2type()); for (unsigned int i=0; idofs_per_cell; ++i) cell_interpolation(j,i) = this->poly_space.compute_value (i, p); diff --git a/deal.II/deal.II/source/fe/fe_q.cc b/deal.II/deal.II/source/fe/fe_q.cc index 08c2202a7f..cd33fd99a2 100644 --- a/deal.II/deal.II/source/fe/fe_q.cc +++ b/deal.II/deal.II/source/fe/fe_q.cc @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -48,12 +49,6 @@ namespace FE_Q_Helper { namespace { - // auxiliary type to allow for some - // kind of explicit template - // specialization of the following - // functions - template struct int2type {}; - // given a permutation array, // compute and return the inverse // permutation @@ -115,7 +110,7 @@ namespace FE_Q_Helper Point<1> generate_unit_point (const unsigned int i, const unsigned int N, - const int2type<1> ) + const ::internal::int2type<1> ) { Assert (i generate_unit_point (const unsigned int i, const unsigned int N, - const int2type<2> ) + const ::internal::int2type<2> ) { Assert (i=4, ExcInternalError()); @@ -157,7 +152,7 @@ namespace FE_Q_Helper Point<3> generate_unit_point (const unsigned int i, const unsigned int N, - const int2type<3> ) + const ::internal::int2type<3> ) { Assert (i=8, ExcInternalError()); @@ -284,7 +279,7 @@ get_interpolation_matrix (const FiniteElement &x_source_fe, // shape functions there const Point p = FE_Q_Helper::generate_unit_point (index_map[j], this->dofs_per_cell, - FE_Q_Helper::int2type()); + ::internal::int2type()); for (unsigned int i=0; idofs_per_cell; ++i) cell_interpolation(j,i) = this->poly_space.compute_value (i, p); @@ -1170,7 +1165,7 @@ FE_Q::initialize_embedding () // functions there const Point p_subcell = FE_Q_Helper::generate_unit_point (index_map[j], this->dofs_per_cell, - FE_Q_Helper::int2type()); + ::internal::int2type()); const Point p_cell = GeometryInfo::child_to_cell_coordinates (p_subcell, child); @@ -1335,7 +1330,7 @@ FE_Q::initialize_restriction () { const Point p_cell = FE_Q_Helper::generate_unit_point (i, this->dofs_per_cell, - FE_Q_Helper::int2type()); + ::internal::int2type()); unsigned int mother_dof = 0; for (; mother_dofdofs_per_cell; ++mother_dof) { -- 2.39.5