From e50084f3353e7dd9c469be16621134c47eb46eaf Mon Sep 17 00:00:00 2001 From: Ralf Hartmann Date: Tue, 21 Feb 2006 15:23:29 +0000 Subject: [PATCH] mapping_collection is now a SmartPointer. Remove default_mapping. Use hp::StaticMappingQ1::mapping_collection instead. git-svn-id: https://svn.dealii.org/trunk@12441 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/fe/hp_fe_values.h | 10 +--------- deal.II/deal.II/source/fe/hp_fe_values.cc | 16 +++++----------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/deal.II/deal.II/include/fe/hp_fe_values.h b/deal.II/deal.II/include/fe/hp_fe_values.h index b8a3862954..e2d6871c39 100644 --- a/deal.II/deal.II/include/fe/hp_fe_values.h +++ b/deal.II/deal.II/include/fe/hp_fe_values.h @@ -155,14 +155,6 @@ namespace internal template class FEValuesBase { - private: - /** - * Default mapping, in case - * none was provided through - * the call to the constructor. - */ - static const MappingQ1 default_mapping; - public: /** * Constructor. Set the fields @@ -195,7 +187,7 @@ namespace internal * upon construction of the * object. */ - const ::hp::MappingCollection mapping_collection; + SmartPointer > mapping_collection; /** * Copy of the quadrature diff --git a/deal.II/deal.II/source/fe/hp_fe_values.cc b/deal.II/deal.II/source/fe/hp_fe_values.cc index 0f55bb9afd..ad8fc8b421 100644 --- a/deal.II/deal.II/source/fe/hp_fe_values.cc +++ b/deal.II/deal.II/source/fe/hp_fe_values.cc @@ -54,19 +54,13 @@ namespace internal // -------------------------- FEValuesBase ------------------------- - template - const MappingQ1 - FEValuesBase::default_mapping; - - - template FEValuesBase::FEValuesBase ( const ::hp::MappingCollection &mapping_collection, const ::hp::QCollection &q_collection, const UpdateFlags update_flags) : - mapping_collection (mapping_collection), + mapping_collection (&mapping_collection), q_collection (q_collection), update_flags (update_flags) {} @@ -76,7 +70,7 @@ namespace internal FEValuesBase::FEValuesBase (const ::hp::QCollection &q_collection, const UpdateFlags update_flags) : - mapping_collection (default_mapping), + mapping_collection (&::hp::StaticMappingQ1::mapping_collection), q_collection (q_collection), update_flags (update_flags) {} @@ -130,7 +124,7 @@ namespace hp const unsigned int active_fe_index) const { return new ::FEValues ( - this->mapping_collection[active_fe_index], fe, + (*this->mapping_collection)[active_fe_index], fe, this->q_collection[active_fe_index], this->update_flags); } @@ -187,7 +181,7 @@ namespace hp const unsigned int active_fe_index) const { return new ::FEFaceValues ( - this->mapping_collection[active_fe_index], fe, + (*this->mapping_collection)[active_fe_index], fe, this->q_collection[active_fe_index], this->update_flags); } @@ -246,7 +240,7 @@ namespace hp const unsigned int active_fe_index) const { return new ::FESubfaceValues ( - this->mapping_collection[active_fe_index], fe, + (*this->mapping_collection)[active_fe_index], fe, this->q_collection[active_fe_index], this->update_flags); } } -- 2.39.5