From: Wolfgang Bangerth Date: Fri, 7 Aug 2015 14:13:54 +0000 (-0500) Subject: Let the FE classes use FE::InternalDataBase instead of Mapping::InternalDataBase. X-Git-Tag: v8.4.0-rc2~651^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1300%2Fhead;p=dealii.git Let the FE classes use FE::InternalDataBase instead of Mapping::InternalDataBase. For historical reasons, FiniteElement::InternalDataBase is derived from Mapping::InternalDataBase, but all of the finite element classes need to use the former. However, we currently pass around pointers to the latter. There is no good reason for doing so other than 'we can'. Fix this: store and pass around pointers to FiniteElement::InternalDataBase. --- diff --git a/include/deal.II/fe/fe.h b/include/deal.II/fe/fe.h index aa810683d3..261185d988 100644 --- a/include/deal.II/fe/fe.h +++ b/include/deal.II/fe/fe.h @@ -2023,7 +2023,7 @@ protected: * then has to assume ownership (which includes destruction when it is no * more needed). */ - virtual typename Mapping::InternalDataBase * + virtual InternalDataBase * get_data (const UpdateFlags flags, const Mapping &mapping, const Quadrature &quadrature) const = 0; @@ -2034,7 +2034,7 @@ protected: * the caller of this function then has to assume ownership (which includes * destruction when it is no more needed). */ - virtual typename Mapping::InternalDataBase * + virtual InternalDataBase * get_face_data (const UpdateFlags flags, const Mapping &mapping, const Quadrature &quadrature) const; @@ -2045,7 +2045,7 @@ protected: * object of which the caller of this function then has to assume ownership * (which includes destruction when it is no more needed). */ - virtual typename Mapping::InternalDataBase * + virtual InternalDataBase * get_subface_data (const UpdateFlags flags, const Mapping &mapping, const Quadrature &quadrature) const; @@ -2056,7 +2056,7 @@ protected: const typename Triangulation::cell_iterator &cell, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const InternalDataBase &fe_internal, const dealii::internal::FEValues::MappingRelatedData &mapping_data, dealii::internal::FEValues::FiniteElementRelatedData &output_data, const CellSimilarity::Similarity cell_similarity) const = 0; @@ -2068,7 +2068,7 @@ protected: const unsigned int face_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const InternalDataBase &fe_internal, const dealii::internal::FEValues::MappingRelatedData &mapping_data, dealii::internal::FEValues::FiniteElementRelatedData &output_data) const = 0; @@ -2080,7 +2080,7 @@ protected: const unsigned int sub_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const InternalDataBase &fe_internal, const dealii::internal::FEValues::MappingRelatedData &mapping_data, dealii::internal::FEValues::FiniteElementRelatedData &output_data) const = 0; diff --git a/include/deal.II/fe/fe_dgp_nonparametric.h b/include/deal.II/fe/fe_dgp_nonparametric.h index 079fb90064..ce173c0743 100644 --- a/include/deal.II/fe/fe_dgp_nonparametric.h +++ b/include/deal.II/fe/fe_dgp_nonparametric.h @@ -524,7 +524,7 @@ protected: * cell. */ virtual - typename Mapping::InternalDataBase * + typename FiniteElement::InternalDataBase * get_data (const UpdateFlags, const Mapping &mapping, const Quadrature &quadrature) const; @@ -535,7 +535,7 @@ protected: const typename Triangulation::cell_iterator &cell, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data, const CellSimilarity::Similarity cell_similarity) const; @@ -547,7 +547,7 @@ protected: const unsigned int face_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; @@ -559,7 +559,7 @@ protected: const unsigned int sub_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; diff --git a/include/deal.II/fe/fe_face.h b/include/deal.II/fe/fe_face.h index 1daa1dc895..a4a54fcab4 100644 --- a/include/deal.II/fe/fe_face.h +++ b/include/deal.II/fe/fe_face.h @@ -228,17 +228,17 @@ public: protected: virtual - typename Mapping<1,spacedim>::InternalDataBase * + typename FiniteElement<1,spacedim>::InternalDataBase * get_data (const UpdateFlags, const Mapping<1,spacedim> &mapping, const Quadrature<1> &quadrature) const; - typename Mapping<1,spacedim>::InternalDataBase * + typename FiniteElement<1,spacedim>::InternalDataBase * get_face_data (const UpdateFlags, const Mapping<1,spacedim> &mapping, const Quadrature<0> &quadrature) const; - typename Mapping<1,spacedim>::InternalDataBase * + typename FiniteElement<1,spacedim>::InternalDataBase * get_subface_data (const UpdateFlags, const Mapping<1,spacedim> &mapping, const Quadrature<0> &quadrature) const; @@ -249,7 +249,7 @@ protected: const typename Triangulation<1,spacedim>::cell_iterator &cell, const Quadrature<1> &quadrature, const typename Mapping<1,spacedim>::InternalDataBase &mapping_internal, - const typename Mapping<1,spacedim>::InternalDataBase &fe_internal, + const typename FiniteElement<1,spacedim>::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData<1,spacedim> &mapping_data, internal::FEValues::FiniteElementRelatedData<1,spacedim> &output_data, const CellSimilarity::Similarity cell_similarity) const; @@ -261,7 +261,7 @@ protected: const unsigned int face_no, const Quadrature<0> &quadrature, const typename Mapping<1,spacedim>::InternalDataBase &mapping_internal, - const typename Mapping<1,spacedim>::InternalDataBase &fe_internal, + const typename FiniteElement<1,spacedim>::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData<1,spacedim> &mapping_data, internal::FEValues::FiniteElementRelatedData<1,spacedim> &output_data) const; @@ -273,7 +273,7 @@ protected: const unsigned int sub_no, const Quadrature<0> &quadrature, const typename Mapping<1,spacedim>::InternalDataBase &mapping_internal, - const typename Mapping<1,spacedim>::InternalDataBase &fe_internal, + const typename FiniteElement<1,spacedim>::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData<1,spacedim> &mapping_data, internal::FEValues::FiniteElementRelatedData<1,spacedim> &output_data) const; diff --git a/include/deal.II/fe/fe_nothing.h b/include/deal.II/fe/fe_nothing.h index d41fc6a4cd..91b8212547 100644 --- a/include/deal.II/fe/fe_nothing.h +++ b/include/deal.II/fe/fe_nothing.h @@ -153,7 +153,7 @@ public: const typename Triangulation::cell_iterator &cell, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data, const CellSimilarity::Similarity cell_similarity) const; @@ -165,7 +165,7 @@ public: const unsigned int face_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; @@ -177,7 +177,7 @@ public: const unsigned int sub_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; @@ -191,7 +191,7 @@ public: * no meaningful data exists for this element. */ virtual - typename Mapping::InternalDataBase * + typename FiniteElement::InternalDataBase * get_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature) const; diff --git a/include/deal.II/fe/fe_poly.h b/include/deal.II/fe/fe_poly.h index 22365a0d40..cbbb80b7ae 100644 --- a/include/deal.II/fe/fe_poly.h +++ b/include/deal.II/fe/fe_poly.h @@ -163,7 +163,7 @@ public: protected: virtual - typename Mapping::InternalDataBase * + typename FiniteElement::InternalDataBase * get_data (const UpdateFlags, const Mapping &mapping, const Quadrature &quadrature) const; @@ -174,7 +174,7 @@ protected: const typename Triangulation::cell_iterator &cell, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data, const CellSimilarity::Similarity cell_similarity) const; @@ -186,7 +186,7 @@ protected: const unsigned int face_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; @@ -198,7 +198,7 @@ protected: const unsigned int sub_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; diff --git a/include/deal.II/fe/fe_poly.templates.h b/include/deal.II/fe/fe_poly.templates.h index 932b40f086..cb751ef28d 100644 --- a/include/deal.II/fe/fe_poly.templates.h +++ b/include/deal.II/fe/fe_poly.templates.h @@ -164,7 +164,7 @@ FE_Poly::update_each (const UpdateFlags flags) const //--------------------------------------------------------------------------- template -typename Mapping::InternalDataBase * +typename FiniteElement::InternalDataBase * FE_Poly::get_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature) const @@ -252,7 +252,7 @@ fill_fe_values (const Mapping &mapping, const typename Triangulation::cell_iterator &cell, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fedata, + const typename FiniteElement::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData &, internal::FEValues::FiniteElementRelatedData &output_data, const CellSimilarity::Similarity cell_similarity) const @@ -294,7 +294,7 @@ fill_fe_face_values (const Mapping &mapping, const unsigned int face, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fedata, + const typename FiniteElement::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData &, internal::FEValues::FiniteElementRelatedData &output_data) const { @@ -346,7 +346,7 @@ fill_fe_subface_values (const Mapping &mapping, const unsigned int subface, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fedata, + const typename FiniteElement::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData &, internal::FEValues::FiniteElementRelatedData &output_data) const { diff --git a/include/deal.II/fe/fe_poly_face.h b/include/deal.II/fe/fe_poly_face.h index 0a9070da96..444616626c 100644 --- a/include/deal.II/fe/fe_poly_face.h +++ b/include/deal.II/fe/fe_poly_face.h @@ -141,17 +141,17 @@ public: protected: virtual - typename Mapping::InternalDataBase * + typename FiniteElement::InternalDataBase * get_data (const UpdateFlags, const Mapping &mapping, const Quadrature &quadrature) const; - typename Mapping::InternalDataBase * + typename FiniteElement::InternalDataBase * get_face_data (const UpdateFlags, const Mapping &mapping, const Quadrature& quadrature) const; - typename Mapping::InternalDataBase * + typename FiniteElement::InternalDataBase * get_subface_data (const UpdateFlags, const Mapping &mapping, const Quadrature& quadrature) const; @@ -162,7 +162,7 @@ protected: const typename Triangulation::cell_iterator &cell, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data, const CellSimilarity::Similarity cell_similarity) const; @@ -174,7 +174,7 @@ protected: const unsigned int face_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; @@ -186,7 +186,7 @@ protected: const unsigned int sub_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; diff --git a/include/deal.II/fe/fe_poly_face.templates.h b/include/deal.II/fe/fe_poly_face.templates.h index 8b21146eb1..ca0a4037b7 100644 --- a/include/deal.II/fe/fe_poly_face.templates.h +++ b/include/deal.II/fe/fe_poly_face.templates.h @@ -84,7 +84,7 @@ FE_PolyFace::update_each (const UpdateFlags flags) const //--------------------------------------------------------------------------- template -typename Mapping::InternalDataBase * +typename FiniteElement::InternalDataBase * FE_PolyFace::get_data ( const UpdateFlags, const Mapping &, @@ -96,7 +96,7 @@ FE_PolyFace::get_data ( template -typename Mapping::InternalDataBase * +typename FiniteElement::InternalDataBase * FE_PolyFace::get_face_data ( const UpdateFlags update_flags, const Mapping &, @@ -152,7 +152,7 @@ FE_PolyFace::get_face_data ( template -typename Mapping::InternalDataBase * +typename FiniteElement::InternalDataBase * FE_PolyFace::get_subface_data ( const UpdateFlags flags, const Mapping &mapping, @@ -176,7 +176,7 @@ fill_fe_values (const Mapping &, const typename Triangulation::cell_iterator &, const Quadrature &, const typename Mapping::InternalDataBase &, - const typename Mapping::InternalDataBase &, + const typename FiniteElement::InternalDataBase &, const internal::FEValues::MappingRelatedData &, internal::FEValues::FiniteElementRelatedData &, const CellSimilarity::Similarity ) const @@ -195,7 +195,7 @@ fill_fe_face_values (const Mapping &, const unsigned int face, const Quadrature& quadrature, const typename Mapping::InternalDataBase &, - const typename Mapping::InternalDataBase &fedata, + const typename FiniteElement::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData &, internal::FEValues::FiniteElementRelatedData &output_data) const { @@ -262,7 +262,7 @@ fill_fe_subface_values (const Mapping &, const unsigned int subface, const Quadrature& quadrature, const typename Mapping::InternalDataBase &, - const typename Mapping::InternalDataBase &fedata, + const typename FiniteElement::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData &, internal::FEValues::FiniteElementRelatedData &output_data) const { diff --git a/include/deal.II/fe/fe_poly_tensor.h b/include/deal.II/fe/fe_poly_tensor.h index eeb4043a6a..8793dbfe01 100644 --- a/include/deal.II/fe/fe_poly_tensor.h +++ b/include/deal.II/fe/fe_poly_tensor.h @@ -176,7 +176,7 @@ protected: MappingType mapping_type; virtual - typename Mapping::InternalDataBase * + typename FiniteElement::InternalDataBase * get_data (const UpdateFlags, const Mapping &mapping, const Quadrature &quadrature) const; @@ -187,7 +187,7 @@ protected: const typename Triangulation::cell_iterator &cell, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data, const CellSimilarity::Similarity cell_similarity) const; @@ -199,7 +199,7 @@ protected: const unsigned int face_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; @@ -211,7 +211,7 @@ protected: const unsigned int sub_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; diff --git a/include/deal.II/fe/fe_system.h b/include/deal.II/fe/fe_system.h index ae960cd396..5daa5fb99e 100644 --- a/include/deal.II/fe/fe_system.h +++ b/include/deal.II/fe/fe_system.h @@ -798,17 +798,17 @@ protected: */ virtual FiniteElement *clone() const; - virtual typename Mapping::InternalDataBase * + virtual typename FiniteElement::InternalDataBase * get_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature) const; - virtual typename Mapping::InternalDataBase * + virtual typename FiniteElement::InternalDataBase * get_face_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature) const; - virtual typename Mapping::InternalDataBase * + virtual typename FiniteElement::InternalDataBase * get_subface_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature) const; @@ -819,7 +819,7 @@ protected: const typename Triangulation::cell_iterator &cell, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data, const CellSimilarity::Similarity cell_similarity) const; @@ -831,7 +831,7 @@ protected: const unsigned int face_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; @@ -843,7 +843,7 @@ protected: const unsigned int sub_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_internal, + const typename FiniteElement::InternalDataBase &fe_internal, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; @@ -865,7 +865,7 @@ protected: const Quadrature &quadrature, const CellSimilarity::Similarity cell_similarity, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_data, + const typename FiniteElement::InternalDataBase &fe_data, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; @@ -1039,7 +1039,7 @@ private: const std::pair face_sub_no, const Quadrature &quadrature, const std::pair::InternalDataBase *, - const typename Mapping::InternalDataBase *> mapping_and_fe_internal, + const typename FiniteElement::InternalDataBase *> mapping_and_fe_internal, const unsigned int base_element, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const; diff --git a/include/deal.II/fe/fe_values.h b/include/deal.II/fe/fe_values.h index 7051dc78d4..62d0f27bcf 100644 --- a/include/deal.II/fe/fe_values.h +++ b/include/deal.II/fe/fe_values.h @@ -2339,7 +2339,7 @@ protected: /** * Internal data of finite element. */ - SmartPointer::InternalDataBase,FEValuesBase > fe_data; + SmartPointer::InternalDataBase,FEValuesBase > fe_data; /** * Original update flags handed to the constructor of FEValues. diff --git a/source/fe/fe.cc b/source/fe/fe.cc index 8288a5dad6..4b70c85f04 100644 --- a/source/fe/fe.cc +++ b/source/fe/fe.cc @@ -1418,7 +1418,7 @@ FiniteElement::compute_n_nonzero_components ( /*------------------------------- FiniteElement ----------------------*/ template -typename Mapping::InternalDataBase * +typename FiniteElement::InternalDataBase * FiniteElement::get_face_data (const UpdateFlags flags, const Mapping &mapping, const Quadrature &quadrature) const @@ -1430,7 +1430,7 @@ FiniteElement::get_face_data (const UpdateFlags flags, template -typename Mapping::InternalDataBase * +typename FiniteElement::InternalDataBase * FiniteElement::get_subface_data (const UpdateFlags flags, const Mapping &mapping, const Quadrature &quadrature) const diff --git a/source/fe/fe_dgp_nonparametric.cc b/source/fe/fe_dgp_nonparametric.cc index cfe74c284a..2be6b7024e 100644 --- a/source/fe/fe_dgp_nonparametric.cc +++ b/source/fe/fe_dgp_nonparametric.cc @@ -247,7 +247,7 @@ FE_DGPNonparametric::update_each (const UpdateFlags flags) const //--------------------------------------------------------------------------- template -typename Mapping::InternalDataBase * +typename FiniteElement::InternalDataBase * FE_DGPNonparametric::get_data ( const UpdateFlags update_flags, const Mapping &, @@ -282,7 +282,7 @@ fill_fe_values (const Mapping &, const typename Triangulation::cell_iterator &, const Quadrature &, const typename Mapping::InternalDataBase &, - const typename Mapping::InternalDataBase &fe_data, + const typename FiniteElement::InternalDataBase &fe_data, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data, const CellSimilarity::Similarity /*cell_similarity*/) const @@ -323,7 +323,7 @@ fill_fe_face_values (const Mapping &, const unsigned int, const Quadrature&, const typename Mapping::InternalDataBase &, - const typename Mapping::InternalDataBase &fe_data, + const typename FiniteElement::InternalDataBase &fe_data, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const { @@ -364,7 +364,7 @@ fill_fe_subface_values (const Mapping &, const unsigned int, const Quadrature&, const typename Mapping::InternalDataBase &, - const typename Mapping::InternalDataBase &fe_data, + const typename FiniteElement::InternalDataBase &fe_data, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const { diff --git a/source/fe/fe_face.cc b/source/fe/fe_face.cc index d3a63e71df..68418bfc68 100644 --- a/source/fe/fe_face.cc +++ b/source/fe/fe_face.cc @@ -460,26 +460,26 @@ FE_FaceQ<1,spacedim>::update_each (const UpdateFlags flags) const template -typename Mapping<1,spacedim>::InternalDataBase * +typename FiniteElement<1,spacedim>::InternalDataBase * FE_FaceQ<1,spacedim>::get_data ( const UpdateFlags, const Mapping<1,spacedim> &, const Quadrature<1> &) const { - return new typename Mapping<1,spacedim>::InternalDataBase; + return new typename FiniteElement<1,spacedim>::InternalDataBase; } template -typename Mapping<1,spacedim>::InternalDataBase * +typename FiniteElement<1,spacedim>::InternalDataBase * FE_FaceQ<1,spacedim>::get_face_data ( const UpdateFlags update_flags, const Mapping<1,spacedim> &, const Quadrature<0> &quadrature) const { // generate a new data object and initialize some fields - typename Mapping<1,spacedim>::InternalDataBase *data = - new typename Mapping<1,spacedim>::InternalDataBase; + typename FiniteElement<1,spacedim>::InternalDataBase *data = + new typename FiniteElement<1,spacedim>::InternalDataBase; // check what needs to be initialized only once and what on every // cell/face/subface we visit @@ -504,7 +504,7 @@ FE_FaceQ<1,spacedim>::get_face_data ( template -typename Mapping<1,spacedim>::InternalDataBase * +typename FiniteElement<1,spacedim>::InternalDataBase * FE_FaceQ<1,spacedim>::get_subface_data ( const UpdateFlags flags, const Mapping<1,spacedim> &mapping, @@ -522,7 +522,7 @@ fill_fe_values(const Mapping<1,spacedim> &, const typename Triangulation<1,spacedim>::cell_iterator &, const Quadrature<1> &, const typename Mapping<1,spacedim>::InternalDataBase &, - const typename Mapping<1,spacedim>::InternalDataBase &, + const typename FiniteElement<1,spacedim>::InternalDataBase &, const internal::FEValues::MappingRelatedData<1,spacedim> &, internal::FEValues::FiniteElementRelatedData<1,spacedim> &, const CellSimilarity::Similarity ) const @@ -540,7 +540,7 @@ fill_fe_face_values (const Mapping<1,spacedim> &, const unsigned int face, const Quadrature<0> &, const typename Mapping<1,spacedim>::InternalDataBase &, - const typename Mapping<1,spacedim>::InternalDataBase &fedata, + const typename FiniteElement<1,spacedim>::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData<1,spacedim> &, internal::FEValues::FiniteElementRelatedData<1,spacedim> &output_data) const { @@ -565,7 +565,7 @@ fill_fe_subface_values (const Mapping<1,spacedim> &, const unsigned int , const Quadrature<0> &, const typename Mapping<1,spacedim>::InternalDataBase &, - const typename Mapping<1,spacedim>::InternalDataBase &, + const typename FiniteElement<1,spacedim>::InternalDataBase &, const internal::FEValues::MappingRelatedData<1,spacedim> &, internal::FEValues::FiniteElementRelatedData<1,spacedim> &) const { diff --git a/source/fe/fe_nothing.cc b/source/fe/fe_nothing.cc index 08a4b7cdd2..fb3ea4497c 100644 --- a/source/fe/fe_nothing.cc +++ b/source/fe/fe_nothing.cc @@ -99,7 +99,7 @@ FE_Nothing::shape_value (const unsigned int /*i*/, template -typename Mapping::InternalDataBase * +typename FiniteElement::InternalDataBase * FE_Nothing::get_data (const UpdateFlags /*flags*/, const Mapping & /*mapping*/, const Quadrature & /*quadrature*/) const @@ -107,7 +107,7 @@ FE_Nothing::get_data (const UpdateFlags /*flags*/, // Create a default data object. Normally we would then // need to resize things to hold the appropriate numbers // of dofs, but in this case all data fields are empty. - typename Mapping::InternalDataBase *data + typename FiniteElement::InternalDataBase *data = new typename FiniteElement::InternalDataBase(); return data; } @@ -121,7 +121,7 @@ fill_fe_values (const Mapping & /*mapping*/, const typename Triangulation::cell_iterator & /*cell*/, const Quadrature & /*quadrature*/, const typename Mapping::InternalDataBase & /*mapping_data*/, - const typename Mapping::InternalDataBase & /*fedata*/, + const typename FiniteElement::InternalDataBase & /*fedata*/, const internal::FEValues::MappingRelatedData &/*mapping_data*/, internal::FEValues::FiniteElementRelatedData &/*output_data*/, const CellSimilarity::Similarity /*cell_similarity*/) const @@ -139,7 +139,7 @@ fill_fe_face_values (const Mapping & /*mapping*/, const unsigned int /*face*/, const Quadrature & /*quadrature*/, const typename Mapping::InternalDataBase & /*mapping_data*/, - const typename Mapping::InternalDataBase & /*fedata*/, + const typename FiniteElement::InternalDataBase & /*fedata*/, const internal::FEValues::MappingRelatedData &/*mapping_data*/, internal::FEValues::FiniteElementRelatedData &/*output_data*/) const { @@ -155,7 +155,7 @@ fill_fe_subface_values (const Mapping & /*mapping*/, const unsigned int /*subface*/, const Quadrature & /*quadrature*/, const typename Mapping::InternalDataBase & /*mapping_data*/, - const typename Mapping::InternalDataBase & /*fedata*/, + const typename FiniteElement::InternalDataBase & /*fedata*/, const internal::FEValues::MappingRelatedData &/*mapping_data*/, internal::FEValues::FiniteElementRelatedData &/*output_data*/) const { diff --git a/source/fe/fe_poly.cc b/source/fe/fe_poly.cc index b36b543f74..adbc063930 100644 --- a/source/fe/fe_poly.cc +++ b/source/fe/fe_poly.cc @@ -34,7 +34,7 @@ fill_fe_values (const Mapping<1,2> &mapping, const Triangulation<1,2>::cell_iterator &cell, const Quadrature<1> &quadrature, const Mapping<1,2>::InternalDataBase &mapping_internal, - const Mapping<1,2>::InternalDataBase &fedata, + const FiniteElement<1,2>::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData<1,2> &, internal::FEValues::FiniteElementRelatedData<1,2> &output_data, const CellSimilarity::Similarity cell_similarity) const @@ -75,7 +75,7 @@ fill_fe_values (const Mapping<2,3> &mapping, const Triangulation<2,3>::cell_iterator &cell, const Quadrature<2> &quadrature, const Mapping<2,3>::InternalDataBase &mapping_internal, - const Mapping<2,3>::InternalDataBase &fedata, + const FiniteElement<2,3>::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData<2,3> &, internal::FEValues::FiniteElementRelatedData<2,3> &output_data, const CellSimilarity::Similarity cell_similarity) const @@ -114,7 +114,7 @@ fill_fe_values (const Mapping<1,2> &mapping, const Triangulation<1,2>::cell_iterator &cell, const Quadrature<1> &quadrature, const Mapping<1,2>::InternalDataBase &mapping_internal, - const Mapping<1,2>::InternalDataBase &fedata, + const FiniteElement<1,2>::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData<1,2> &, internal::FEValues::FiniteElementRelatedData<1,2> &output_data, const CellSimilarity::Similarity cell_similarity) const @@ -155,7 +155,7 @@ fill_fe_values (const Mapping<2,3> &mapping, const Triangulation<2,3>::cell_iterator &cell, const Quadrature<2> &quadrature, const Mapping<2,3>::InternalDataBase &mapping_internal, - const Mapping<2,3>::InternalDataBase &fedata, + const FiniteElement<2,3>::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData<2,3> &, internal::FEValues::FiniteElementRelatedData<2,3> &output_data, const CellSimilarity::Similarity cell_similarity) const diff --git a/source/fe/fe_poly_tensor.cc b/source/fe/fe_poly_tensor.cc index efebdd71f8..5b50d5c30f 100644 --- a/source/fe/fe_poly_tensor.cc +++ b/source/fe/fe_poly_tensor.cc @@ -279,7 +279,7 @@ FE_PolyTensor::shape_grad_grad_component (const unsigned int //--------------------------------------------------------------------------- template -typename Mapping::InternalDataBase * +typename FiniteElement::InternalDataBase * FE_PolyTensor::get_data ( const UpdateFlags update_flags, const Mapping &mapping, @@ -394,7 +394,7 @@ fill_fe_values (const Mapping &mapping, const typename Triangulation::cell_iterator &cell, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fedata, + const typename FiniteElement::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData &, internal::FEValues::FiniteElementRelatedData &output_data, const CellSimilarity::Similarity cell_similarity) const @@ -617,7 +617,7 @@ fill_fe_face_values (const Mapping &mapping, const unsigned int face, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fedata, + const typename FiniteElement::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData &, internal::FEValues::FiniteElementRelatedData &output_data) const { @@ -824,7 +824,7 @@ fill_fe_subface_values (const Mapping &mapping, const unsigned int subface, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fedata, + const typename FiniteElement::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData &, internal::FEValues::FiniteElementRelatedData &output_data) const { diff --git a/source/fe/fe_system.cc b/source/fe/fe_system.cc index cce57e3367..cebb901600 100644 --- a/source/fe/fe_system.cc +++ b/source/fe/fe_system.cc @@ -810,7 +810,7 @@ FESystem::update_each (const UpdateFlags flags) const template -typename Mapping::InternalDataBase * +typename FiniteElement::InternalDataBase * FESystem::get_data (const UpdateFlags flags_, const Mapping &mapping, const Quadrature &quadrature) const @@ -841,13 +841,8 @@ FESystem::get_data (const UpdateFlags flags_, // the base elements and store them for (unsigned int base_no=0; base_non_base_elements(); ++base_no) { - typename Mapping::InternalDataBase *base_fe_data_base = - base_element(base_no).get_data(sub_flags, mapping, quadrature); - typename FiniteElement::InternalDataBase *base_fe_data = - dynamic_cast::InternalDataBase *> - (base_fe_data_base); - Assert (base_fe_data != 0, ExcInternalError()); + base_element(base_no).get_data(sub_flags, mapping, quadrature); data->set_fe_data(base_no, base_fe_data); @@ -868,7 +863,7 @@ FESystem::get_data (const UpdateFlags flags_, // that get_face_data of the base elements is called. template -typename Mapping::InternalDataBase * +typename FiniteElement::InternalDataBase * FESystem::get_face_data ( const UpdateFlags flags_, const Mapping &mapping, @@ -891,13 +886,8 @@ FESystem::get_face_data ( for (unsigned int base_no=0; base_non_base_elements(); ++base_no) { - typename Mapping::InternalDataBase *base_fe_data_base = - base_element(base_no).get_face_data(sub_flags, mapping, quadrature); - typename FiniteElement::InternalDataBase *base_fe_data = - dynamic_cast::InternalDataBase *> - (base_fe_data_base); - Assert (base_fe_data != 0, ExcInternalError()); + base_element(base_no).get_face_data(sub_flags, mapping, quadrature); data->set_fe_data(base_no, base_fe_data); @@ -917,7 +907,7 @@ FESystem::get_face_data ( // that get_subface_data of the base elements is called. template -typename Mapping::InternalDataBase * +typename FiniteElement::InternalDataBase * FESystem::get_subface_data ( const UpdateFlags flags_, const Mapping &mapping, @@ -940,13 +930,8 @@ FESystem::get_subface_data ( for (unsigned int base_no=0; base_non_base_elements(); ++base_no) { - typename Mapping::InternalDataBase *base_fe_data_base = - base_element(base_no).get_subface_data(sub_flags, mapping, quadrature); - typename FiniteElement::InternalDataBase *base_fe_data = - dynamic_cast::InternalDataBase *> - (base_fe_data_base); - Assert (base_fe_data != 0, ExcInternalError()); + base_element(base_no).get_subface_data(sub_flags, mapping, quadrature); data->set_fe_data(base_no, base_fe_data); @@ -969,7 +954,7 @@ fill_fe_values (const Mapping &mapping, const typename Triangulation::cell_iterator &cell, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_data, + const typename FiniteElement::InternalDataBase &fe_data, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data, const CellSimilarity::Similarity cell_similarity) const @@ -989,7 +974,7 @@ fill_fe_face_values (const Mapping &mapping, const unsigned int face_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_data, + const typename FiniteElement::InternalDataBase &fe_data, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const { @@ -1010,7 +995,7 @@ fill_fe_subface_values (const Mapping &mappin const unsigned int sub_no, const Quadrature &quadrature, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fe_data, + const typename FiniteElement::InternalDataBase &fe_data, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const { @@ -1031,7 +1016,7 @@ compute_fill_one_base (const Mapping &mapping const std::pair face_sub_no, const Quadrature &quadrature, const std::pair::InternalDataBase *, - const typename Mapping::InternalDataBase *> mapping_and_fe_internal, + const typename FiniteElement::InternalDataBase *> mapping_and_fe_internal, const unsigned int base_no, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const @@ -1173,7 +1158,7 @@ compute_fill (const Mapping &mapping, const Quadrature &quadrature, const CellSimilarity::Similarity cell_similarity, const typename Mapping::InternalDataBase &mapping_internal, - const typename Mapping::InternalDataBase &fedata, + const typename FiniteElement::InternalDataBase &fedata, const internal::FEValues::MappingRelatedData &mapping_data, internal::FEValues::FiniteElementRelatedData &output_data) const { @@ -1203,7 +1188,7 @@ compute_fill (const Mapping &mapping, for (unsigned int base_no=0; base_non_base_elements(); ++base_no) { // Pointer needed to get the update flags of the base element - typename Mapping::InternalDataBase & + typename FiniteElement::InternalDataBase & base_fe_data = fe_data.get_fe_data(base_no); // compute update flags ... diff --git a/source/fe/fe_values.cc b/source/fe/fe_values.cc index de1051e3b4..40548fbae9 100644 --- a/source/fe/fe_values.cc +++ b/source/fe/fe_values.cc @@ -2184,7 +2184,7 @@ FEValuesBase::~FEValuesBase () // have assumed ownership if (fe_data != 0) { - typename Mapping::InternalDataBase *tmp1=fe_data; + typename FiniteElement::InternalDataBase *tmp1=fe_data; fe_data=0; delete tmp1; }