From: blaisb Date: Wed, 15 Apr 2020 11:08:13 +0000 (-0400) Subject: Final indentation fixes X-Git-Tag: v9.2.0-rc1~53^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7618d390765a2915a909ec63de567d16b61a9ee3;p=dealii.git Final indentation fixes --- diff --git a/include/deal.II/particles/utilities.h b/include/deal.II/particles/utilities.h index 71ca8cfb4f..43a1368554 100644 --- a/include/deal.II/particles/utilities.h +++ b/include/deal.II/particles/utilities.h @@ -161,15 +161,14 @@ namespace Particles AffineConstraints(), 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 space_gtl(fe.n_components(), diff --git a/source/particles/utilities.cc b/source/particles/utilities.cc index 39d67b9559..cfd8903af5 100644 --- a/source/particles/utilities.cc +++ b/source/particles/utilities.cc @@ -210,88 +210,6 @@ namespace Particles } - - // template - // void - // interpolate_field_on_particles( - // const DoFHandler & field_dh, - // const Particles::ParticleHandler &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 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 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::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