From: Wolfgang Bangerth Date: Tue, 1 May 2001 16:06:35 +0000 (+0000) Subject: Add some 150 typename keywords. X-Git-Tag: v8.0.0~19275 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed5f58861fe3aa9fb6ef690b4d9133d340458b8b;p=dealii.git Add some 150 typename keywords. git-svn-id: https://svn.dealii.org/trunk@4513 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index a5bfe2405f..abe50d9fb9 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -1328,7 +1328,8 @@ void DataOutBase::write_eps (const typename std::vector > &p double y_min = cells.begin()->vertices[0](1); double y_max = y_min; - for (std::multiset::const_iterator cell=cells.begin(); + for (typename std::multiset::const_iterator + cell=cells.begin(); cell!=cells.end(); ++cell) for (unsigned int vertex=0; vertex<4; ++vertex) { @@ -1410,7 +1411,8 @@ void DataOutBase::write_eps (const typename std::vector > &p // note: due to the ordering, we // traverse the list of cells // back-to-front - for (std::multiset::const_iterator cell=cells.begin(); + for (typename std::multiset::const_iterator + cell=cells.begin(); cell!=cells.end(); ++cell) { if (flags.draw_cells) diff --git a/deal.II/base/source/subscriptor.cc b/deal.II/base/source/subscriptor.cc index 77c48e0467..c81e648d80 100644 --- a/deal.II/base/source/subscriptor.cc +++ b/deal.II/base/source/subscriptor.cc @@ -54,7 +54,7 @@ ActiveObjectMonitor::~ActiveObjectMonitor () { if (registered_objects.size() > 0) { - for (std::set::const_iterator i=registered_objects.begin(); + for (typename std::set::const_iterator i=registered_objects.begin(); i!=registered_objects.end(); ++i) std::cout << "Object still exists of type " << typeid(**i).name() diff --git a/deal.II/base/source/table_handler.cc b/deal.II/base/source/table_handler.cc index 24f062d1ab..7a38c0861f 100644 --- a/deal.II/base/source/table_handler.cc +++ b/deal.II/base/source/table_handler.cc @@ -253,7 +253,6 @@ void TableHandler::write_text(std::ostream &out) const out.setf(std::ios::left); out << std::setw(column_string_size) -// << setfill('*') << key << "\t"; } out << std::endl; diff --git a/deal.II/deal.II/include/fe/fe_dgq.h b/deal.II/deal.II/include/fe/fe_dgq.h index a062f01895..73c1915389 100644 --- a/deal.II/deal.II/include/fe/fe_dgq.h +++ b/deal.II/deal.II/include/fe/fe_dgq.h @@ -81,7 +81,8 @@ class FE_DGQ : public FiniteElement * structures and fill in values * independent of the cell. */ - virtual Mapping::InternalDataBase* + virtual + typename Mapping::InternalDataBase * get_data (const UpdateFlags, const Mapping& mapping, const Quadrature& quadrature) const ; diff --git a/deal.II/deal.II/include/fe/fe_q.h b/deal.II/deal.II/include/fe/fe_q.h index 77e4d32027..3b7bb883c4 100644 --- a/deal.II/deal.II/include/fe/fe_q.h +++ b/deal.II/deal.II/include/fe/fe_q.h @@ -292,7 +292,8 @@ class FE_Q : public FiniteElement * structures and fill in values * independent of the cell. */ - virtual Mapping::InternalDataBase* + virtual + typename Mapping::InternalDataBase * get_data (const UpdateFlags, const Mapping& mapping, const Quadrature& quadrature) const ; diff --git a/deal.II/deal.II/include/fe/fe_system.h b/deal.II/deal.II/include/fe/fe_system.h index a6246becc2..dbeb5bca16 100644 --- a/deal.II/deal.II/include/fe/fe_system.h +++ b/deal.II/deal.II/include/fe/fe_system.h @@ -210,12 +210,12 @@ class FESystem : public FiniteElement * @ref{FiniteElement}. */ virtual void - fill_fe_values (const Mapping &mapping, + fill_fe_values (const Mapping &mapping, const typename DoFHandler::cell_iterator &cell, - const Quadrature &quadrature, - Mapping::InternalDataBase &mapping_data, - Mapping::InternalDataBase &fe_data, - FEValuesData &data) const; + const Quadrature &quadrature, + typename Mapping::InternalDataBase &mapping_data, + typename Mapping::InternalDataBase &fe_data, + FEValuesData &data) const; /** * Implementation of the same diff --git a/deal.II/deal.II/include/fe/mapping_cartesian.h b/deal.II/deal.II/include/fe/mapping_cartesian.h index ad88528974..7be76a8446 100644 --- a/deal.II/deal.II/include/fe/mapping_cartesian.h +++ b/deal.II/deal.II/include/fe/mapping_cartesian.h @@ -35,7 +35,8 @@ class MappingCartesian : public Mapping * Implementation of the interface in * @ref{Mapping}. */ - virtual Mapping::InternalDataBase* + virtual + typename Mapping::InternalDataBase * get_data (const UpdateFlags, const Quadrature& quadrature) const; @@ -43,7 +44,8 @@ class MappingCartesian : public Mapping * Implementation of the interface in * @ref{Mapping}. */ - virtual Mapping::InternalDataBase* + virtual + typename Mapping::InternalDataBase * get_face_data (const UpdateFlags flags, const Quadrature& quadrature) const; @@ -51,7 +53,8 @@ class MappingCartesian : public Mapping * Implementation of the interface in * @ref{Mapping}. */ - virtual Mapping::InternalDataBase* + virtual + typename Mapping::InternalDataBase * get_subface_data (const UpdateFlags flags, const Quadrature& quadrature) const; @@ -103,7 +106,7 @@ class MappingCartesian : public Mapping virtual void transform_covariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** @@ -113,7 +116,7 @@ class MappingCartesian : public Mapping virtual void transform_contravariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** @@ -123,7 +126,7 @@ class MappingCartesian : public Mapping virtual void transform_covariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** @@ -133,7 +136,7 @@ class MappingCartesian : public Mapping virtual void transform_contravariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** @@ -185,7 +188,7 @@ class MappingCartesian : public Mapping template void covariant_transformation (std::vector &dst, const std::vector &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** @@ -195,7 +198,7 @@ class MappingCartesian : public Mapping template void contravariant_transformation (std::vector &dst, const std::vector &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** diff --git a/deal.II/deal.II/include/fe/mapping_q.h b/deal.II/deal.II/include/fe/mapping_q.h index ef8cc90ed1..fb9ab0420e 100644 --- a/deal.II/deal.II/include/fe/mapping_q.h +++ b/deal.II/deal.II/include/fe/mapping_q.h @@ -82,7 +82,7 @@ class MappingQ : public MappingQ1 virtual void transform_covariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** @@ -92,7 +92,7 @@ class MappingQ : public MappingQ1 virtual void transform_contravariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** @@ -102,7 +102,7 @@ class MappingQ : public MappingQ1 virtual void transform_covariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** @@ -112,7 +112,7 @@ class MappingQ : public MappingQ1 virtual void transform_contravariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; protected: @@ -123,7 +123,7 @@ class MappingQ : public MappingQ1 virtual void fill_fe_values (const typename DoFHandler::cell_iterator &cell, const Quadrature &quadrature, - typename Mapping::InternalDataBase &mapping_data, + typename Mapping::InternalDataBase &mapping_data, std::vector > &quadrature_points, std::vector &JxW_values) const ; @@ -198,7 +198,7 @@ class MappingQ : public MappingQ1 * On interior cells * @p{MappingQ1} is used. */ - MappingQ1::InternalData mapping_q1_data; + typename MappingQ1::InternalData mapping_q1_data; }; /** @@ -261,7 +261,8 @@ class MappingQ : public MappingQ1 * Implementation of the interface in * @ref{Mapping}. */ - virtual Mapping::InternalDataBase* + virtual + typename Mapping::InternalDataBase * get_data (const UpdateFlags, const Quadrature& quadrature) const; @@ -269,7 +270,8 @@ class MappingQ : public MappingQ1 * Implementation of the interface in * @ref{Mapping}. */ - virtual Mapping::InternalDataBase* + virtual + typename Mapping::InternalDataBase * get_face_data (const UpdateFlags flags, const Quadrature& quadrature) const; @@ -277,16 +279,18 @@ class MappingQ : public MappingQ1 * Implementation of the interface in * @ref{Mapping}. */ - virtual Mapping::InternalDataBase* + virtual + typename Mapping::InternalDataBase * get_subface_data (const UpdateFlags flags, - const Quadrature& quadrature) const; + const Quadrature& quadrature) const; /** * Compute shape values and/or * derivatives. */ - virtual void compute_shapes_virtual (const std::vector > &unit_points, - MappingQ1::InternalData &data) const; + virtual void + compute_shapes_virtual (const std::vector > &unit_points, + typename MappingQ1::InternalData &data) const; /** * This function is needed by the @@ -300,7 +304,8 @@ class MappingQ : public MappingQ1 * @p{degree>=4} and MappingQ<2> * this vector is computed. */ - void set_laplace_on_quad_vector(std::vector > &loqvs) const; + void + set_laplace_on_quad_vector(std::vector > &loqvs) const; /** * This function is needed by the diff --git a/deal.II/deal.II/include/fe/mapping_q1.h b/deal.II/deal.II/include/fe/mapping_q1.h index 38b1ddbcb7..483b6bd1af 100644 --- a/deal.II/deal.II/include/fe/mapping_q1.h +++ b/deal.II/deal.II/include/fe/mapping_q1.h @@ -68,7 +68,7 @@ class MappingQ1 : public Mapping virtual void transform_covariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** @@ -78,7 +78,7 @@ class MappingQ1 : public Mapping virtual void transform_contravariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** @@ -88,7 +88,7 @@ class MappingQ1 : public Mapping virtual void transform_covariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** @@ -98,7 +98,7 @@ class MappingQ1 : public Mapping virtual void transform_contravariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; @@ -163,7 +163,7 @@ class MappingQ1 : public Mapping template void covariant_transformation (std::vector &dst, const std::vector &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** @@ -173,7 +173,7 @@ class MappingQ1 : public Mapping template void contravariant_transformation (std::vector &dst, const std::vector &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const; /** @@ -467,7 +467,8 @@ class MappingQ1 : public Mapping * Implementation of the interface in * @ref{Mapping}. */ - virtual Mapping::InternalDataBase* + virtual + typename Mapping::InternalDataBase * get_data (const UpdateFlags, const Quadrature& quadrature) const; @@ -475,7 +476,8 @@ class MappingQ1 : public Mapping * Implementation of the interface in * @ref{Mapping}. */ - virtual Mapping::InternalDataBase* + virtual + typename Mapping::InternalDataBase * get_face_data (const UpdateFlags flags, const Quadrature& quadrature) const; @@ -483,7 +485,8 @@ class MappingQ1 : public Mapping * Implementation of the interface in * @ref{Mapping}. */ - virtual Mapping::InternalDataBase* + virtual + typename Mapping::InternalDataBase * get_subface_data (const UpdateFlags flags, const Quadrature& quadrature) const; diff --git a/deal.II/deal.II/source/fe/fe.cc b/deal.II/deal.II/source/fe/fe.cc index 0b2fda4871..ee67870c5c 100644 --- a/deal.II/deal.II/source/fe/fe.cc +++ b/deal.II/deal.II/source/fe/fe.cc @@ -389,7 +389,7 @@ FiniteElement::~FiniteElement () template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * FiniteElement::get_face_data (const UpdateFlags flags, const Mapping &mapping, const Quadrature &quadrature) const @@ -401,7 +401,7 @@ FiniteElement::get_face_data (const UpdateFlags flags, template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * FiniteElement::get_subface_data (const UpdateFlags flags, const Mapping &mapping, const Quadrature &quadrature) const diff --git a/deal.II/deal.II/source/fe/fe_dgq.cc b/deal.II/deal.II/source/fe/fe_dgq.cc index 8e7fc91c01..c566e7c7fd 100644 --- a/deal.II/deal.II/source/fe/fe_dgq.cc +++ b/deal.II/deal.II/source/fe/fe_dgq.cc @@ -359,7 +359,7 @@ FE_DGQ::rotate_indices (std::vector &numbers, //---------------------------------------------------------------------- template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * FE_DGQ::get_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature) const diff --git a/deal.II/deal.II/source/fe/fe_q.cc b/deal.II/deal.II/source/fe/fe_q.cc index 51eff18833..4b0828fa2e 100644 --- a/deal.II/deal.II/source/fe/fe_q.cc +++ b/deal.II/deal.II/source/fe/fe_q.cc @@ -957,7 +957,7 @@ FE_Q::update_each (UpdateFlags flags) const //---------------------------------------------------------------------- template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * FE_Q::get_data (const UpdateFlags update_flags, const Mapping &mapping, const Quadrature &quadrature) const diff --git a/deal.II/deal.II/source/fe/fe_system.cc b/deal.II/deal.II/source/fe/fe_system.cc index 7f241821ad..58b134bd04 100644 --- a/deal.II/deal.II/source/fe/fe_system.cc +++ b/deal.II/deal.II/source/fe/fe_system.cc @@ -63,7 +63,8 @@ FESystem::InternalData::~InternalData() template -inline FiniteElementBase::InternalDataBase & +inline +typename FiniteElementBase::InternalDataBase & FESystem:: InternalData::get_fe_data (const unsigned int base_no) const { @@ -78,7 +79,7 @@ template inline void FESystem:: InternalData::set_fe_data (const unsigned int base_no, - FiniteElementBase::InternalDataBase *ptr) + typename FiniteElementBase::InternalDataBase *ptr) { Assert(base_no::update_each (const UpdateFlags flags) const } + template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * FESystem::get_data (UpdateFlags flags, const Mapping &mapping, const Quadrature &quadrature) const @@ -307,7 +309,7 @@ FESystem::get_data (UpdateFlags flags, typename Mapping::InternalDataBase *base_fe_data_base = base_element(base_no).get_data(sub_flags, mapping, quadrature); - FiniteElementBase::InternalDataBase *base_fe_data = + typename FiniteElementBase::InternalDataBase *base_fe_data = dynamic_cast::InternalDataBase *> (base_fe_data_base); @@ -448,8 +450,8 @@ FESystem::compute_fill (const Mapping &mapping, // Pointer needed to get // the update flags of the // base element - Mapping::InternalDataBase &base_fe_data= - fe_data.get_fe_data(base_no); + typename Mapping::InternalDataBase & + base_fe_data = fe_data.get_fe_data(base_no); // compute update flags ... const UpdateFlags base_update_flags(mapping_data.update_flags @@ -502,8 +504,8 @@ FESystem::compute_fill (const Mapping &mapping, for (unsigned int base_no=0, comp=0; base_no &base_fe=base_element(base_no); - FiniteElementBase::InternalDataBase &base_fe_data= - fe_data.get_fe_data(base_no); + typename FiniteElementBase::InternalDataBase & + base_fe_data = fe_data.get_fe_data(base_no); // Make sure that in the // case of fill_fe_values @@ -577,7 +579,7 @@ FESystem::compute_fill (const Mapping &mapping, // Pointer needed to get // the update flags of the // base element - Mapping::InternalDataBase &base_fe_data= + typename Mapping::InternalDataBase &base_fe_data= fe_data.get_fe_data(base_no); // compute update flags ... diff --git a/deal.II/deal.II/source/fe/fe_values.cc b/deal.II/deal.II/source/fe/fe_values.cc index 7d377cbc26..5e3d0e5c57 100644 --- a/deal.II/deal.II/source/fe/fe_values.cc +++ b/deal.II/deal.II/source/fe/fe_values.cc @@ -104,14 +104,14 @@ FEValuesBase::~FEValuesBase () { if (fe_data) { - Mapping::InternalDataBase *tmp1=fe_data; + typename Mapping::InternalDataBase *tmp1=fe_data; fe_data=0; delete tmp1; } if (mapping_data) { - Mapping::InternalDataBase *tmp1=mapping_data; + typename Mapping::InternalDataBase *tmp1=mapping_data; mapping_data=0; delete tmp1; } diff --git a/deal.II/deal.II/source/fe/mapping_cartesian.cc b/deal.II/deal.II/source/fe/mapping_cartesian.cc index f6b1662c45..83d30b5abc 100644 --- a/deal.II/deal.II/source/fe/mapping_cartesian.cc +++ b/deal.II/deal.II/source/fe/mapping_cartesian.cc @@ -62,7 +62,7 @@ MappingCartesian::update_each (const UpdateFlags in) const template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * MappingCartesian::get_data (const UpdateFlags flags, const Quadrature &q) const { @@ -72,8 +72,9 @@ MappingCartesian::get_data (const UpdateFlags flags, } + template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * MappingCartesian::get_face_data (const UpdateFlags, const Quadrature& quadrature) const { @@ -85,7 +86,7 @@ MappingCartesian::get_face_data (const UpdateFlags, template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * MappingCartesian::get_subface_data (const UpdateFlags, const Quadrature &quadrature) const { @@ -413,9 +414,9 @@ MappingCartesian<1>::fill_fe_subface_values (const DoFHandler<1>::cell_iterator template void MappingCartesian::transform_covariant (std::vector > &dst, - const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, - const unsigned int src_offset) const + const std::vector > &src, + const typename Mapping::InternalDataBase &mapping_data, + const unsigned int src_offset) const { covariant_transformation(dst, src, mapping_data, src_offset); } @@ -424,9 +425,9 @@ MappingCartesian::transform_covariant (std::vector > &d template void MappingCartesian::transform_covariant (std::vector > &dst, - const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, - const unsigned int src_offset) const + const std::vector > &src, + const typename Mapping::InternalDataBase &mapping_data, + const unsigned int src_offset) const { covariant_transformation(dst, src, mapping_data, src_offset); } @@ -434,20 +435,21 @@ MappingCartesian::transform_covariant (std::vector > &dst, template void MappingCartesian::transform_contravariant (std::vector > &dst, - const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, - const unsigned int src_offset) const + const std::vector > &src, + const typename Mapping::InternalDataBase &mapping_data, + const unsigned int src_offset) const { contravariant_transformation(dst, src, mapping_data, src_offset); } + template void MappingCartesian::transform_contravariant (std::vector > &dst, - const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, - const unsigned int src_offset) const + const std::vector > &src, + const typename Mapping::InternalDataBase &mapping_data, + const unsigned int src_offset) const { contravariant_transformation(dst, src, mapping_data, src_offset); } @@ -525,7 +527,7 @@ inline void MappingCartesian::contravariant_transformation (std::vector &dst, const std::vector &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const { Assert(tensor_::dimension==dim && tensor_::rank==1, ExcInvalidData()); @@ -562,7 +564,7 @@ inline void MappingCartesian::covariant_transformation (std::vector &dst, const std::vector &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const { Assert(tensor_::dimension==dim && tensor_::rank==1, ExcInvalidData()); diff --git a/deal.II/deal.II/source/fe/mapping_q.cc b/deal.II/deal.II/source/fe/mapping_q.cc index dd63000fd8..d8a1c8321c 100644 --- a/deal.II/deal.II/source/fe/mapping_q.cc +++ b/deal.II/deal.II/source/fe/mapping_q.cc @@ -30,7 +30,8 @@ const bool MappingQ::use_mapping_q_on_all_cells; template -MappingQ::InternalData::InternalData (const unsigned int n_shape_functions): +MappingQ::InternalData::InternalData (const unsigned int n_shape_functions) + : MappingQ1::InternalData(n_shape_functions), use_mapping_q1_on_current_cell(false), mapping_q1_data(1 << dim) @@ -145,7 +146,7 @@ MappingQ<1>::compute_shapes_virtual (const std::vector > &unit_points, template void MappingQ::compute_shapes_virtual (const std::vector > &unit_points, - MappingQ1::InternalData &data) const + typename MappingQ1::InternalData &data) const { const unsigned int n_points=unit_points.size(); std::vector values; @@ -185,7 +186,7 @@ MappingQ::compute_shapes_virtual (const std::vector > &unit_poin template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * MappingQ::get_data (const UpdateFlags update_flags, const Quadrature &quadrature) const { @@ -201,7 +202,7 @@ MappingQ::get_data (const UpdateFlags update_flags, template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * MappingQ::get_face_data (const UpdateFlags update_flags, const Quadrature& quadrature) const { @@ -219,7 +220,7 @@ MappingQ::get_face_data (const UpdateFlags update_flags, template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * MappingQ::get_subface_data (const UpdateFlags update_flags, const Quadrature& quadrature) const { @@ -261,7 +262,7 @@ MappingQ::fill_fe_values (const typename DoFHandler::cell_iterator &ce // depending on this result, use // this or the other data object // for the mapping - MappingQ1::InternalData *p_data=0; + typename MappingQ1::InternalData *p_data=0; if (data.use_mapping_q1_on_current_cell) p_data=&data.mapping_q1_data; else @@ -313,7 +314,7 @@ MappingQ::fill_fe_face_values (const typename DoFHandler::cell_iterato // depending on this result, use // this or the other data object // for the mapping - MappingQ1::InternalData *p_data=0; + typename MappingQ1::InternalData *p_data=0; if (data.use_mapping_q1_on_current_cell) p_data=&data.mapping_q1_data; else @@ -369,7 +370,7 @@ MappingQ::fill_fe_subface_values (const typename DoFHandler::cell_iter // depending on this result, use // this or the other data object // for the mapping - MappingQ1::InternalData *p_data=0; + typename MappingQ1::InternalData *p_data=0; if (data.use_mapping_q1_on_current_cell) p_data=&data.mapping_q1_data; else @@ -1099,13 +1100,13 @@ template void MappingQ::transform_covariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const { - const MappingQ1::InternalData *q1_data_ptr = - dynamic_cast::InternalData *> (&mapping_data); + const typename MappingQ1::InternalData *q1_data_ptr = + dynamic_cast::InternalData *> (&mapping_data); Assert(q1_data_ptr!=0, ExcInternalError()); - const MappingQ1::InternalData &q1_data=*q1_data_ptr; + const typename MappingQ1::InternalData &q1_data=*q1_data_ptr; if (q1_data.is_mapping_q1_data) covariant_transformation(dst, src, q1_data, src_offset); @@ -1127,13 +1128,13 @@ template void MappingQ::transform_covariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const { - const MappingQ1::InternalData *q1_data_ptr = - dynamic_cast::InternalData *> (&mapping_data); + const typename MappingQ1::InternalData *q1_data_ptr = + dynamic_cast::InternalData *> (&mapping_data); Assert(q1_data_ptr!=0, ExcInternalError()); - const MappingQ1::InternalData &q1_data=*q1_data_ptr; + const typename MappingQ1::InternalData &q1_data=*q1_data_ptr; if (q1_data.is_mapping_q1_data) covariant_transformation(dst, src, q1_data, src_offset); @@ -1155,13 +1156,13 @@ template void MappingQ::transform_contravariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const { - const MappingQ1::InternalData *q1_data_ptr = - dynamic_cast::InternalData *> (&mapping_data); + const typename MappingQ1::InternalData *q1_data_ptr = + dynamic_cast::InternalData *> (&mapping_data); Assert(q1_data_ptr!=0, ExcInternalError()); - const MappingQ1::InternalData &q1_data=*q1_data_ptr; + const typename MappingQ1::InternalData &q1_data=*q1_data_ptr; if (q1_data.is_mapping_q1_data) contravariant_transformation(dst, src, q1_data, src_offset); @@ -1183,13 +1184,13 @@ template void MappingQ::transform_contravariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const { - const MappingQ1::InternalData *q1_data_ptr = - dynamic_cast::InternalData *> (&mapping_data); + const typename MappingQ1::InternalData *q1_data_ptr = + dynamic_cast::InternalData *> (&mapping_data); Assert(q1_data_ptr!=0, ExcInternalError()); - const MappingQ1::InternalData &q1_data=*q1_data_ptr; + const typename MappingQ1::InternalData &q1_data=*q1_data_ptr; if (q1_data.is_mapping_q1_data) contravariant_transformation(dst, src, q1_data, src_offset); @@ -1225,7 +1226,7 @@ Point MappingQ::transform_unit_to_real_cell ( mdata->use_mapping_q1_on_current_cell = !(use_mapping_q_on_all_cells || cell->has_boundary_lines()); - MappingQ1::InternalData *p_data=0; + typename MappingQ1::InternalData *p_data=0; if (mdata->use_mapping_q1_on_current_cell) p_data=&mdata->mapping_q1_data; else @@ -1237,6 +1238,7 @@ Point MappingQ::transform_unit_to_real_cell ( } + template Point MappingQ::transform_real_to_unit_cell ( const typename Triangulation::cell_iterator cell, @@ -1264,7 +1266,7 @@ Point MappingQ::transform_real_to_unit_cell ( mdata->use_mapping_q1_on_current_cell = !(use_mapping_q_on_all_cells || cell->has_boundary_lines()); - MappingQ1::InternalData *p_data=0; + typename MappingQ1::InternalData *p_data=0; if (mdata->use_mapping_q1_on_current_cell) p_data=&mdata->mapping_q1_data; else diff --git a/deal.II/deal.II/source/fe/mapping_q1.cc b/deal.II/deal.II/source/fe/mapping_q1.cc index 821fd03927..66cc335c79 100644 --- a/deal.II/deal.II/source/fe/mapping_q1.cc +++ b/deal.II/deal.II/source/fe/mapping_q1.cc @@ -32,7 +32,8 @@ const unsigned int MappingQ1::n_shape_functions; template -MappingQ1::InternalData::InternalData (const unsigned int n_shape_functions): +MappingQ1::InternalData::InternalData (const unsigned int n_shape_functions) + : is_mapping_q1_data(true), n_shape_functions (n_shape_functions) {} @@ -44,46 +45,51 @@ MappingQ1::InternalData::shape (const unsigned int qpoint, const unsigned int shape_nr) const { Assert(qpoint*n_shape_functions + shape_nr < shape_values.size(), - ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, shape_values.size())); + ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, + shape_values.size())); return shape_values [qpoint*n_shape_functions + shape_nr]; } template inline -double& -MappingQ1::InternalData::shape (unsigned int qpoint, - unsigned int shape_nr) +double & +MappingQ1::InternalData::shape (const unsigned int qpoint, + const unsigned int shape_nr) { Assert(qpoint*n_shape_functions + shape_nr < shape_values.size(), - ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, shape_values.size())); + ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, + shape_values.size())); return shape_values [qpoint*n_shape_functions + shape_nr]; } template inline Tensor<1,dim> -MappingQ1::InternalData::derivative (unsigned int qpoint, - unsigned int shape_nr) const +MappingQ1::InternalData::derivative (const unsigned int qpoint, + const unsigned int shape_nr) const { Assert(qpoint*n_shape_functions + shape_nr < shape_derivatives.size(), - ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, shape_derivatives.size())); + ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, + shape_derivatives.size())); return shape_derivatives [qpoint*n_shape_functions + shape_nr]; } template inline -Tensor<1,dim>& -MappingQ1::InternalData::derivative (unsigned int qpoint, - unsigned int shape_nr) +Tensor<1,dim> & +MappingQ1::InternalData::derivative (const unsigned int qpoint, + const unsigned int shape_nr) { Assert(qpoint*n_shape_functions + shape_nr < shape_derivatives.size(), - ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, shape_derivatives.size())); + ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, + shape_derivatives.size())); return shape_derivatives [qpoint*n_shape_functions + shape_nr]; } + template void MappingQ1::compute_shapes (const std::vector > &unit_points, @@ -346,8 +352,9 @@ MappingQ1::compute_data (const UpdateFlags update_flags, } + template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * MappingQ1::get_data (const UpdateFlags update_flags, const Quadrature& q) const { @@ -357,6 +364,7 @@ MappingQ1::get_data (const UpdateFlags update_flags, } + template void MappingQ1::compute_face_data (UpdateFlags update_flags, @@ -422,7 +430,7 @@ MappingQ1::compute_face_data (UpdateFlags update_flags, template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * MappingQ1::get_face_data (const UpdateFlags update_flags, const Quadrature &quadrature) const { @@ -436,7 +444,7 @@ MappingQ1::get_face_data (const UpdateFlags update_flags, template -Mapping::InternalDataBase* +typename Mapping::InternalDataBase * MappingQ1::get_subface_data (const UpdateFlags update_flags, const Quadrature& quadrature) const { @@ -800,7 +808,7 @@ template void MappingQ1::transform_covariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const { covariant_transformation(dst, src, mapping_data, src_offset); @@ -811,7 +819,7 @@ template void MappingQ1::transform_covariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const { covariant_transformation(dst, src, mapping_data, src_offset); @@ -821,7 +829,7 @@ template void MappingQ1::transform_contravariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const { contravariant_transformation(dst, src, mapping_data, src_offset); @@ -832,7 +840,7 @@ template void MappingQ1::transform_contravariant (std::vector > &dst, const std::vector > &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const { contravariant_transformation(dst, src, mapping_data, src_offset); @@ -987,7 +995,7 @@ inline void MappingQ1::contravariant_transformation (std::vector &dst, const std::vector &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const { Assert(tensor_::dimension==dim && tensor_::rank==1, Mapping::ExcInvalidData()); @@ -1021,7 +1029,7 @@ inline void MappingQ1::covariant_transformation (std::vector &dst, const std::vector &src, - const Mapping::InternalDataBase &mapping_data, + const typename Mapping::InternalDataBase &mapping_data, const unsigned int src_offset) const { Assert(tensor_::dimension==dim && tensor_::rank==1, Mapping::ExcInvalidData()); diff --git a/deal.II/examples/step-4/step-4.cc b/deal.II/examples/step-4/step-4.cc index 754ddc6301..9066a1e4f9 100644 --- a/deal.II/examples/step-4/step-4.cc +++ b/deal.II/examples/step-4/step-4.cc @@ -375,8 +375,8 @@ void LaplaceProblem::assemble_system () // probably never see a difference // although they are totally // unrelated. - DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), + endc = dof_handler.end(); for (; cell!=endc; ++cell) { fe_values.reinit (cell); diff --git a/deal.II/examples/step-5/step-5.cc b/deal.II/examples/step-5/step-5.cc index 8a6fcb63f7..4ebba492a3 100644 --- a/deal.II/examples/step-5/step-5.cc +++ b/deal.II/examples/step-5/step-5.cc @@ -354,8 +354,8 @@ void LaplaceProblem::assemble_system () // variable for: std::vector coefficient_values (n_q_points); - DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), + endc = dof_handler.end(); for (; cell!=endc; ++cell) { cell_matrix.clear (); diff --git a/deal.II/examples/step-6/step-6.cc b/deal.II/examples/step-6/step-6.cc index 163abefa1c..45c98acbc9 100644 --- a/deal.II/examples/step-6/step-6.cc +++ b/deal.II/examples/step-6/step-6.cc @@ -490,8 +490,8 @@ void LaplaceProblem::assemble_system () // the user of the ``fe_values'' // object, the actual finite // element type is transparent. - DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), + endc = dof_handler.end(); for (; cell!=endc; ++cell) { cell_matrix.clear (); diff --git a/deal.II/examples/step-7/step-7.cc b/deal.II/examples/step-7/step-7.cc index 3389fefbd1..068f017ba7 100644 --- a/deal.II/examples/step-7/step-7.cc +++ b/deal.II/examples/step-7/step-7.cc @@ -821,8 +821,8 @@ void LaplaceProblem::assemble_system () // from previous examples, so we // only comment on the things that // have changed. - DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), + endc = dof_handler.end(); for (; cell!=endc; ++cell) { cell_matrix.clear (); @@ -1374,8 +1374,8 @@ void LaplaceProblem::run () // all faces on Gamma2, // irrespective whether // they are active or not. - Triangulation::cell_iterator cell = triangulation.begin (), - endc = triangulation.end(); + typename Triangulation::cell_iterator cell = triangulation.begin (), + endc = triangulation.end(); for (; cell!=endc; ++cell) for (unsigned int face=0; face::faces_per_cell; ++face) if ((cell->face(face)->center()(0) == -1) diff --git a/deal.II/examples/step-8/step-8.cc b/deal.II/examples/step-8/step-8.cc index 97d27c551c..9605840eab 100644 --- a/deal.II/examples/step-8/step-8.cc +++ b/deal.II/examples/step-8/step-8.cc @@ -502,8 +502,8 @@ void ElasticProblem::assemble_system () // Now we can begin with the loop // over all cells: - DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), - endc = dof_handler.end(); + typename DoFHandler::active_cell_iterator cell = dof_handler.begin_active(), + endc = dof_handler.end(); for (; cell!=endc; ++cell) { cell_matrix.clear (); diff --git a/deal.II/examples/step-9/step-9.cc b/deal.II/examples/step-9/step-9.cc index 89e0cb51d3..b3356eebd9 100644 --- a/deal.II/examples/step-9/step-9.cc +++ b/deal.II/examples/step-9/step-9.cc @@ -119,8 +119,8 @@ class AdvectionProblem // which it shall operate, and // the one past the last. void assemble_system (); - void assemble_system_interval (const DoFHandler::active_cell_iterator &begin, - const DoFHandler::active_cell_iterator &end); + void assemble_system_interval (const typename DoFHandler::active_cell_iterator &begin, + const typename DoFHandler::active_cell_iterator &end); // The following functions again // are as in previous examples, @@ -768,9 +768,9 @@ void AdvectionProblem::assemble_system () // this. In fact, it does this not // only for a range of cell // iterators, but for iterators in - // general, so you could use for - // ``std::vector::iterator'' or usual - // pointers as well. + // general, so you could use it for + // ``std::vector::iterator'' or + // usual pointers as well. // // The function returns a vector of // pairs of iterators, where the @@ -893,8 +893,8 @@ void AdvectionProblem::assemble_system () template void AdvectionProblem:: -assemble_system_interval (const DoFHandler::active_cell_iterator &begin, - const DoFHandler::active_cell_iterator &end) +assemble_system_interval (const typename DoFHandler::active_cell_iterator &begin, + const typename DoFHandler::active_cell_iterator &end) { // First of all, we will need some // objects that describe boundary @@ -980,7 +980,7 @@ assemble_system_interval (const DoFHandler::active_cell_iterator &begin, // Then we start the main loop over // the cells: - DoFHandler::active_cell_iterator cell; + typename DoFHandler::active_cell_iterator cell; for (cell=begin; cell!=end; ++cell) { // First clear old contents of