]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make an argument a reference.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 6 Aug 2010 00:01:51 +0000 (00:01 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 6 Aug 2010 00:01:51 +0000 (00:01 +0000)
git-svn-id: https://svn.dealii.org/trunk@21612 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/mesh_worker_info.h
deal.II/deal.II/include/numerics/mesh_worker_info.templates.h

index e14ec200ac2b7226aeec50deccf3923a27569bcd..3979448325a042af8ae34f330a4936e8b3b7aabe 100644 (file)
@@ -109,7 +109,7 @@ namespace MeshWorker
                                        */
       template <class DH>
       DoFInfo (const DH& dof_handler);
-      
+
                                       /**
                                        * Set the current cell and
                                        * fill #indices.
@@ -156,7 +156,7 @@ namespace MeshWorker
                                        * DoFInfoBox.
                                        */
       DoFInfo ();
-      
+
                                       /// Fill index vector with active indices
       void get_indices(const typename DoFHandler<dim, spacedim>::cell_iterator& c);
 
@@ -175,7 +175,7 @@ namespace MeshWorker
                                        * degrees of freedom per cell.
                                        */
       BlockIndices aux_local_indices;
-      
+
       friend class DoFInfoBox<dim, DoFInfo<dim, spacedim, number> >;
   };
 
@@ -207,7 +207,7 @@ namespace MeshWorker
                                        * in the other constructor.
                                        */
       DoFInfoBox(const DoFInfoBox<dim, DOFINFO>&);
-      
+
                                       /**
                                        * Reset all the availability flags.
                                        */
@@ -224,8 +224,8 @@ namespace MeshWorker
                                        */
       template <class ASSEMBLER>
       void assemble(ASSEMBLER& ass) const;
-      
-      
+
+
                                       /**
                                        * The data for the cell.
                                        */
@@ -254,7 +254,7 @@ namespace MeshWorker
   };
 
 
-  
+
 
 /**
  * Class for objects handed to local integration functions.
@@ -315,19 +315,19 @@ namespace MeshWorker
     public:
       static const unsigned int dimension = dim;
       static const unsigned int space_dimension = spacedim;
-      
+
                                       /**
                                        * Constructor.
                                        */
       IntegrationInfo();
-      
+
                                       /**
                                        * Copy constructor, creating a
                                        * clone to be used by
                                        * WorksTream::run().
                                        */
       IntegrationInfo(const IntegrationInfo<dim, spacedim>& other);
-      
+
                                       /**
                                        * Build all internal
                                        * structures, in particular
@@ -373,7 +373,7 @@ namespace MeshWorker
                                        * vector and cache the
                                        * selector.
                                        */
-      void initialize_data(const boost::shared_ptr<VectorDataBase<dim,spacedim> > data);
+      void initialize_data(const boost::shared_ptr<VectorDataBase<dim,spacedim> > &data);
 
                                       /**
                                        * Delete the data created by initialize().
@@ -458,7 +458,7 @@ namespace MeshWorker
                                        * structures for use on a cell.
                                        */
       void reinit(const DoFInfo<dim, spacedim>& i);
-      
+
                                       /**
                                        * Use the finite element
                                        * functions in #global_data
@@ -505,7 +505,7 @@ namespace MeshWorker
  *
  * <ol>
  * <li> It provides the interface needed by MeshWorker::loop(), namely
- * the two functions post_cell() and post_faces(), as well as 
+ * the two functions post_cell() and post_faces(), as well as
  * the data members #cell, #boundary, #face,
  * #subface, and #neighbor.
  *
@@ -650,7 +650,7 @@ namespace MeshWorker
                                        */
       Quadrature<dim-1> face_quadrature;
                                       /* @} */
-      
+
                                       /**
                                        * @name Data vectors
                                        */
@@ -699,7 +699,7 @@ namespace MeshWorker
                                        * interior faces.
                                        */
       MeshWorker::VectorSelector face_selector;
-      
+
       boost::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > cell_data;
       boost::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > boundary_data;
       boost::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > face_data;
@@ -743,7 +743,7 @@ namespace MeshWorker
                                        */
       template <class DOFINFO>
       void post_cell(const DoFInfoBox<dim, DOFINFO>&);
-      
+
                                       /**
                                        * A callback function which is
                                        * called in the loop over all
@@ -776,7 +776,7 @@ namespace MeshWorker
                                        */
       template <class DOFINFO>
       void post_faces(const DoFInfoBox<dim, DOFINFO>&);
-      
+
 /// The info object for a cell
       CellInfo cell;
 /// The info object for a boundary face
@@ -873,7 +873,7 @@ namespace MeshWorker
   }
 
 //----------------------------------------------------------------------//
-  
+
   template <int dim, class DOFINFO>
   inline
   DoFInfoBox<dim, DOFINFO>::DoFInfoBox(const DOFINFO& seed)
@@ -917,7 +917,7 @@ namespace MeshWorker
       }
   }
 
-  
+
   template <int dim, class DOFINFO>
   template <class ASSEMBLER>
   inline void
@@ -939,7 +939,7 @@ namespace MeshWorker
          }
       }
   }
-  
+
 
 //----------------------------------------------------------------------//
 
@@ -955,7 +955,7 @@ namespace MeshWorker
   {
     if (block_info == 0 || block_info->local().size() == 0)
       {
-       fevalv.resize(1);             
+       fevalv.resize(1);
        fevalv[0] = boost::shared_ptr<FEValuesBase<dim,sdim> > (
          new FEVALUES (mapping, el, quadrature, flags));
       }
@@ -970,7 +970,7 @@ namespace MeshWorker
       }
     n_components = el.n_components();
   }
-  
+
 
   template <int dim, int spacedim>
   inline const FEValuesBase<dim, spacedim>&
@@ -1007,7 +1007,7 @@ namespace MeshWorker
          {
                                             // This is a face
            FEFaceValues<dim>& fe = dynamic_cast<FEFaceValues<dim>&> (febase);
-           fe.reinit(info.cell, info.face_number);    
+           fe.reinit(info.cell, info.face_number);
          }
        else
          {
@@ -1041,7 +1041,7 @@ namespace MeshWorker
     p->initialize(data);
     cell_data = p;
     cell.initialize_data(p);
-    
+
     p = boost::shared_ptr<VectorData<VECTOR, dim, sdim> >(new VectorData<VECTOR, dim, sdim> (boundary_selector));
     p->initialize(data);
     boundary_data = p;
@@ -1085,15 +1085,15 @@ namespace MeshWorker
     subface.initialize_data(p);
     neighbor.initialize_data(p);
   }
-  
-  
+
+
   template <int dim, int sdim>
   template <class DOFINFO>
   void
   IntegrationInfoBox<dim,sdim>::post_cell(const DoFInfoBox<dim, DOFINFO>&)
   {}
-  
-  
+
+
   template <int dim, int sdim>
   template <class DOFINFO>
   void
index 3b262de88daa129ab707c19e74422c186dadcf9f..40f12d38b34ecc7672db2c33e8718e021a9b97a3 100644 (file)
@@ -38,7 +38,7 @@ namespace MeshWorker
     if (!c->has_children())
       {
        indices.resize(c->get_fe().dofs_per_cell);
-       
+
        if (block_info == 0 || block_info->local().size() == 0)
          c->get_dof_indices(indices);
        else
@@ -61,7 +61,7 @@ namespace MeshWorker
   DoFInfo<dim,spacedim,number>::get_indices(const typename MGDoFHandler<dim, spacedim>::cell_iterator& c)
   {
     indices.resize(c->get_fe().dofs_per_cell);
-  
+
     if (block_info == 0 || block_info->local().size() == 0)
       c->get_mg_dof_indices(indices);
     else
@@ -84,7 +84,7 @@ namespace MeshWorker
                  global_data(boost::shared_ptr<VectorDataBase<dim, sdim> >(new VectorDataBase<dim, sdim>))
   {}
 
-  
+
   template<int dim, int sdim>
   IntegrationInfo<dim,sdim>::IntegrationInfo(const IntegrationInfo<dim,sdim>& other)
                  :
@@ -102,7 +102,7 @@ namespace MeshWorker
        const FEValues<dim,sdim>* pc = dynamic_cast<const FEValues<dim,sdim>*>(&p);
        const FEFaceValues<dim,sdim>* pf = dynamic_cast<const FEFaceValues<dim,sdim>*>(&p);
        const FESubfaceValues<dim,sdim>* ps = dynamic_cast<const FESubfaceValues<dim,sdim>*>(&p);
-       
+
        if (pc != 0)
          fevalv[i] = boost::shared_ptr<FEValuesBase<dim,sdim> > (
            reinterpret_cast<FEFaceValuesBase<dim,sdim>*>(
@@ -118,16 +118,16 @@ namespace MeshWorker
          Assert(false, ExcInternalError());
       }
   }
-  
+
 
   template<int dim, int sdim>
   void
   IntegrationInfo<dim,sdim>::initialize_data(
-    const boost::shared_ptr<VectorDataBase<dim,sdim> > data)
+    const boost::shared_ptr<VectorDataBase<dim,sdim> > &data)
   {
     global_data = data;
     const unsigned int nqp = fevalv[0]->n_quadrature_points;
-    
+
     values.resize(global_data->n_values());
 //    deallog << "values: " << values.size() << " [";
                                     // For all selected finite
@@ -145,7 +145,7 @@ namespace MeshWorker
 //     deallog << " }";
       }
 //    deallog << " ]" << std::endl;
-    
+
     gradients.resize(global_data->n_gradients());
                                     // For all selected finite
                                     // element functions
@@ -158,7 +158,7 @@ namespace MeshWorker
            gradients[i][j].resize(nqp);
          }
       }
-    
+
     hessians.resize(global_data->n_hessians());
                                     // For all selected finite
                                     // element functions
@@ -199,7 +199,7 @@ namespace MeshWorker
            const unsigned int n_comp = fe.get_fe().n_components();
            const unsigned int block_start = info.block_info->local().block_start(b);
            const unsigned int block_size = info.block_info->local().block_size(b);
-           
+
             if(info.level_cell)
            this->global_data->mg_fill(values, gradients, hessians, fe, info.cell->level(), info.indices,
                                    comp, n_comp, block_start, block_size);
@@ -221,11 +221,11 @@ namespace MeshWorker
                                 0, n_comp, 0, info.indices.size());
        }
   }
-  
-  
+
+
 //----------------------------------------------------------------------//
-  
-  
+
+
   template<int dim, int sdim>
   void
   IntegrationInfoBox<dim,sdim>::initialize_update_flags ()
@@ -234,25 +234,25 @@ namespace MeshWorker
     boundary_flags = UpdateFlags(update_JxW_values | update_normal_vectors);
     face_flags = boundary_flags;
     neighbor_flags = update_default;
-    
+
     if (cell_selector.has_values() != 0) cell_flags |= update_values;
     if (cell_selector.has_gradients() != 0) cell_flags |= update_gradients;
     if (cell_selector.has_hessians() != 0) cell_flags |= update_hessians;
-    
+
     if (boundary_selector.has_values() != 0) boundary_flags |= update_values;
     if (boundary_selector.has_gradients() != 0) boundary_flags |= update_gradients;
     if (boundary_selector.has_hessians() != 0) boundary_flags |= update_hessians;
-    
+
     if (face_selector.has_values() != 0) face_flags |= update_values;
     if (face_selector.has_gradients() != 0) face_flags |= update_gradients;
     if (face_selector.has_hessians() != 0) face_flags |= update_hessians;
-    
+
     if (face_selector.has_values() != 0) neighbor_flags |= update_values;
     if (face_selector.has_gradients() != 0) neighbor_flags |= update_gradients;
-    if (face_selector.has_hessians() != 0) neighbor_flags |= update_hessians;  
+    if (face_selector.has_hessians() != 0) neighbor_flags |= update_hessians;
   }
-  
-  
+
+
   template <int dim, int sdim>
   void
   IntegrationInfoBox<dim,sdim>::add_update_flags(
@@ -265,10 +265,10 @@ namespace MeshWorker
     if (cell) cell_flags |= flags;
     if (boundary) boundary_flags |= flags;
     if (face) face_flags |= flags;
-    if (neighbor) neighbor_flags |= flags;  
+    if (neighbor) neighbor_flags |= flags;
   }
-  
-  
+
+
   template <int dim, int sdim>
   void
   IntegrationInfoBox<dim,sdim>::initialize_gauss_quadrature(
@@ -281,8 +281,8 @@ namespace MeshWorker
     face_quadrature = QGauss<dim-1>(fp);
 
   }
-  
-  
+
+
   template <int dim, int sdim>
   void
   IntegrationInfoBox<dim,sdim>::

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.