From 79b8bf58ba278fc2f1a72515ae56969a377f3811 Mon Sep 17 00:00:00 2001 From: Ralf Hartmann Date: Mon, 20 Feb 2006 08:59:29 +0000 Subject: [PATCH] Make push_back a void function to match the std. git-svn-id: https://svn.dealii.org/trunk@12425 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/fe/fe_collection.h | 3 +-- .../deal.II/include/fe/mapping_collection.h | 2 +- deal.II/deal.II/include/fe/q_collection.h | 2 +- deal.II/deal.II/source/fe/fe_collection.cc | 4 +--- .../deal.II/source/fe/mapping_collection.cc | 4 +--- deal.II/deal.II/source/fe/q_collection.cc | 6 ++---- deal.II/examples/step-21/step-21.cc | 21 +++++++++---------- 7 files changed, 17 insertions(+), 25 deletions(-) diff --git a/deal.II/deal.II/include/fe/fe_collection.h b/deal.II/deal.II/include/fe/fe_collection.h index 44e85df47f..364f6e2f02 100644 --- a/deal.II/deal.II/include/fe/fe_collection.h +++ b/deal.II/deal.II/include/fe/fe_collection.h @@ -60,8 +60,7 @@ namespace hp * components as all other elements * already in the collection. */ - unsigned int - push_back (const FiniteElement &new_fe); + void push_back (const FiniteElement &new_fe); /** * Get a reference to the given element diff --git a/deal.II/deal.II/include/fe/mapping_collection.h b/deal.II/deal.II/include/fe/mapping_collection.h index a0034f8abc..01951c1f9c 100644 --- a/deal.II/deal.II/include/fe/mapping_collection.h +++ b/deal.II/deal.II/include/fe/mapping_collection.h @@ -100,7 +100,7 @@ namespace hp * first, followed by the mapping * object for active_fe_index 1. */ - unsigned int push_back (const Mapping &new_mapping); + void push_back (const Mapping &new_mapping); private: /** diff --git a/deal.II/deal.II/include/fe/q_collection.h b/deal.II/deal.II/include/fe/q_collection.h index b0d5a7a45a..a3cc366e3e 100644 --- a/deal.II/deal.II/include/fe/q_collection.h +++ b/deal.II/deal.II/include/fe/q_collection.h @@ -99,7 +99,7 @@ namespace hp * this object upon destruction of the * entire collection. */ - unsigned int push_back (const Quadrature &new_quadrature); + void push_back (const Quadrature &new_quadrature); /** * Determine an estimate for the diff --git a/deal.II/deal.II/source/fe/fe_collection.cc b/deal.II/deal.II/source/fe/fe_collection.cc index 98274df165..17f6dc310b 100644 --- a/deal.II/deal.II/source/fe/fe_collection.cc +++ b/deal.II/deal.II/source/fe/fe_collection.cc @@ -18,7 +18,7 @@ namespace hp { template - unsigned int FECollection::push_back (const FiniteElement &new_fe) + void FECollection::push_back (const FiniteElement &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 >(new_fe.clone())); - - return finite_elements.size (); } diff --git a/deal.II/deal.II/source/fe/mapping_collection.cc b/deal.II/deal.II/source/fe/mapping_collection.cc index e37a72947b..e728e81ad1 100644 --- a/deal.II/deal.II/source/fe/mapping_collection.cc +++ b/deal.II/deal.II/source/fe/mapping_collection.cc @@ -61,7 +61,7 @@ namespace hp template - unsigned int + void MappingCollection::push_back (const Mapping &new_mapping) { // A MappingCollection, which was @@ -72,8 +72,6 @@ namespace hp mappings .push_back (boost::shared_ptr >(new_mapping.clone())); - - return mappings.size (); } diff --git a/deal.II/deal.II/source/fe/q_collection.cc b/deal.II/deal.II/source/fe/q_collection.cc index 8f428bb906..384fed1e12 100644 --- a/deal.II/deal.II/source/fe/q_collection.cc +++ b/deal.II/deal.II/source/fe/q_collection.cc @@ -68,9 +68,8 @@ namespace hp template - unsigned int - QCollection:: - push_back (const Quadrature &new_quadrature) + void + QCollection::push_back (const Quadrature &new_quadrature) { // A QCollection, which was initialized // as single QCollection cannot @@ -79,7 +78,6 @@ namespace hp quadratures .push_back (boost::shared_ptr >(new Quadrature(new_quadrature))); - return quadratures.size (); } diff --git a/deal.II/examples/step-21/step-21.cc b/deal.II/examples/step-21/step-21.cc index 46baf65816..ffd63f02da 100644 --- a/deal.II/examples/step-21/step-21.cc +++ b/deal.II/examples/step-21/step-21.cc @@ -662,20 +662,19 @@ DGMethod::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 (i)); - quadratures.push_back (QGauss (i+2)); - face_quadratures.push_back (QGauss (i+2)); + fe_collection.push_back (FE_DGQ (i)); + quadratures.push_back (QGauss (i+2)); + face_quadratures.push_back (QGauss (i+2)); } - static const MappingQ1 mapping; - mapping_collection.push_back (mapping); + static const MappingQ1 mapping; + mapping_collection.push_back (mapping); } -- 2.39.5