From: Daniel Arndt Date: Fri, 17 Nov 2017 11:29:57 +0000 (+0100) Subject: Remove unused typedefs X-Git-Tag: v9.0.0-rc1~756^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30e1f31fc4cf84fb92f48958fc4ea562d95700ae;p=dealii.git Remove unused typedefs --- diff --git a/include/deal.II/fe/fe_tools.templates.h b/include/deal.II/fe/fe_tools.templates.h index 8dd5e9cf4c..44c169adb5 100644 --- a/include/deal.II/fe/fe_tools.templates.h +++ b/include/deal.II/fe/fe_tools.templates.h @@ -1452,9 +1452,9 @@ namespace FETools const std::vector > & fe2_support_points = fe2.get_unit_support_points (); - typedef FiniteElement FEL; Assert(fe2_support_points.size()==fe2.dofs_per_cell, - typename FEL::ExcFEHasNoSupportPoints()); + (typename FiniteElement:: + ExcFEHasNoSupportPoints())); for (unsigned int i=0; i*> (&cell->get_fe ()) == nullptr) { - typedef FiniteElement FEL; AssertThrow (dynamic_cast*> (&cell->get_fe ()) != nullptr, - - typename FEL::ExcInterpolationNotImplemented ()); + (typename FiniteElement::ExcInterpolationNotImplemented ())); } for (unsigned int dof = 0; dof < dofs_per_face; ++dof) @@ -4606,10 +4604,8 @@ namespace VectorTools // check this. if (dynamic_cast*> (&cell->get_fe ()) == nullptr) { - typedef FiniteElement FEL; - AssertThrow (dynamic_cast*> (&cell->get_fe ()) != nullptr, - typename FEL::ExcInterpolationNotImplemented ()); + typename FiniteElement::ExcInterpolationNotImplemented ()); } for (unsigned int dof = 0; dof < dofs_per_face; ++dof) @@ -4721,10 +4717,8 @@ namespace VectorTools // element. If the FE is a FESystem we cannot check this. if (dynamic_cast*> (&cell->get_fe ()) == nullptr) { - typedef FiniteElement FEL; - AssertThrow (dynamic_cast*> (&cell->get_fe ()) != nullptr, - typename FEL::ExcInterpolationNotImplemented ()); + typename FiniteElement::ExcInterpolationNotImplemented ()); } const unsigned int dofs_per_face = cell->get_fe ().dofs_per_face; @@ -4798,10 +4792,8 @@ namespace VectorTools // element. If the FE is a FESystem we cannot check this. if (dynamic_cast*> (&cell->get_fe ()) == nullptr) { - typedef FiniteElement FEL; - AssertThrow (dynamic_cast*> (&cell->get_fe ()) != nullptr, - typename FEL::ExcInterpolationNotImplemented ()); + typename FiniteElement::ExcInterpolationNotImplemented ()); } const unsigned int superdegree = cell->get_fe ().degree; @@ -5549,9 +5541,8 @@ namespace VectorTools // If the FE is a FESystem we cannot check this. if (dynamic_cast*> (&cell->get_fe ()) == nullptr) { - typedef FiniteElement FEL; AssertThrow (dynamic_cast*> (&cell->get_fe ()) != nullptr, - typename FEL::ExcInterpolationNotImplemented ()); + typename FiniteElement::ExcInterpolationNotImplemented ()); } @@ -5646,10 +5637,8 @@ namespace VectorTools // If the FE is a FESystem we cannot check this. if (dynamic_cast*> (&cell->get_fe ()) == nullptr) { - typedef FiniteElement FEL; - AssertThrow (dynamic_cast*> (&cell->get_fe ()) != nullptr, - typename FEL::ExcInterpolationNotImplemented ()); + typename FiniteElement::ExcInterpolationNotImplemented ()); } const unsigned int superdegree = cell->get_fe ().degree; @@ -6011,10 +6000,8 @@ namespace VectorTools // check this. if (dynamic_cast*> (&cell->get_fe ()) == nullptr) { - typedef FiniteElement FEL; - AssertThrow (dynamic_cast*> (&cell->get_fe ()) != nullptr, - typename FEL::ExcInterpolationNotImplemented ()); + typename FiniteElement::ExcInterpolationNotImplemented ()); } fe_values.reinit (cell, face + cell->active_fe_index () @@ -6075,10 +6062,8 @@ namespace VectorTools // check this. if (dynamic_cast*> (&cell->get_fe ()) == nullptr) { - typedef FiniteElement FEL; - AssertThrow (dynamic_cast*> (&cell->get_fe ()) != nullptr, - typename FEL::ExcInterpolationNotImplemented ()); + typename FiniteElement::ExcInterpolationNotImplemented ()); } fe_values.reinit (cell, face + cell->active_fe_index () @@ -6166,10 +6151,8 @@ namespace VectorTools // check this. if (dynamic_cast*> (&cell->get_fe ()) == nullptr) { - typedef FiniteElement FEL; - AssertThrow (dynamic_cast*> (&cell->get_fe ()) != nullptr, - typename FEL::ExcInterpolationNotImplemented ()); + typename FiniteElement::ExcInterpolationNotImplemented ()); } fe_values.reinit (cell, face + cell->active_fe_index () @@ -6213,10 +6196,8 @@ namespace VectorTools // check this. if (dynamic_cast*> (&cell->get_fe ()) == nullptr) { - typedef FiniteElement FEL; - AssertThrow (dynamic_cast*> (&cell->get_fe ()) != nullptr, - typename FEL::ExcInterpolationNotImplemented ()); + typename FiniteElement::ExcInterpolationNotImplemented ()); } fe_values.reinit (cell, face + cell->active_fe_index () diff --git a/source/fe/fe.cc b/source/fe/fe.cc index 4a5beb7e76..91f5520f34 100644 --- a/source/fe/fe.cc +++ b/source/fe/fe.cc @@ -849,10 +849,9 @@ get_interpolation_matrix (const FiniteElement &, // by default, no interpolation // implemented. so throw exception, // as documentation says - typedef FiniteElement FEE; AssertThrow (false, - typename FEE:: - ExcInterpolationNotImplemented()); + (typename FiniteElement:: + ExcInterpolationNotImplemented())); } @@ -866,10 +865,9 @@ get_face_interpolation_matrix (const FiniteElement &, // by default, no interpolation // implemented. so throw exception, // as documentation says - typedef FiniteElement FEE; AssertThrow (false, - typename FEE:: - ExcInterpolationNotImplemented()); + (typename FiniteElement:: + ExcInterpolationNotImplemented())); } @@ -884,9 +882,9 @@ get_subface_interpolation_matrix (const FiniteElement &, // by default, no interpolation // implemented. so throw exception, // as documentation says - typedef FiniteElement FEE; AssertThrow (false, - typename FEE::ExcInterpolationNotImplemented()); + (typename FiniteElement:: + ExcInterpolationNotImplemented())); } diff --git a/source/fe/fe_bernstein.cc b/source/fe/fe_bernstein.cc index 1752c3c05f..b62c068fef 100644 --- a/source/fe/fe_bernstein.cc +++ b/source/fe/fe_bernstein.cc @@ -53,9 +53,9 @@ get_interpolation_matrix (const FiniteElement &, FullMatrix &) const { // no interpolation possible. throw exception, as documentation says - typedef FiniteElement FEE; AssertThrow (false, - typename FEE::ExcInterpolationNotImplemented()); + (typename FiniteElement:: + ExcInterpolationNotImplemented())); } @@ -65,9 +65,8 @@ const FullMatrix & FE_Bernstein::get_restriction_matrix (const unsigned int, const RefinementCase &) const { - typedef FiniteElement FEE; AssertThrow (false, - typename FEE::ExcProjectionVoid()); + (typename FiniteElement::ExcProjectionVoid())); // return dummy, nothing will happen because the base class FE_Q_Base // implements lazy evaluation of those matrices return this->restriction[0][0]; @@ -80,9 +79,8 @@ const FullMatrix & FE_Bernstein::get_prolongation_matrix (const unsigned int, const RefinementCase &) const { - typedef FiniteElement FEE; AssertThrow (false, - typename FEE::ExcEmbeddingVoid()); + (typename FiniteElement::ExcEmbeddingVoid())); // return dummy, nothing will happen because the base class FE_Q_Base // implements lazy evaluation of those matrices return this->prolongation[0][0]; diff --git a/source/fe/fe_dgp_nonparametric.cc b/source/fe/fe_dgp_nonparametric.cc index 38ff23820a..c857e0a187 100644 --- a/source/fe/fe_dgp_nonparametric.cc +++ b/source/fe/fe_dgp_nonparametric.cc @@ -431,12 +431,11 @@ get_face_interpolation_matrix (const FiniteElement &x_source_fe, // is necessarily empty -- i.e. there isn't // much we need to do here. (void)interpolation_matrix; - typedef FiniteElement FEE; AssertThrow ((x_source_fe.get_name().find ("FE_DGPNonparametric<") == 0) || (dynamic_cast*>(&x_source_fe) != nullptr), - typename FEE:: - ExcInterpolationNotImplemented()); + (typename FiniteElement:: + ExcInterpolationNotImplemented())); Assert (interpolation_matrix.m() == 0, ExcDimensionMismatch (interpolation_matrix.m(), @@ -462,12 +461,10 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_fe // is necessarily empty -- i.e. there isn't // much we need to do here. (void)interpolation_matrix; - typedef FiniteElement FEE; AssertThrow ((x_source_fe.get_name().find ("FE_DGPNonparametric<") == 0) || (dynamic_cast*>(&x_source_fe) != nullptr), - typename FEE:: - ExcInterpolationNotImplemented()); + (typename FiniteElement::ExcInterpolationNotImplemented())); Assert (interpolation_matrix.m() == 0, ExcDimensionMismatch (interpolation_matrix.m(), diff --git a/source/fe/fe_enriched.cc b/source/fe/fe_enriched.cc index 99f750ce60..e177284eec 100644 --- a/source/fe/fe_enriched.cc +++ b/source/fe/fe_enriched.cc @@ -790,8 +790,8 @@ get_face_interpolation_matrix (const FiniteElement &source, } else { - typedef FiniteElement FEL; - AssertThrow(false,typename FEL::ExcInterpolationNotImplemented()); + AssertThrow(false, (typename FiniteElement:: + ExcInterpolationNotImplemented())); } } @@ -812,8 +812,8 @@ get_subface_interpolation_matrix (const FiniteElement &source, } else { - typedef FiniteElement FEL; - AssertThrow(false,typename FEL::ExcInterpolationNotImplemented()); + AssertThrow(false,(typename FiniteElement:: + ExcInterpolationNotImplemented())); } } diff --git a/source/fe/fe_nedelec.cc b/source/fe/fe_nedelec.cc index 55f14c2daa..cb92d69969 100644 --- a/source/fe/fe_nedelec.cc +++ b/source/fe/fe_nedelec.cc @@ -2471,12 +2471,10 @@ const // this is only implemented, if the // source FE is also a // Nedelec element - typedef FE_Nedelec FEN; - typedef FiniteElement FEL; - AssertThrow ((source.get_name ().find ("FE_Nedelec<") == 0) || - (dynamic_cast (&source) != nullptr), - typename FEL::ExcInterpolationNotImplemented()); + (dynamic_cast *> (&source) != nullptr), + (typename FiniteElement:: + ExcInterpolationNotImplemented())); Assert (interpolation_matrix.m () == source.dofs_per_face, ExcDimensionMismatch (interpolation_matrix.m (), source.dofs_per_face)); @@ -2501,7 +2499,8 @@ const // hp procedures, which use this // method. Assert (this->dofs_per_face <= source_fe.dofs_per_face, - typename FEL::ExcInterpolationNotImplemented ()); + (typename FiniteElement:: + ExcInterpolationNotImplemented ())); interpolation_matrix = 0; // On lines we can just identify @@ -2579,12 +2578,10 @@ FE_Nedelec::get_subface_interpolation_matrix( // this is only implemented, if the // source FE is also a // Nedelec element - typedef FE_Nedelec FEN; - typedef FiniteElement FEL; - AssertThrow ((source.get_name ().find ("FE_Nedelec<") == 0) || - (dynamic_cast (&source) != nullptr), - typename FEL::ExcInterpolationNotImplemented ()); + (dynamic_cast *> (&source) != nullptr), + typename FiniteElement:: + ExcInterpolationNotImplemented ()); Assert (interpolation_matrix.m () == source.dofs_per_face, ExcDimensionMismatch (interpolation_matrix.m (), source.dofs_per_face)); @@ -2609,7 +2606,8 @@ FE_Nedelec::get_subface_interpolation_matrix( // hp procedures, which use this // method. Assert (this->dofs_per_face <= source_fe.dofs_per_face, - typename FEL::ExcInterpolationNotImplemented ()); + (typename FiniteElement:: + ExcInterpolationNotImplemented ())); interpolation_matrix = 0.0; // Perform projection-based interpolation // as usual. diff --git a/source/fe/fe_poly_tensor.cc b/source/fe/fe_poly_tensor.cc index eee6893cef..fec8c98908 100644 --- a/source/fe/fe_poly_tensor.cc +++ b/source/fe/fe_poly_tensor.cc @@ -171,8 +171,7 @@ FE_PolyTensor::shape_value (const unsigned int, const Point &) const { - typedef FiniteElement FEE; - Assert(false, typename FEE::ExcFENotPrimitive()); + Assert(false, (typename FiniteElement::ExcFENotPrimitive())); return 0.; } @@ -216,8 +215,7 @@ Tensor<1,dim> FE_PolyTensor::shape_grad (const unsigned int, const Point &) const { - typedef FiniteElement FEE; - Assert(false, typename FEE::ExcFENotPrimitive()); + Assert(false, (typename FiniteElement::ExcFENotPrimitive())); return Tensor<1,dim>(); } @@ -263,8 +261,7 @@ FE_PolyTensor::shape_grad_grad (const unsigned int, const Point &) const { - typedef FiniteElement FEE; - Assert(false, typename FEE::ExcFENotPrimitive()); + Assert(false, (typename FiniteElement::ExcFENotPrimitive())); return Tensor<2,dim>(); } diff --git a/source/fe/fe_q_bubbles.cc b/source/fe/fe_q_bubbles.cc index 1cbac6c500..e57b3731a5 100644 --- a/source/fe/fe_q_bubbles.cc +++ b/source/fe/fe_q_bubbles.cc @@ -371,14 +371,13 @@ get_interpolation_matrix (const FiniteElement &x_source_fe, // However, for SolutionTransfer to work we need to provide an implementation // for the case that the x_source_fe is identical to this FE typedef FE_Q_Bubbles FEQBUBBLES; - typedef FiniteElement FEL; AssertThrow ((x_source_fe.get_name().find ("FE_Q_Bubbles<") == 0) || (dynamic_cast(&x_source_fe) != nullptr) , - typename FEL:: - ExcInterpolationNotImplemented()); + (typename FiniteElement:: + ExcInterpolationNotImplemented())); Assert (interpolation_matrix.m() == this->dofs_per_cell, ExcDimensionMismatch (interpolation_matrix.m(), this->dofs_per_cell)); @@ -392,8 +391,9 @@ get_interpolation_matrix (const FiniteElement &x_source_fe, interpolation_matrix.set(i,i,1.); //else we need to do more... else - Assert(false, typename FEL::ExcInterpolationNotImplemented()) - } + Assert(false, (typename FiniteElement:: + ExcInterpolationNotImplemented())); +} diff --git a/source/fe/fe_q_dg0.cc b/source/fe/fe_q_dg0.cc index 8139ad43f8..e2de1d7dec 100644 --- a/source/fe/fe_q_dg0.cc +++ b/source/fe/fe_q_dg0.cc @@ -210,13 +210,12 @@ get_interpolation_matrix (const FiniteElement &x_source_fe, { // this is only implemented, if the source FE is also a Q_DG0 element typedef FE_Q_DG0 FEQDG0; - typedef FiniteElement FEL; AssertThrow ((x_source_fe.get_name().find ("FE_Q_DG0<") == 0) || (dynamic_cast(&x_source_fe) != nullptr), - typename FEL:: - ExcInterpolationNotImplemented()); + (typename FiniteElement:: + ExcInterpolationNotImplemented())); Assert (interpolation_matrix.m() == this->dofs_per_cell, ExcDimensionMismatch (interpolation_matrix.m(), diff --git a/source/fe/fe_q_hierarchical.cc b/source/fe/fe_q_hierarchical.cc index 184e0a5c71..5a042bcfdc 100644 --- a/source/fe/fe_q_hierarchical.cc +++ b/source/fe/fe_q_hierarchical.cc @@ -828,12 +828,10 @@ get_face_interpolation_matrix (const FiniteElement &x_source_fe, // source FE is also a // Q_Hierarchical element typedef FE_Q_Hierarchical FEQHierarchical; - typedef FiniteElement FEL; AssertThrow ((x_source_fe.get_name().find ("FE_Q_Hierarchical<") == 0) || (dynamic_cast(&x_source_fe) != nullptr), - typename FEL:: - ExcInterpolationNotImplemented()); + (typename FiniteElement::ExcInterpolationNotImplemented())); Assert (interpolation_matrix.n() == this->dofs_per_face, ExcDimensionMismatch (interpolation_matrix.n(), @@ -860,8 +858,8 @@ get_face_interpolation_matrix (const FiniteElement &x_source_fe, // hp procedures, which use this // method. Assert (this->dofs_per_face <= source_fe.dofs_per_face, - typename FEL:: - ExcInterpolationNotImplemented ()); + (typename FiniteElement:: + ExcInterpolationNotImplemented ())); interpolation_matrix = 0; switch (dim) @@ -916,12 +914,10 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_fe, // source FE is also a // Q_Hierarchical element typedef FE_Q_Hierarchical FEQHierarchical; - typedef FiniteElement FEL; AssertThrow ((x_source_fe.get_name().find ("FE_Q_Hierarchical<") == 0) || (dynamic_cast(&x_source_fe) != nullptr), - typename FEL:: - ExcInterpolationNotImplemented()); + (typename FiniteElement::ExcInterpolationNotImplemented())); Assert (interpolation_matrix.n() == this->dofs_per_face, ExcDimensionMismatch (interpolation_matrix.n(), @@ -947,8 +943,8 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_fe, // hp procedures, which use this // method. Assert (this->dofs_per_face <= source_fe.dofs_per_face, - typename FEL:: - ExcInterpolationNotImplemented ()); + (typename FiniteElement:: + ExcInterpolationNotImplemented ())); switch (dim) { diff --git a/source/fe/fe_system.cc b/source/fe/fe_system.cc index 22e03f11f7..575822c237 100644 --- a/source/fe/fe_system.cc +++ b/source/fe/fe_system.cc @@ -615,12 +615,11 @@ FESystem::get_interpolation_matrix ( // // condition 1: the other element must also be a system element - typedef FiniteElement FEL; AssertThrow ((x_source_fe.get_name().find ("FESystem<") == 0) || (dynamic_cast*>(&x_source_fe) != nullptr), - typename FEL:: - ExcInterpolationNotImplemented()); + (typename FiniteElement:: + ExcInterpolationNotImplemented())); // ok, source is a system element, so we may be able to do the work const FESystem &source_fe @@ -628,15 +627,15 @@ FESystem::get_interpolation_matrix ( // condition 2: same number of basis elements AssertThrow (this->n_base_elements() == source_fe.n_base_elements(), - typename FEL:: - ExcInterpolationNotImplemented()); + (typename FiniteElement:: + ExcInterpolationNotImplemented())); // condition 3: same number of basis elements for (unsigned int i=0; i< this->n_base_elements(); ++i) AssertThrow (this->element_multiplicity(i) == source_fe.element_multiplicity(i), - typename FEL:: - ExcInterpolationNotImplemented()); + (typename FiniteElement:: + ExcInterpolationNotImplemented())); // ok, so let's try whether it works: @@ -1745,12 +1744,11 @@ FESystem:: get_face_interpolation_matrix (const FiniteElement &x_source_fe, FullMatrix &interpolation_matrix) const { - typedef FiniteElement FEL; AssertThrow ((x_source_fe.get_name().find ("FE_System<") == 0) || (dynamic_cast*>(&x_source_fe) != nullptr), - typename FEL:: - ExcInterpolationNotImplemented()); + (typename FiniteElement:: + ExcInterpolationNotImplemented())); Assert (interpolation_matrix.n() == this->dofs_per_face, ExcDimensionMismatch (interpolation_matrix.n(), @@ -1856,12 +1854,11 @@ get_subface_interpolation_matrix (const FiniteElement &x_source_fe const unsigned int subface, FullMatrix &interpolation_matrix) const { - typedef FiniteElement FEL; AssertThrow ((x_source_fe.get_name().find ("FE_System<") == 0) || (dynamic_cast*>(&x_source_fe) != nullptr), - typename FEL:: - ExcInterpolationNotImplemented()); + (typename FiniteElement:: + ExcInterpolationNotImplemented())); Assert (interpolation_matrix.n() == this->dofs_per_face, ExcDimensionMismatch (interpolation_matrix.n(), @@ -2172,10 +2169,9 @@ FESystem::unit_support_point (const unsigned int index) const { Assert (index < this->dofs_per_cell, ExcIndexRange (index, 0, this->dofs_per_cell)); - typedef FiniteElement FEL; Assert ((this->unit_support_points.size() == this->dofs_per_cell) || (this->unit_support_points.size() == 0), - typename FEL::ExcFEHasNoSupportPoints ()); + (typename FiniteElement::ExcFEHasNoSupportPoints ())); // let's see whether we have the information pre-computed if (this->unit_support_points.size() != 0) @@ -2195,10 +2191,9 @@ FESystem::unit_face_support_point (const unsigned int index) const { Assert (index < this->dofs_per_face, ExcIndexRange (index, 0, this->dofs_per_face)); - typedef FiniteElement FEL; Assert ((this->unit_face_support_points.size() == this->dofs_per_face) || (this->unit_face_support_points.size() == 0), - typename FEL::ExcFEHasNoSupportPoints ()); + (typename FiniteElement::ExcFEHasNoSupportPoints ())); // let's see whether we have the information pre-computed if (this->unit_face_support_points.size() != 0)