]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed names and typedefs.
authorLuca Heltai <luca.heltai@sissa.it>
Fri, 15 May 2015 20:36:22 +0000 (22:36 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Sat, 16 May 2015 18:54:11 +0000 (20:54 +0200)
include/deal.II/fe/mapping_fe_field.h
source/fe/mapping_fe_field.cc

index e005466975c9a6fd42c0759cdc178a2cddfefedb..e1c5c453543348aff320dd600bb9ab65cb1d5a43 100644 (file)
@@ -586,31 +586,19 @@ private:
    */
   void update_internal_dofs(const typename Triangulation<dim,spacedim>::cell_iterator &cell) const;
 
-  /**
-   * Typedef holding the local cell_dofs.
-   */
-  typedef
-  Threads::ThreadLocalStorage <std::vector<double> > local_dofs_t;
-
-  /**
-  * Typedef holding the local dof indices.
-  */
-  typedef
-  Threads::ThreadLocalStorage <std::vector<types::global_dof_index> > local_dof_indices_t;
-
   /**
    * It stores the local degrees of freedom of the DH for each cell
    * (i.e. euler_vector * dof_indices, see method update_internal_dofs for more
    * clarifications.).
    */
-  mutable local_dofs_t local_dofs;
+  mutable Threads::ThreadLocalStorage <std::vector<double> >  local_dof_values;
 
   /**
    * Store the degrees of freedom of the DH for each cell (i.e.
    * cell->get_dof_indices(dof_indices), see method update_internal_dofs for more
    * clarifications.). Thread safe.
    */
-  mutable  local_dof_indices_t dof_indices;
+  mutable  Threads::ThreadLocalStorage <std::vector<types::global_dof_index> > local_dof_indices;
 
   /** Reimplemented from Mapping. See the documentation of the base class for
    * detailed information.
index 2923c990578658383eb26de70e9d52b8c40371c0..b636a38eadba6d51fde4036e48f05cf5e0829d81 100644 (file)
@@ -70,8 +70,8 @@ MappingFEField<dim,spacedim,VECTOR,DH>::MappingFEField (const DH      &euler_dof
   euler_vector(&euler_vector),
   fe(&euler_dof_handler.get_fe()),
   euler_dof_handler(&euler_dof_handler),
-  local_dofs(std::vector<double>(fe->dofs_per_cell)),
-  dof_indices(std::vector<types::global_dof_index>(fe->dofs_per_cell)),
+  local_dof_values(std::vector<double>(fe->dofs_per_cell)),
+  local_dof_indices(std::vector<types::global_dof_index>(fe->dofs_per_cell)),
   fe_mask(mask.size() ? mask :
           ComponentMask(fe->get_nonzero_components(0).size(), true)),
   fe_to_real(fe_mask.size(), numbers::invalid_unsigned_int)
@@ -92,8 +92,8 @@ MappingFEField<dim,spacedim,VECTOR,DH>::MappingFEField (const MappingFEField<dim
   euler_vector(mapping.euler_vector),
   fe(mapping.fe),
   euler_dof_handler(mapping.euler_dof_handler),
-  local_dofs(std::vector<double>(fe->dofs_per_cell)),
-  dof_indices(std::vector<types::global_dof_index>(fe->dofs_per_cell)),
+  local_dof_values(std::vector<double>(fe->dofs_per_cell)),
+  local_dof_indices(std::vector<types::global_dof_index>(fe->dofs_per_cell)),
   fe_mask(mapping.fe_mask),
   fe_to_real(mapping.fe_to_real)
 {}
@@ -386,8 +386,8 @@ MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_values (
   std::vector<Point<spacedim> >                             &normal_vectors,
   CellSimilarity::Similarity                                &cell_similarity) const
 {
-  AssertDimension(fe->dofs_per_cell, local_dofs.get().size());
-  Assert(local_dofs.get().size()>0, ExcMessage("Cannot do anything with zero degrees of freedom"));
+  AssertDimension(fe->dofs_per_cell, local_dof_values.get().size());
+  Assert(local_dof_values.get().size()>0, ExcMessage("Cannot do anything with zero degrees of freedom"));
 
   // convert data object to internal data for this class. fails with an
   // exception if that is not possible
@@ -520,7 +520,7 @@ MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_values (
                     for (unsigned int j=0; j<dim; ++j)
                       for (unsigned int l=0; l<dim; ++l)
                         result[fe_to_real[comp_k]][j][l] += (second[k][j][l]
-                                                             * local_dofs.get()[k]);
+                                                             * local_dof_values.get()[k]);
                 }
 
               // never touch any data for j=dim in case dim<spacedim, so it
@@ -801,7 +801,7 @@ transform_unit_to_real_cell_internal (const InternalData &data) const
     {
       unsigned int comp_i = fe->system_to_component_index(i).first;
       if (fe_mask[comp_i])
-        p_real[fe_to_real[comp_i]] += local_dofs.get()[i] * data.shape(0,i);
+        p_real[fe_to_real[comp_i]] += local_dof_values.get()[i] * data.shape(0,i);
     }
 
   return p_real;
@@ -896,7 +896,7 @@ transform_real_to_unit_cell_internal
           unsigned int comp_k = fe->system_to_component_index(k).first;
           if (fe_mask[comp_k])
             for (unsigned int j=0; j<dim; ++j)
-              DF[j][fe_to_real[comp_k]] += local_dofs.get()[k] * grad_k[j];
+              DF[j][fe_to_real[comp_k]] += local_dof_values.get()[k] * grad_k[j];
         }
       for (unsigned int j=0; j<dim; ++j)
         {
@@ -990,7 +990,7 @@ MappingFEField<dim,spacedim,VECTOR,DH>::compute_fill (
             {
               unsigned int comp_k = fe->system_to_component_index(k).first;
               if (fe_mask[comp_k])
-                result[fe_to_real[comp_k]] += local_dofs.get()[k] * shape[k];
+                result[fe_to_real[comp_k]] += local_dof_values.get()[k] * shape[k];
             }
 
           quadrature_points[point] = result;
@@ -1024,7 +1024,7 @@ MappingFEField<dim,spacedim,VECTOR,DH>::compute_fill (
                 {
                   unsigned int comp_k = fe->system_to_component_index(k).first;
                   if (fe_mask[comp_k])
-                    result[fe_to_real[comp_k]] += local_dofs.get()[k] * data_derv[k];
+                    result[fe_to_real[comp_k]] += local_dof_values.get()[k] * data_derv[k];
                 }
 
               // write result into contravariant data. for
@@ -1231,10 +1231,10 @@ MappingFEField<dim,spacedim,VECTOR,DH>::update_internal_dofs (
   typename DH::cell_iterator dof_cell(*cell, euler_dof_handler);
   Assert (dof_cell->active() == true, ExcInactiveCell());
 
-  dof_cell->get_dof_indices(dof_indices.get());
+  dof_cell->get_dof_indices(local_dof_indices.get());
 
-  for (unsigned int i=0; i<local_dofs.get().size(); ++i)
-    local_dofs.get()[i] = (*euler_vector)(dof_indices.get()[i]);
+  for (unsigned int i=0; i<local_dof_values.get().size(); ++i)
+    local_dof_values.get()[i] = (*euler_vector)(local_dof_indices.get()[i]);
 }
 
 // explicit instantiations

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.