]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove single_mapping mode, since the hp::FEValues classes are now smart
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 23 Feb 2006 01:23:56 +0000 (01:23 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 23 Feb 2006 01:23:56 +0000 (01:23 +0000)
enough to detect these cases themselves.

git-svn-id: https://svn.dealii.org/trunk@12466 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 80f972f37dfcdc4096cc23ecab6c1795c9753382..93ed6bdbb9f69b38b7a1b1a9ac904878d5177d6b 100644 (file)
@@ -31,14 +31,17 @@ namespace hp
  * It implements the concepts stated in the @ref hpcollection module described
  * in the doxygen documentation.
  * 
- * Although it is recommended to supply an appropriate mapping for each finite
- * element kind used in a hp-computation, the MappingCollection class
- * implements a conversion constructor from a single mapping.  Therefore it is
- * possible to offer only a single mapping to the hp::FEValues class instead of
- * a hp::MappingCollection. This is for the convenience of the user, as many
- * simple geometries do not require different mappings along the boundary to
- * achieve optimal convergence rates.  Hence providing a single mapping object
- * will usually suffice.
+ * Although it is recommended to supply an appropriate mapping for
+ * each finite element kind used in a hp-computation, the
+ * MappingCollection class implements a conversion constructor from a
+ * single mapping.  Therefore it is possible to offer only a single
+ * mapping to the hp::FEValues class instead of a
+ * hp::MappingCollection. This is for the convenience of the user, as
+ * many simple geometries do not require different mappings along the
+ * boundary to achieve optimal convergence rates.  Hence providing a
+ * single mapping object will usually suffice. See the hp::FEValues
+ * class for the rules which mapping will be selected for a given
+ * cell.
  * 
  * @ingroup hp hpcollection
  * 
@@ -56,11 +59,14 @@ namespace hp
 
                                        /**
                                         * Conversion constructor. This
-                                        * constructor creates a MappingCollection
-                                        * from a single mapping. In
-                                        * the newly created MappingCollection, this
-                                        * mapping is used for all active_fe
-                                        * indices.
+                                        * constructor creates a
+                                        * MappingCollection from a
+                                        * single mapping. More
+                                        * mappings can be added with
+                                        * push_back(), if desired,
+                                        * though it would probably be
+                                        * clearer to add all mappings
+                                        * the same way.
                                         */
       MappingCollection (const Mapping<dim> &mapping);
 
@@ -109,20 +115,6 @@ namespace hp
       unsigned int memory_consumption () const;
 
     private:
-                                       /**
-                                        * Upon construction of a
-                                        * <tt>MappingCollection</tt> the later
-                                        * functionality of the class is
-                                        * specified.  Either it is a real
-                                        * collection, which provides different
-                                        * mappings for each active_fe_index or
-                                        * its a "unreal" collection, which
-                                        * returns a the same mapping for all
-                                        * active_fe_indices.  This boolean
-                                        * remembers which type this object is.
-                                        */
-      const bool single_mapping;
-
                                        /**
                                         * The real container, which stores
                                         * pointers to the different Mapping
index 055c746d00852adda02f05971aabb7f5bb23363c..19456a5b95801d7239ba8306f3011f1b7d47c8f3 100644 (file)
@@ -19,16 +19,13 @@ namespace hp
 {
 
   template <int dim>
-  MappingCollection<dim>::MappingCollection () :
-                  single_mapping (false)
+  MappingCollection<dim>::MappingCollection ()
   {
   }
 
 
   template <int dim>
   MappingCollection<dim>::MappingCollection (const Mapping<dim> &mapping)
-                  :
-                  single_mapping (true)
   {
     mappings
       .push_back (boost::shared_ptr<const Mapping<dim> >(mapping.clone()));
@@ -40,14 +37,9 @@ namespace hp
   const Mapping<dim> &
   MappingCollection<dim>::operator[] (const unsigned int index) const
   {
-    if (single_mapping)
-      return *mappings[0];
-    else
-      {
-       Assert (index < mappings.size (),
-               ExcIndexRange (index, 0, mappings.size ()));
-       return *mappings[index];
-      }
+    Assert (index < mappings.size (),
+            ExcIndexRange (index, 0, mappings.size ()));
+    return *mappings[index];
   }
 
 
@@ -64,12 +56,6 @@ namespace hp
   void
   MappingCollection<dim>::push_back (const Mapping<dim> &new_mapping)
   {
-                                     // A MappingCollection, which was
-                                     // initialized as single
-                                     // MappingCollection cannot administrate
-                                     // other Mappings.
-    Assert (!single_mapping, ExcNotInitialized ());
-    
     mappings
       .push_back (boost::shared_ptr<const Mapping<dim> >(new_mapping.clone()));
   }

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.