]> https://gitweb.dealii.org/ - dealii.git/commitdiff
mapping_collection is now a SmartPointer. Remove default_mapping. Use hp::StaticMappi...
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Tue, 21 Feb 2006 15:23:29 +0000 (15:23 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Tue, 21 Feb 2006 15:23:29 +0000 (15:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@12441 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/hp_fe_values.h
deal.II/deal.II/source/fe/hp_fe_values.cc

index b8a3862954bdcf5dc5a94f977767c1aadfcd99d4..e2d6871c3960b0c76d78adc1a95a98fae4fdb3b4 100644 (file)
@@ -155,14 +155,6 @@ namespace internal
     template <int dim, int q_dim>
     class FEValuesBase 
     {
-      private:
-                                         /**
-                                          * Default mapping, in case
-                                          * none was provided through
-                                          * the call to the constructor.
-                                          */
-        static const MappingQ1<dim> default_mapping;
-
       public:
                                          /**
                                           * Constructor. Set the fields
@@ -195,7 +187,7 @@ namespace internal
                                           * upon construction of the
                                           * object.
                                           */
-        const ::hp::MappingCollection<dim> mapping_collection;
+        SmartPointer<const ::hp::MappingCollection<dim> > mapping_collection;
     
                                          /**
                                           * Copy of the quadrature
index 0f55bb9afd3afad89603adef50d7b047b76a20fc..ad8fc8b421b2fc6c6aecd4cf3bc339b2cf685cd3 100644 (file)
@@ -54,19 +54,13 @@ namespace internal
 
 // -------------------------- FEValuesBase -------------------------
 
-    template <int dim, int q_dim>
-    const MappingQ1<dim>
-    FEValuesBase<dim,q_dim>::default_mapping;
-
-  
-
     template <int dim, int q_dim>
     FEValuesBase<dim,q_dim>::FEValuesBase (
       const ::hp::MappingCollection<dim> &mapping_collection,
       const ::hp::QCollection<q_dim>     &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<dim,q_dim>::FEValuesBase (const ::hp::QCollection<q_dim> &q_collection,
                                            const UpdateFlags         update_flags)
                     :
-                    mapping_collection (default_mapping),
+                    mapping_collection (&::hp::StaticMappingQ1<dim>::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<dim> (
-      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<dim> (
-      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<dim> (
-      this->mapping_collection[active_fe_index], fe,
+      (*this->mapping_collection)[active_fe_index], fe,
       this->q_collection[active_fe_index], this->update_flags);
   }
 }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.