]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Final indentation fixes
authorblaisb <blais.bruno@gmail.com>
Wed, 15 Apr 2020 11:08:13 +0000 (07:08 -0400)
committerblaisb <blais.bruno@gmail.com>
Wed, 6 May 2020 16:49:42 +0000 (12:49 -0400)
include/deal.II/particles/utilities.h
source/particles/utilities.cc

index 71ca8cfb4f66380f0f524f676d7430a24b7a7775..43a1368554260e949f6ad2e5af19aa6b95f8d140 100644 (file)
@@ -161,15 +161,14 @@ namespace Particles
         AffineConstraints<typename MatrixType::value_type>(),
       const ComponentMask &space_comps = ComponentMask());
 
-
-
     /**
-     * Interpolate a vector field to the particles of a particle_handler
+     * Interpolate a field to the position of the particles of a
+     * particle_handler
      *
      * Given a DoFHandler and a particle handler, interpolates a vector field
      * at the position of the particles. The result is stored in an output
      * vector whose size corresponds to the number of locally owned particles *
-     * number of components
+     * number of active components
      *
      * @param[in] dof_handler The DOF Handler which was used to generate the
      * field vector that is to be interpolated.
@@ -224,7 +223,6 @@ namespace Particles
       AssertDimension(interpolated_field.size(),
                       particle_handler.get_next_free_particle_index() *
                         n_comps);
-      // Add check on locally owned indices
 
       // Global to local indices
       std::vector<unsigned int> space_gtl(fe.n_components(),
index 39d67b9559a0455c2d959e9a0f4b1312130daf1a..cfd8903af59c139fd55eae1c91ef9dfa24af82b3 100644 (file)
@@ -210,88 +210,6 @@ namespace Particles
     }
 
 
-
-    //    template <int dim,
-    //              int spacedim,
-    //              typename InputVectorType,
-    //              typename OutputVectorType>
-    //    void
-    //    interpolate_field_on_particles(
-    //      const DoFHandler<dim, spacedim> &                field_dh,
-    //      const Particles::ParticleHandler<dim, spacedim> &particle_handler,
-    //      const InputVectorType &                          field_vector,
-    //      OutputVectorType &                               interpolated_field,
-    //      const ComponentMask &                            field_comps)
-    //    {
-    //      if (particle_handler.n_locally_owned_particles() == 0)
-    //        {
-    //          interpolated_field.compress(VectorOperation::add);
-    //          return; // nothing else to do here
-    //        }
-
-    //      const auto &tria     = field_dh.get_triangulation();
-    //      const auto &fe       = field_dh.get_fe();
-    //      auto        particle = particle_handler.begin();
-    //      const auto  max_particles_per_cell =
-    //        particle_handler.n_global_max_particles_per_cell();
-
-    //      // Take care of components
-    //      const ComponentMask comps =
-    //        (field_comps.size() == 0 ? ComponentMask(fe.n_components(), true)
-    //        :
-    //                                   field_comps);
-    //      AssertDimension(comps.size(), fe.n_components());
-    //      const auto n_comps = comps.n_selected_components();
-
-    //      AssertDimension(field_vector.size(), field_dh.n_dofs());
-    //      AssertDimension(interpolated_field.size(),
-    //                      particle_handler.get_next_free_particle_index() *
-    //                        n_comps);
-    //      // Add check on locally owned indices
-
-    //      // Global to local indices
-    //      std::vector<unsigned int> space_gtl(fe.n_components(),
-    //                                          numbers::invalid_unsigned_int);
-    //      for (unsigned int i = 0, j = 0; i < space_gtl.size(); ++i)
-    //        if (comps[i])
-    //          space_gtl[i] = j++;
-
-    //      std::vector<types::global_dof_index> dof_indices(fe.dofs_per_cell);
-
-    //      while (particle != particle_handler.end())
-    //        {
-    //          const auto &cell = particle->get_surrounding_cell(tria);
-    //          const auto &dh_cell =
-    //            typename DoFHandler<dim, spacedim>::cell_iterator(*cell,
-    //            &field_dh);
-    //          dh_cell->get_dof_indices(dof_indices);
-    //          const auto pic         =
-    //          particle_handler.particles_in_cell(cell); const auto n_particles
-    //          = particle_handler.n_particles_in_cell(cell);
-
-    //          Assert(pic.begin() == particle, ExcInternalError());
-    //          for (unsigned int i = 0; particle != pic.end(); ++particle, ++i)
-    //            {
-    //              const auto &reference_location =
-    //                particle->get_reference_location();
-
-    //              const auto id = particle->get_id();
-
-    //              for (unsigned int j = 0; j < fe.dofs_per_cell; ++j)
-    //                {
-    //                  const auto comp_j =
-    //                    space_gtl[fe.system_to_component_index(j).first];
-    //                  if (comp_j != numbers::invalid_unsigned_int)
-    //                    interpolated_field[id * n_comps + comp_j] +=
-    //                      fe.shape_value(j, reference_location) *
-    //                      field_vector(dof_indices[j]);
-    //                }
-    //            }
-    //        }
-    //      interpolated_field.compress(VectorOperation::add);
-    //    }
-
-
 #include "utilities.inst"
 
   } // namespace Utilities

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.