From: David Wells Date: Mon, 19 Oct 2015 12:38:06 +0000 (-0400) Subject: Use FEValuesType, not FEValues, in templates. X-Git-Tag: v8.4.0-rc2~254^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bc6b37da069af103e42262562f7507fd52e6361;p=dealii.git Use FEValuesType, not FEValues, in templates. This makes things less ambiguous because 'FEValues' is a valid class name. --- diff --git a/include/deal.II/hp/fe_values.h b/include/deal.II/hp/fe_values.h index 3093d11267..936499d23f 100644 --- a/include/deal.II/hp/fe_values.h +++ b/include/deal.II/hp/fe_values.h @@ -56,7 +56,7 @@ namespace internal * * @author Wolfgang Bangerth, 2003 */ - template + template class FEValuesBase { public: @@ -64,16 +64,16 @@ namespace internal * Constructor. Set the fields of this class to the values indicated by * the parameters to the constructor. */ - FEValuesBase (const dealii::hp::MappingCollection &mapping_collection, - const dealii::hp::FECollection &fe_collection, + FEValuesBase (const dealii::hp::MappingCollection &mapping_collection, + const dealii::hp::FECollection &fe_collection, const dealii::hp::QCollection &q_collection, - const UpdateFlags update_flags); + const dealii::UpdateFlags update_flags); /** * Constructor. This constructor is equivalent to the other one except * that it makes the object use a $Q_1$ mapping (i.e., an object of * type MappingQGeneric(1)) implicitly. */ - FEValuesBase (const dealii::hp::FECollection &fe_collection, + FEValuesBase (const dealii::hp::FECollection &fe_collection, const dealii::hp::QCollection &q_collection, const UpdateFlags update_flags); @@ -81,13 +81,13 @@ namespace internal * Get a reference to the collection of finite element objects used * here. */ - const dealii::hp::FECollection & + const dealii::hp::FECollection & get_fe_collection () const; /** * Get a reference to the collection of mapping objects used here. */ - const dealii::hp::MappingCollection & + const dealii::hp::MappingCollection & get_mapping_collection () const; /** @@ -107,7 +107,7 @@ namespace internal * you called the @p reinit function of the hp::FE*Values class * the last time. */ - const FEValues &get_present_fe_values () const; + const FEValuesType &get_present_fe_values () const; protected: @@ -118,7 +118,7 @@ namespace internal * The function returns a writable reference so that derived classes can * also reinit() the selected FEValues object. */ - FEValues & + FEValuesType & select_fe_values (const unsigned int fe_index, const unsigned int mapping_index, const unsigned int q_index); @@ -127,14 +127,14 @@ namespace internal /** * A pointer to the collection of finite elements to be used. */ - const SmartPointer, - FEValuesBase > fe_collection; + const SmartPointer, + FEValuesBase > fe_collection; /** * A pointer to the collection of mappings to be used. */ - const SmartPointer, - FEValuesBase > mapping_collection; + const SmartPointer, + FEValuesBase > mapping_collection; /** * Copy of the quadrature collection object provided to the constructor. @@ -153,7 +153,7 @@ namespace internal * Initially, all entries have zero pointers, and we will allocate them * lazily as needed in select_fe_values(). */ - dealii::Table<3,std_cxx11::shared_ptr > fe_values_table; + dealii::Table<3,std_cxx11::shared_ptr > fe_values_table; /** * Set of indices pointing at the fe_values object selected last time @@ -595,50 +595,50 @@ namespace internal { namespace hp { - template + template inline - const FEValues & - FEValuesBase::get_present_fe_values () const + const FEValuesType & + FEValuesBase::get_present_fe_values () const { return *fe_values_table(present_fe_values_index); } - template + template inline - const dealii::hp::FECollection & - FEValuesBase::get_fe_collection () const + const dealii::hp::FECollection & + FEValuesBase::get_fe_collection () const { return *fe_collection; } - template + template inline - const dealii::hp::MappingCollection & - FEValuesBase::get_mapping_collection () const + const dealii::hp::MappingCollection & + FEValuesBase::get_mapping_collection () const { return *mapping_collection; } - template + template inline const dealii::hp::QCollection & - FEValuesBase::get_quadrature_collection () const + FEValuesBase::get_quadrature_collection () const { return q_collection; } - template + template inline dealii::UpdateFlags - FEValuesBase::get_update_flags () const + FEValuesBase::get_update_flags () const { return update_flags; } diff --git a/source/hp/fe_values.cc b/source/hp/fe_values.cc index c1c17da956..d86382ad24 100644 --- a/source/hp/fe_values.cc +++ b/source/hp/fe_values.cc @@ -25,12 +25,12 @@ namespace internal { // -------------------------- FEValuesBase ------------------------- - template - FEValuesBase:: - FEValuesBase (const dealii::hp::MappingCollection &mapping_collection, - const dealii::hp::FECollection &fe_collection, - const dealii::hp::QCollection &q_collection, - const UpdateFlags update_flags) + template + FEValuesBase::FEValuesBase + (const dealii::hp::MappingCollection &mapping_collection, + const dealii::hp::FECollection &fe_collection, + const dealii::hp::QCollection &q_collection, + const UpdateFlags update_flags) : fe_collection (&fe_collection), mapping_collection (&mapping_collection), @@ -45,14 +45,14 @@ namespace internal {} - template - FEValuesBase:: - FEValuesBase (const dealii::hp::FECollection &fe_collection, - const dealii::hp::QCollection &q_collection, - const UpdateFlags update_flags) + template + FEValuesBase::FEValuesBase + (const dealii::hp::FECollection &fe_collection, + const dealii::hp::QCollection &q_collection, + const UpdateFlags update_flags) : fe_collection (&fe_collection), - mapping_collection (&dealii::hp::StaticMappingQ1:: + mapping_collection (&dealii::hp::StaticMappingQ1:: mapping_collection), q_collection (q_collection), fe_values_table (fe_collection.size(), @@ -66,12 +66,12 @@ namespace internal - template - FEValues & - FEValuesBase:: - select_fe_values (const unsigned int fe_index, - const unsigned int mapping_index, - const unsigned int q_index) + template + FEValuesType & + FEValuesBase::select_fe_values + (const unsigned int fe_index, + const unsigned int mapping_index, + const unsigned int q_index) { Assert (fe_index < fe_collection->size(), ExcIndexRange (fe_index, 0, fe_collection->size())); @@ -94,11 +94,11 @@ namespace internal if (fe_values_table(present_fe_values_index).get() == 0) fe_values_table(present_fe_values_index) = - std_cxx11::shared_ptr - (new FEValues ((*mapping_collection)[mapping_index], - (*fe_collection)[fe_index], - q_collection[q_index], - update_flags)); + std_cxx11::shared_ptr + (new FEValuesType ((*mapping_collection)[mapping_index], + (*fe_collection)[fe_index], + q_collection[q_index], + update_flags)); // now there definitely is one! return *fe_values_table(present_fe_values_index);