]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Rename the *Collection::add_* functions to push_back().
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 17 Feb 2006 21:51:29 +0000 (21:51 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 17 Feb 2006 21:51:29 +0000 (21:51 +0000)
git-svn-id: https://svn.dealii.org/trunk@12401 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe_collection.h
deal.II/deal.II/include/fe/mapping_collection.h
deal.II/deal.II/include/fe/q_collection.h
deal.II/deal.II/source/fe/fe_collection.cc
deal.II/deal.II/source/fe/mapping_collection.cc
deal.II/deal.II/source/fe/q_collection.cc
deal.II/doc/doxygen/headers/hp.h
deal.II/examples/step-21/step-21.cc
tests/hp/crash_01.cc
tests/hp/hp_dof_handler.cc

index 0f2fe622aa39d7c5eb2ec880f5999b0ff8671722..44e85df47feefe3f1459fe61ce08d674161c8213 100644 (file)
@@ -61,7 +61,7 @@ namespace hp
                                         * already in the collection.
                                         */
       unsigned int
-      add_fe (const FiniteElement<dim> &new_fe);
+      push_back (const FiniteElement<dim> &new_fe);
 
                                        /**
                                         * Get a reference to the given element
index 8495ac566c8e9e3a0b6d469e71b0933a7f1cd1fe..a0034f8abc2e5505552ce8d1bab64739a65f82ae 100644 (file)
@@ -100,7 +100,7 @@ namespace hp
                                         * first, followed by the mapping
                                         * object for active_fe_index 1.
                                         */
-      unsigned int add_mapping (const Mapping<dim> &new_mapping);
+      unsigned int push_back (const Mapping<dim> &new_mapping);
 
     private:
                                        /**
index fece6a715fe57003586ef68271ca5d1fb2370b85..b0d5a7a45a66b6562a2eadf01716e2232299156d 100644 (file)
@@ -99,7 +99,7 @@ namespace hp
                                         * this object upon destruction of the
                                         * entire collection.
                                         */
-      unsigned int add_quadrature (const Quadrature<dim> &new_quadrature);
+      unsigned int push_back (const Quadrature<dim> &new_quadrature);
     
                                        /**
                                         * Determine an estimate for the
index 917e3ba2d863c342abc90cd85f648a57b9b3a033..98274df165a20ae370f200cadeb86e4606334e00 100644 (file)
@@ -18,7 +18,7 @@
 namespace hp
 {
   template <int dim>
-  unsigned int FECollection<dim>::add_fe (const FiniteElement<dim> &new_fe)
+  unsigned int FECollection<dim>::push_back (const FiniteElement<dim> &new_fe)
   {
                                      // check that the new element has the right
                                      // number of components. only check with
index 3361a0ff3191f7990bbea5b6d98acbe80277c071..e37a72947bed8a57602cf4436efa1f23a9ef0bc4 100644 (file)
@@ -26,7 +26,8 @@ namespace hp
 
 
   template <int dim>
-  MappingCollection<dim>::MappingCollection (const Mapping<dim> &mapping) :
+  MappingCollection<dim>::MappingCollection (const Mapping<dim> &mapping)
+                  :
                   single_mapping (true)
   {
     mappings
@@ -60,8 +61,8 @@ namespace hp
 
 
   template <int dim>
-  unsigned int MappingCollection<dim>::
-  add_mapping (const Mapping<dim> &new_mapping)
+  unsigned int
+  MappingCollection<dim>::push_back (const Mapping<dim> &new_mapping)
   {
                                      // A MappingCollection, which was
                                      // initialized as single
index 409bbe24715070c3008df02ad3bc749f7ebe1051..8f428bb90663d529f8da8ae855352a7e548b9388 100644 (file)
@@ -68,8 +68,9 @@ namespace hp
 
 
   template <int dim>
-  unsigned int QCollection<dim>::
-  add_quadrature (const Quadrature<dim> &new_quadrature)
+  unsigned int
+  QCollection<dim>::
+  push_back (const Quadrature<dim> &new_quadrature)
   {
                                      // A QCollection, which was initialized
                                      // as single QCollection cannot
index cca41d7369d9559b662e6dd5d0cca0692d1d1d60..1b2ddbc82c89fb7e64b6e140b5858ce68d212487 100644 (file)
  * hp::MappingCollection class allows to do this.
  *
  * All of these three classes, the hp::FECollection, hp::QCollection,
- * and hp::MappingCollection classes, implement a similar
- * interface. They have functions <code>add_*()</code> to add a finite
- * element, quadrature formula, or mapping to the collection. They
- * have an <code>operator[] (unsigned int)</code> function that allows to
+ * and hp::MappingCollection classes, implement an interface very
+ * similar to that of <code>std::vector</code>. They have functions
+ * <code>push_back()</code> to add a finite element, quadrature
+ * formula, or mapping to the collection. They have an
+ * <code>operator[] (unsigned int)</code> function that allows to
  * retrieve a reference to a given element of the collection. And they
  * have a <code>size()</code> function that returns the number of
  * elements in the collection. Some of the classes, in particular that
@@ -63,7 +64,7 @@
  * @verbatim
  *   FECollection<dim> fe_collection;
  *   for (unsigned int degree=1; degree<5; ++degree)
- *     fe_collection.add_fe (FE_Q<dim>(degree));
+ *     fe_collection.push_back (FE_Q<dim>(degree));
  * @endverbatim
  * 
  * This way, one can add elements of polynomial degree 1 through 4 to the
index 6a914020d4116e94de9ff503b749be6899a5be14..46baf658160a46dc5220bb3cf44f9eb94940c9ee 100644 (file)
@@ -669,13 +669,13 @@ DGMethod<dim>::DGMethod ()
     unsigned int elm_no;
     for (unsigned int i = 0; i < hp_degree; ++i)
     {
-       elm_no = fe_collection.add_fe (FE_DGQ<dim> (i));
-       quadratures.add_quadrature (QGauss<dim> (i+2));
-       face_quadratures.add_quadrature (QGauss<dim-1> (i+2));
+       elm_no = fe_collection.push_back (FE_DGQ<dim> (i));
+       quadratures.push_back (QGauss<dim> (i+2));
+       face_quadratures.push_back (QGauss<dim-1> (i+2));
     }
 
     static const MappingQ1<dim> mapping;
-    mapping_collection.add_mapping (mapping);
+    mapping_collection.push_back (mapping);
 }
 
 
index a4e3a9d232269b58af3949f6f17fbaa9f4bafa87..fc607c55630528eec02425e1529d163e3382edd0 100644 (file)
@@ -41,7 +41,7 @@ int main ()
     GridGenerator::hyper_cube(tria);
 
     hp::FECollection<dim> fe_collection;
-    fe_collection.add_fe (FE_DGQ<dim> (1));
+    fe_collection.push_back (FE_DGQ<dim> (1));
 
     hp::DoFHandler<dim> dof_handler(tria);
     dof_handler.distribute_dofs(fe_collection);
@@ -53,7 +53,7 @@ int main ()
     GridGenerator::hyper_cube(tria);
 
     hp::FECollection<dim> fe_collection;
-    fe_collection.add_fe (FE_DGQ<dim> (1));
+    fe_collection.push_back (FE_DGQ<dim> (1));
 
     hp::DoFHandler<dim> dof_handler(tria);
     dof_handler.distribute_dofs(fe_collection);
index e4bd763c793ddcd8ad35115c8582ae8fda5eebd9..3b22efb5ace5616fa0a729deedf05bceded96841 100644 (file)
@@ -40,7 +40,7 @@ int main ()
   GridGenerator::hyper_cube(tria);
 
   hp::FECollection<dim> fe_collection;
-  fe_collection.add_fe (FE_DGQ<dim> (1));
+  fe_collection.push_back (FE_DGQ<dim> (1));
 
   hp::DoFHandler<dim> dof_handler(tria);
   

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.