From: bangerth Date: Wed, 4 Jul 2012 12:55:51 +0000 (+0000) Subject: Re-indent and untabify. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00ffc04ba2686abe47c4439abc326e231b44145e;p=dealii-svn.git Re-indent and untabify. git-svn-id: https://svn.dealii.org/trunk@25681 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/numerics/fe_field_function.templates.h b/deal.II/include/deal.II/numerics/fe_field_function.templates.h index 50f2bfeb17..f438cafd12 100644 --- a/deal.II/include/deal.II/numerics/fe_field_function.templates.h +++ b/deal.II/include/deal.II/numerics/fe_field_function.templates.h @@ -60,7 +60,7 @@ namespace Functions ExcDimensionMismatch(values.size(), n_components)); typename DH::active_cell_iterator cell = cell_hint.get(); if (cell == dh->end()) - cell = dh->begin_active(); + cell = dh->begin_active(); Point qp = mapping.transform_real_to_unit_cell(cell, p); // Check if we already have all we need @@ -107,7 +107,7 @@ namespace Functions ExcDimensionMismatch(gradients.size(), n_components)); typename DH::active_cell_iterator cell = cell_hint.get(); if(cell == dh->end()) - cell = dh->begin_active(); + cell = dh->begin_active(); Point qp = mapping.transform_real_to_unit_cell(cell, p); // Check if we already have all we need @@ -150,27 +150,27 @@ namespace Functions (const Point &p,Vector &values) const { Assert (values.size() == n_components, - ExcDimensionMismatch(values.size(), n_components)); + ExcDimensionMismatch(values.size(), n_components)); typename DH::active_cell_iterator cell = cell_hint.get(); if (cell == dh->end()) cell = dh->begin_active(); Point qp = mapping.transform_real_to_unit_cell(cell, p); - // Check if we already have all we need + // Check if we already have all we need if (!GeometryInfo::is_inside_unit_cell(qp)) { const std::pair > my_pair - = GridTools::find_active_cell_around_point (mapping, *dh, p); + = GridTools::find_active_cell_around_point (mapping, *dh, p); cell = my_pair.first; qp = my_pair.second; } cell_hint.get() = cell; - // Now we can find out about the point + // Now we can find out about the point Quadrature quad(qp); FEValues fe_v(mapping, cell->get_fe(), quad, - update_hessians); + update_hessians); fe_v.reinit(cell); std::vector< Vector > vvalues (1, values); fe_v.get_function_laplacians(data_vector, vvalues); @@ -211,9 +211,9 @@ namespace Functions hp::QCollection quadrature_collection; // Create quadrature collection for (unsigned int i=0; i ww(nq, 1./((double) nq)); quadrature_collection.push_back (Quadrature (qpoints[i], ww)); @@ -233,6 +233,8 @@ namespace Functions } } + + template void FEFieldFunction:: @@ -270,9 +272,9 @@ namespace Functions hp::QCollection quadrature_collection; // Create quadrature collection for (unsigned int i=0; i ww(nq, 1./((double) nq)); quadrature_collection.push_back (Quadrature (qpoints[i], ww)); @@ -314,10 +316,10 @@ namespace Functions void FEFieldFunction:: vector_laplacian_list (const std::vector > & points, - std::vector< Vector > &values) const + std::vector< Vector > &values) const { Assert(points.size() == values.size(), - ExcDimensionMismatch(points.size(), values.size())); + ExcDimensionMismatch(points.size(), values.size())); std::vector cells; std::vector > > qpoints; @@ -329,9 +331,9 @@ namespace Functions hp::QCollection quadrature_collection; // Create quadrature collection for (unsigned int i=0; i ww(nq, 1./((double) nq)); quadrature_collection.push_back (Quadrature (qpoints[i], ww)); @@ -339,7 +341,7 @@ namespace Functions // Get a function value object hp::FEValues fe_v(mapping_collection, fe_collection, quadrature_collection, update_hessians); - // Now gather all the informations we need + // Now gather all the informations we need for (unsigned int i=0; i:: laplacian_list (const std::vector > &points, - std::vector< double > &values, - const unsigned int component) const + std::vector< double > &values, + const unsigned int component) const { Assert(points.size() == values.size(), - ExcDimensionMismatch(points.size(), values.size())); + ExcDimensionMismatch(points.size(), values.size())); std::vector< Vector > vvalues(points.size(), Vector(n_components)); vector_laplacian_list(points, vvalues); for (unsigned int q=0; qbegin_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]); + qp = get_reference_coordinates (cell, points[0]); if (!qp) - { - const std::pair > - my_pair = GridTools::find_active_cell_around_point - (mapping, *dh, points[0]); - cell = my_pair.first; - qp = my_pair.second; - point_flags[0] = true; - } - - // Put in the first point. + { + const std::pair > + my_pair = GridTools::find_active_cell_around_point + (mapping, *dh, points[0]); + cell = my_pair.first; + qp = my_pair.second; + point_flags[0] = true; + } + + // Put in the first point. cells.push_back(cell); qpoints.push_back(std::vector >(1, qp.get())); maps.push_back(std::vector (1, 0)); @@ -456,24 +458,24 @@ namespace Functions // If we found one in this cell, keep looking in the same cell for (unsigned int p=first_outside; p > - qp = get_reference_coordinates (cells[c], points[p]); - if (qp) - { - point_flags[p] = true; - qpoints[c].push_back(qp.get()); - maps[c].push_back(p); - } - else - { - // Set things up for next round - if (left_over == false) - first_outside = p; - left_over = true; - } - } + { + // same logic as above + const boost::optional > + qp = get_reference_coordinates (cells[c], points[p]); + if (qp) + { + point_flags[p] = true; + qpoints[c].push_back(qp.get()); + maps[c].push_back(p); + } + else + { + // Set things up for next round + if (left_over == false) + first_outside = p; + left_over = true; + } + } // If we got here and there is // no left over, we are // done. Else we need to find @@ -528,22 +530,22 @@ namespace Functions boost::optional > FEFieldFunction:: get_reference_coordinates (const typename DH::active_cell_iterator &cell, - const Point &point) const + const Point &point) const { try { - Point qp = mapping.transform_real_to_unit_cell(cell, point); - if (GeometryInfo::is_inside_unit_cell(qp)) - return qp; - else - return boost::optional >(); + Point qp = mapping.transform_real_to_unit_cell(cell, point); + if (GeometryInfo::is_inside_unit_cell(qp)) + return qp; + else + return boost::optional >(); } catch (const typename Mapping::ExcTransformationFailed &) { - // transformation failed, so - // assume the point is - // outside - return boost::optional >(); + // transformation failed, so + // assume the point is + // outside + return boost::optional >(); } }