]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make push_back a void function to match the std.
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 20 Feb 2006 08:59:29 +0000 (08:59 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 20 Feb 2006 08:59:29 +0000 (08:59 +0000)
git-svn-id: https://svn.dealii.org/trunk@12425 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/examples/step-21/step-21.cc

index 44e85df47feefe3f1459fe61ce08d674161c8213..364f6e2f02985f7cb8ccd71a409d118ffe2eddb4 100644 (file)
@@ -60,8 +60,7 @@ namespace hp
                                         * components as all other elements
                                         * already in the collection.
                                         */
-      unsigned int
-      push_back (const FiniteElement<dim> &new_fe);
+      void push_back (const FiniteElement<dim> &new_fe);
 
                                        /**
                                         * Get a reference to the given element
index a0034f8abc2e5505552ce8d1bab64739a65f82ae..01951c1f9c9f3f988848dad08c90231cae81d8d1 100644 (file)
@@ -100,7 +100,7 @@ namespace hp
                                         * first, followed by the mapping
                                         * object for active_fe_index 1.
                                         */
-      unsigned int push_back (const Mapping<dim> &new_mapping);
+      void push_back (const Mapping<dim> &new_mapping);
 
     private:
                                        /**
index b0d5a7a45a66b6562a2eadf01716e2232299156d..a3cc366e3efd88024fdc7b9e82c8a74808670f58 100644 (file)
@@ -99,7 +99,7 @@ namespace hp
                                         * this object upon destruction of the
                                         * entire collection.
                                         */
-      unsigned int push_back (const Quadrature<dim> &new_quadrature);
+      void push_back (const Quadrature<dim> &new_quadrature);
     
                                        /**
                                         * Determine an estimate for the
index 98274df165a20ae370f200cadeb86e4606334e00..17f6dc310b64cc1aee59f343235d55a6b84f0d8a 100644 (file)
@@ -18,7 +18,7 @@
 namespace hp
 {
   template <int dim>
-  unsigned int FECollection<dim>::push_back (const FiniteElement<dim> &new_fe)
+  void FECollection<dim>::push_back (const FiniteElement<dim> &new_fe)
   {
                                      // check that the new element has the right
                                      // number of components. only check with
@@ -32,8 +32,6 @@ namespace hp
   
     finite_elements
       .push_back (boost::shared_ptr<const FiniteElement<dim> >(new_fe.clone()));
-    
-    return finite_elements.size ();
   }
 
 
index e37a72947bed8a57602cf4436efa1f23a9ef0bc4..e728e81ad1bc091408568f1a32ef632a19e4c81b 100644 (file)
@@ -61,7 +61,7 @@ namespace hp
 
 
   template <int dim>
-  unsigned int
+  void
   MappingCollection<dim>::push_back (const Mapping<dim> &new_mapping)
   {
                                      // A MappingCollection, which was
@@ -72,8 +72,6 @@ namespace hp
     
     mappings
       .push_back (boost::shared_ptr<const Mapping<dim> >(new_mapping.clone()));
-
-    return mappings.size ();
   }
 
 
index 8f428bb90663d529f8da8ae855352a7e548b9388..384fed1e12f0ba48879773c464faa01093988110 100644 (file)
@@ -68,9 +68,8 @@ namespace hp
 
 
   template <int dim>
-  unsigned int
-  QCollection<dim>::
-  push_back (const Quadrature<dim> &new_quadrature)
+  void
+  QCollection<dim>::push_back (const Quadrature<dim> &new_quadrature)
   {
                                      // A QCollection, which was initialized
                                      // as single QCollection cannot
@@ -79,7 +78,6 @@ namespace hp
 
     quadratures
       .push_back (boost::shared_ptr<const Quadrature<dim> >(new Quadrature<dim>(new_quadrature)));
-    return quadratures.size ();
   }
 
 
index 46baf658160a46dc5220bb3cf44f9eb94940c9ee..ffd63f02da75435599fc9702161e63c5f4aca417 100644 (file)
@@ -662,20 +662,19 @@ DGMethod<dim>::DGMethod ()
                dof_handler (triangulation),
                dg ()
 {
-                                    // Change here for hp
-                                    // methods of
-                                    // different maximum degrees.
-    const unsigned int hp_degree = 5;
-    unsigned int elm_no;
-    for (unsigned int i = 0; i < hp_degree; ++i)
+                                  // Change here for hp
+                                  // methods of
+                                  // different maximum degrees.
+  const unsigned int hp_degree = 5;
+  for (unsigned int i = 0; i < hp_degree; ++i)
     {
-       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));
+      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.push_back (mapping);
+  static const MappingQ1<dim> mapping;
+  mapping_collection.push_back (mapping);
 }
 
 

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.