]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Mark more variables const 5294/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 20 Oct 2017 23:40:37 +0000 (01:40 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 21 Oct 2017 09:58:06 +0000 (11:58 +0200)
source/base/data_out_base.cc
source/fe/fe_dgq.cc
source/fe/fe_q_base.cc
source/multigrid/mg_transfer_internal.cc

index e2005c9bf2bda05b08a59104bb64fcfd867715ad..50ebc4c5dbcc4515d85b375aeef03173c02a923f 100644 (file)
@@ -7549,7 +7549,7 @@ merge (const DataOutReader<dim,spacedim> &source)
   typedef typename dealii::DataOutBase::Patch<dim,spacedim> Patch;
 
 
-  const std::vector<Patch> source_patches = source.get_patches ();
+  const std::vector<Patch> &source_patches = source.get_patches ();
   Assert (patches.size () != 0,        DataOutBase::ExcNoPatches ());
   Assert (source_patches.size () != 0, DataOutBase::ExcNoPatches ());
   // check equality of component
index 80c9c8ea993a980193fa71ca2b0c9d13e0485d4c..31189df18882d919efe132d544837c896650034c 100644 (file)
@@ -698,7 +698,7 @@ FE_DGQArbitraryNodes<dim,spacedim>::FE_DGQArbitraryNodes (const Quadrature<1> &p
 {
   Assert (points.size() > 0,
           (typename FiniteElement<dim, spacedim>::ExcFEHasNoSupportPoints ()));
-  Quadrature<dim> support_quadrature(points);
+  const Quadrature<dim> support_quadrature(points);
   this->unit_support_points = support_quadrature.get_points();
 }
 
index ba09eb8798946cb52af354aeeaec659d4db2a3dc..4040f6b8d0d541b10ce6184fdece1fa891d4cc96 100644 (file)
@@ -909,7 +909,7 @@ void FE_Q_Base<PolynomialType,dim,spacedim>::initialize_unit_support_points
     this->poly_space.get_numbering_inverse();
 
   Quadrature<1> support_1d(points);
-  Quadrature<dim> support_quadrature(support_1d);
+  const Quadrature<dim> support_quadrature(support_1d);
   this->unit_support_points.resize(support_quadrature.size());
 
   for (unsigned int k=0; k<support_quadrature.size(); k++)
@@ -933,7 +933,7 @@ void FE_Q_Base<PolynomialType,dim,spacedim>::initialize_unit_face_support_points
   std::vector<unsigned int> face_index_map =
     internal::FE_Q_Base::face_lexicographic_to_hierarchic_numbering<dim>(q_degree);
   Quadrature<1> support_1d(points);
-  Quadrature<codim> support_quadrature(support_1d);
+  const Quadrature<codim> support_quadrature(support_1d);
   this->unit_face_support_points.resize(support_quadrature.size());
 
   for (unsigned int k=0; k<support_quadrature.size(); k++)
index b0ef61090d9dfe3bc183094892d1bf99fc2171e1..15a907f32359f12e8d282d80ed808701d8068cf0 100644 (file)
@@ -167,7 +167,7 @@ namespace internal
           // The list of neighbors is symmetric (our neighbors have us as a
           // neighbor), so we can use it to send and to know how many messages
           // we will get.
-          std::set<types::subdomain_id> neighbors = tria->level_ghost_owners();
+          const std::set<types::subdomain_id> &neighbors = tria->level_ghost_owners();
           std::map<int, std::vector<DoFPair> > send_data;
 
           // * find owners of the level dofs and insert into send_data accordingly
@@ -306,7 +306,7 @@ namespace internal
         {
           // shift the local number of the copy indices according to the new
           // partitioner that we are going to use for the vector
-          const std::shared_ptr<const Utilities::MPI::Partitioner> part
+          const std::shared_ptr<const Utilities::MPI::Partitioner> &part
             = ghosted_level_vector.get_partitioner();
           ghosted_dofs.add_indices(part->ghost_indices());
           for (unsigned int i=0; i<copy_indices_global_mine.size(); ++i)

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.