]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make variables const and thus Intel C++ compiler more happy.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 May 2001 12:07:52 +0000 (12:07 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 17 May 2001 12:07:52 +0000 (12:07 +0000)
git-svn-id: https://svn.dealii.org/trunk@4631 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe_system.h
deal.II/deal.II/include/fe/mapping_cartesian.h
deal.II/deal.II/include/grid/tria.h
deal.II/deal.II/source/fe/fe_system.cc
deal.II/deal.II/source/fe/mapping_q1.cc
deal.II/deal.II/source/grid/grid_out.cc
deal.II/deal.II/source/grid/grid_reordering.cc
deal.II/deal.II/source/grid/tria.cc

index f28bf4177ff665245cdfd8f26dc75228780640ef..88a68da9f31274b08c5a4b6884077414d1b65eb9 100644 (file)
@@ -260,9 +260,9 @@ class FESystem : public FiniteElement<dim>
                                      * independent of the cell.
                                      */
     virtual typename Mapping<dim>::InternalDataBase*
-    get_data (const UpdateFlags,
-             const Mapping<dim>mapping,
-             const Quadrature<dim>quadrature) const ;
+    get_data (const UpdateFlags      update_flags,
+             const Mapping<dim>    &mapping,
+             const Quadrature<dim> &quadrature) const ;
 
                                     /**
                                      * Implementation of the same
@@ -574,7 +574,7 @@ class FESystem : public FiniteElement<dim>
                                          * (see e.g. @p{FE_Q}
                                          * classes).
                                          */
-       void delete_fe_values_data(unsigned int base_no);
+       void delete_fe_values_data (const unsigned int base_no);
        
       private:
        
index 7be76a844642221b8511f9363211717b1351eb67..0ed6799179cfca6d3b4598f8ade7365aca1e4d18 100644 (file)
@@ -248,10 +248,9 @@ class MappingCartesian : public Mapping<dim>
                                      * Do the computation for the
                                      * @p{fill_*} functions.
                                      */
-    void compute_fill (const typename DoFHandler<dim>::cell_iterator
-                      &cell,
-                      unsigned int face_no,
-                      unsigned int sub_no,
+    void compute_fill (const typename DoFHandler<dim>::cell_iterator &cell,
+                      const unsigned int face_no,
+                      const unsigned int sub_no,
                       InternalData& data,
                       std::vector<Point<dim> > &quadrature_points,
                       std::vector<Point<dim> >& normal_vectors) const;
index 457ca134f596cfb32fe9052508e968697c514b14..af67385f3be41e5ab19bbfb273992f034b3ddf88 100644 (file)
@@ -1758,7 +1758,7 @@ class Triangulation : public TriaDimensionInfo<dim>,
                                      * approximation by a piecewise
                                      * straight line.
                                      */
-    void set_boundary (unsigned int         number,
+    void set_boundary (const unsigned int   number,
                       const Boundary<dim> &boundary_object = *straight_boundary);
 
                                     /**
@@ -1768,7 +1768,7 @@ class Triangulation : public TriaDimensionInfo<dim>,
                                      * the same as in
                                      * @p{set_boundary}
                                      */
-    const Boundary<dim> & get_boundary (unsigned int number) const;
+    const Boundary<dim> & get_boundary (const unsigned int number) const;
     
                                     /**
                                      *  Copy a triangulation. This
index bb42c1721678423a9ece3ce35424db6031164d29..1e6c8eed2791bbf54a100c85f39636a0633de47e 100644 (file)
@@ -321,10 +321,12 @@ FESystem<dim>::update_each (const UpdateFlags flags) const
 
 template <int dim>
 typename Mapping<dim>::InternalDataBase *
-FESystem<dim>::get_data (UpdateFlags      flags,
+FESystem<dim>::get_data (const UpdateFlags      flags_,
                         const Mapping<dim>    &mapping,
                         const Quadrature<dim> &quadrature) const
 {
+  UpdateFlags flags = flags_;
+  
   InternalData* data = new InternalData(n_base_elements());
 
   data->update_once = update_once (flags);
index ed1699457c83fccbae3463621fa429991cc6288f..e992094f51f464db652e66d1aa3a7d8d1b2c3108 100644 (file)
@@ -374,7 +374,7 @@ MappingQ1<dim>::get_data (const UpdateFlags update_flags,
 
 template <int dim>
 void
-MappingQ1<dim>::compute_face_data (UpdateFlags update_flags,
+MappingQ1<dim>::compute_face_data (const UpdateFlags update_flags,
                                   const Quadrature<dim>& q,
                                   const unsigned int n_original_q_points,
                                   InternalData& data) const
index 00b1bb30c686a6acde7a9fdf849f41768caab4c1..bf925e48e2c2b936e392ed8355ffc94d2364e328 100644 (file)
@@ -823,7 +823,7 @@ void GridOut::write_eps (const Triangulation<dim> &tria,
 template <int dim>
 void GridOut::write (const Triangulation<dim> &tria,
                     std::ostream             &out,
-                    OutputFormat              output_format,
+                    const OutputFormat        output_format,
                     const Mapping<dim>       *mapping)
 {
   switch (output_format)
@@ -859,4 +859,4 @@ template void GridOut::write_eps (const Triangulation<deal_II_dimension> &,
 #endif
 template void GridOut::write (const Triangulation<deal_II_dimension> &,
                              std::ostream &,
-                             OutputFormat);
+                             const OutputFormat);
index 6286fef6b3c0a0a1c272f1bdd8c5e9a205ba5e70..da8841bd85f04041f67ab1b2d77d136b8d661827 100644 (file)
@@ -714,8 +714,10 @@ template <int dim>
 inline
 void GridReordering<dim>::track_back (typename std::vector<Cell> &cells,
                                      RotationStack              &rotation_states,
-                                     unsigned int                track_back_to_cell)
+                                     const unsigned              tbtc)
 {
+  unsigned int track_back_to_cell = tbtc;
+  
   top_of_function:
   
   Assert (track_back_to_cell > 0, ExcInternalError());
index af652318bd02dc30bdb9197bbb744c7978c8a917..c8fa763988ad6a16f4ff71f37223a7f4fb4e7ec0 100644 (file)
@@ -2896,14 +2896,16 @@ Triangulation<3>::last_face (const unsigned int level) const {
 
 template <>
 TriaDimensionInfo<3>::active_face_iterator
-Triangulation<3>::last_active_face () const {
+Triangulation<3>::last_active_face () const
+{
   return last_active_quad ();
 };
 
 
 template <>
 TriaDimensionInfo<3>::active_face_iterator
-Triangulation<3>::last_active_face (const unsigned int level) const {
+Triangulation<3>::last_active_face (const unsigned int level) const
+{
   return last_active_quad (level);
 };
 
@@ -2913,7 +2915,8 @@ Triangulation<3>::last_active_face (const unsigned int level) const {
 
 template <int dim>
 typename TriaDimensionInfo<dim>::raw_line_iterator
-Triangulation<dim>::begin_raw_line (unsigned int level) const {
+Triangulation<dim>::begin_raw_line (const unsigned int level) const
+{
   Assert (level<levels.size(), ExcInvalidLevel(level));
   
   if (levels[level]->lines.lines.size() == 0)
@@ -2925,9 +2928,11 @@ Triangulation<dim>::begin_raw_line (unsigned int level) const {
 };
 
 
+
 template <int dim>
 typename TriaDimensionInfo<dim>::raw_quad_iterator
-Triangulation<dim>::begin_raw_quad (unsigned int level) const {
+Triangulation<dim>::begin_raw_quad (const unsigned int level) const
+{
   Assert (level<levels.size(), ExcInvalidLevel(level));
 
   if (levels[level]->quads.quads.size() == 0)
@@ -2939,9 +2944,11 @@ Triangulation<dim>::begin_raw_quad (unsigned int level) const {
 };
 
 
+
 template <int dim>
 typename TriaDimensionInfo<dim>::raw_hex_iterator
-Triangulation<dim>::begin_raw_hex (unsigned int level) const {
+Triangulation<dim>::begin_raw_hex (const unsigned int level) const
+{
   Assert (level<levels.size(), ExcInvalidLevel(level));
 
   if (levels[level]->hexes.hexes.size() == 0)
@@ -2953,9 +2960,11 @@ Triangulation<dim>::begin_raw_hex (unsigned int level) const {
 };
 
 
+
 template <int dim>
 typename TriaDimensionInfo<dim>::line_iterator
-Triangulation<dim>::begin_line (unsigned int level) const {
+Triangulation<dim>::begin_line (const unsigned int level) const
+{
                                   // level is checked in begin_raw
   raw_line_iterator ri = begin_raw_line (level);
   if (ri.state() != valid)
@@ -2967,9 +2976,11 @@ Triangulation<dim>::begin_line (unsigned int level) const {
 };
 
 
+
 template <int dim>
 typename TriaDimensionInfo<dim>::quad_iterator
-Triangulation<dim>::begin_quad (unsigned int level) const {
+Triangulation<dim>::begin_quad (const unsigned int level) const
+{
                                   // level is checked in begin_raw
   raw_quad_iterator ri = begin_raw_quad (level);
   if (ri.state() != valid)
@@ -2981,9 +2992,11 @@ Triangulation<dim>::begin_quad (unsigned int level) const {
 };
 
 
+
 template <int dim>
 typename TriaDimensionInfo<dim>::hex_iterator
-Triangulation<dim>::begin_hex (unsigned int level) const {
+Triangulation<dim>::begin_hex (const unsigned int level) const
+{
                                   // level is checked in begin_raw
   raw_hex_iterator ri = begin_raw_hex (level);
   if (ri.state() != valid)
@@ -2995,9 +3008,11 @@ Triangulation<dim>::begin_hex (unsigned int level) const {
 };
 
 
+
 template <int dim>
 typename TriaDimensionInfo<dim>::active_line_iterator
-Triangulation<dim>::begin_active_line (unsigned int level) const {
+Triangulation<dim>::begin_active_line (const unsigned int level) const
+{
                                   // level is checked in begin_raw
   line_iterator i = begin_line (level);
   if (i.state() != valid)
@@ -3009,9 +3024,11 @@ Triangulation<dim>::begin_active_line (unsigned int level) const {
 };
 
 
+
 template <int dim>
 typename TriaDimensionInfo<dim>::active_quad_iterator
-Triangulation<dim>::begin_active_quad (unsigned int level) const {
+Triangulation<dim>::begin_active_quad (const unsigned int level) const
+{
                                   // level is checked in begin_raw
   quad_iterator i = begin_quad (level);
   if (i.state() != valid)
@@ -3023,9 +3040,11 @@ Triangulation<dim>::begin_active_quad (unsigned int level) const {
 };
 
 
+
 template <int dim>
 typename TriaDimensionInfo<dim>::active_hex_iterator
-Triangulation<dim>::begin_active_hex (unsigned int level) const {
+Triangulation<dim>::begin_active_hex (const unsigned int level) const
+{
                                   // level is checked in begin_raw
   hex_iterator i = begin_hex (level);
   if (i.state() != valid)
@@ -3037,36 +3056,44 @@ Triangulation<dim>::begin_active_hex (unsigned int level) const {
 };
 
 
+
 template <int dim>
 typename TriaDimensionInfo<dim>::raw_line_iterator
-Triangulation<dim>::end_line () const {
+Triangulation<dim>::end_line () const
+{
   return raw_line_iterator (const_cast<Triangulation<dim>*>(this),
                            -1,
                            -1);
 };
 
 
+
 template <int dim>
 typename TriaDimensionInfo<dim>::raw_quad_iterator
-Triangulation<dim>::end_quad () const {
+Triangulation<dim>::end_quad () const
+{
   return raw_quad_iterator (const_cast<Triangulation<dim>*>(this),
                            -1,
                            -1);
 };
 
 
+
 template <int dim>
 typename TriaDimensionInfo<dim>::raw_hex_iterator
-Triangulation<dim>::end_hex () const {
+Triangulation<dim>::end_hex () const
+{
   return raw_hex_iterator (const_cast<Triangulation<dim>*>(this),
                           -1,
                           -1);
 };
 
 
+
 template <int dim>
 typename TriaDimensionInfo<dim>::raw_line_iterator
-Triangulation<dim>::last_raw_line (const unsigned int level) const {
+Triangulation<dim>::last_raw_line (const unsigned int level) const
+{
   Assert (level<levels.size(), ExcInvalidLevel(level));
   Assert (levels[level]->lines.lines.size() != 0,
          ExcEmptyLevel (level));

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.