From: Wolfgang Bangerth Date: Thu, 7 Dec 2017 23:35:35 +0000 (-0700) Subject: General small cleanups. X-Git-Tag: v9.0.0-rc1~672^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5596%2Fhead;p=dealii.git General small cleanups. --- diff --git a/include/deal.II/numerics/fe_field_function.templates.h b/include/deal.II/numerics/fe_field_function.templates.h index b2d1433131..7acf5f9261 100644 --- a/include/deal.II/numerics/fe_field_function.templates.h +++ b/include/deal.II/numerics/fe_field_function.templates.h @@ -258,12 +258,12 @@ namespace Functions std::vector > > qpoints; std::vector > maps; - unsigned int ncells = compute_point_locations(points, cells, qpoints, maps); + const unsigned int n_cells = compute_point_locations(points, cells, qpoints, maps); hp::MappingCollection mapping_collection (mapping); const hp::FECollection &fe_collection = dh->get_fe_collection(); hp::QCollection quadrature_collection; // Create quadrature collection - for (unsigned int i=0; i fe_v(mapping_collection, fe_collection, quadrature_collection, update_values); // Now gather all the informations we need - for (unsigned int i=0; i > > qpoints; std::vector > maps; - unsigned int ncells = compute_point_locations(points, cells, qpoints, maps); + const unsigned int n_cells = compute_point_locations(points, cells, qpoints, maps); hp::MappingCollection mapping_collection (mapping); const hp::FECollection &fe_collection = dh->get_fe_collection(); hp::QCollection quadrature_collection; // Create quadrature collection - for (unsigned int i=0; i fe_v(mapping_collection, fe_collection, quadrature_collection, update_gradients); // Now gather all the informations we need - for (unsigned int i=0; i > > qpoints; std::vector > maps; - unsigned int ncells = compute_point_locations(points, cells, qpoints, maps); + const unsigned int n_cells = compute_point_locations(points, cells, qpoints, maps); hp::MappingCollection mapping_collection (mapping); const hp::FECollection &fe_collection = dh->get_fe_collection(); hp::QCollection quadrature_collection; // Create quadrature collection - for (unsigned int i=0; i fe_v(mapping_collection, fe_collection, quadrature_collection, update_hessians); // Now gather all the informations we need - for (unsigned int i=0; i - unsigned int FEFieldFunction:: - compute_point_locations - (const std::vector > &points, - std::vector &cells, - std::vector > > &qpoints, - std::vector > &maps) const + unsigned int + FEFieldFunction:: + compute_point_locations (const std::vector > &points, + std::vector &cells, + std::vector > > &qpoints, + std::vector > &maps) const { // How many points are here? const unsigned int np = points.size(); @@ -449,12 +449,10 @@ namespace Functions // Now the easy case. if (np==0) return 0; - // Keep track of the points we - // found + // Keep track of the points we found std::vector point_flags(np, false); - // Set this to true until all - // points have been classified + // Set this to true until all points have been classified bool left_over = true; // Current quadrature point @@ -463,20 +461,10 @@ namespace Functions cell = dh->begin_active(); { - // see if the point is - // inside the - // cell. there are two - // ways that - // transform_real_to_unit_cell - // can indicate that a - // point is outside: by - // returning - // coordinates that lie - // outside the - // reference cell, or - // by throwing an - // exception. handle - // both + // see if the point is inside the cell. there are two ways that + // transform_real_to_unit_cell can indicate that a point is + // outside: by returning coordinates that lie outside the + // reference cell, or by throwing an exception. handle both boost::optional > qp = get_reference_coordinates (cell, points[0]); if (!qp)