From: Wolfgang Bangerth Date: Sun, 27 Jul 2014 19:02:58 +0000 (-0500) Subject: Improve the documentation of VectorTools::create_point_source_vector(). X-Git-Tag: v8.2.0-rc1~242^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F35%2Fhead;p=dealii.git Improve the documentation of VectorTools::create_point_source_vector(). The previous version of the documentation was not exactly clear as to what the 'orientation' argument actually referred to. --- diff --git a/include/deal.II/numerics/vector_tools.h b/include/deal.II/numerics/vector_tools.h index 0f15f4c978..f23c3b27f7 100644 --- a/include/deal.II/numerics/vector_tools.h +++ b/include/deal.II/numerics/vector_tools.h @@ -1842,10 +1842,19 @@ namespace VectorTools /** * Create a right hand side - * vector for a point source at point @p p - * for vector-valued finite elements. - * Prior content of the - * given @p rhs_vector vector is + * vector for a point source at point @p p. This variation of the function + * is meant for vector-valued problems with exactly dim components (it will + * also work for problems with more than dim components, and in this case + * simply consider only the first dim components of the shape functions). + * It computes a right hand side that corresponds to a forcing function that + * is equal to a delta function times a given direction. + * In other words, it creates a vector $F$ so that + * $F_i = \int_\Omega [\mathbf d \delta(x-p)] \cdot \phi_i(x) dx$. + * Note here that $\phi_i$ is a vector-valued function. $\mathbf d$ is + * the given direction of the source term $\mathbf d \delta(x-p)$ and + * corresponds to the @p direction argument to be passed to this function. + * + * Prior content of the given @p rhs_vector vector is * deleted. * * See the general documentation of this @@ -1855,7 +1864,7 @@ namespace VectorTools void create_point_source_vector(const Mapping &mapping, const DoFHandler &dof, const Point &p, - const Point &orientation, + const Point &direction, Vector &rhs_vector); /** @@ -1867,7 +1876,7 @@ namespace VectorTools template void create_point_source_vector(const DoFHandler &dof, const Point &p, - const Point &orientation, + const Point &direction, Vector &rhs_vector); /** @@ -1878,7 +1887,7 @@ namespace VectorTools void create_point_source_vector(const hp::MappingCollection &mapping, const hp::DoFHandler &dof, const Point &p, - const Point &orientation, + const Point &direction, Vector &rhs_vector); /** @@ -1894,7 +1903,7 @@ namespace VectorTools template void create_point_source_vector(const hp::DoFHandler &dof, const Point &p, - const Point &orientation, + const Point &direction, Vector &rhs_vector); /** diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index cef2e584ce..a8f5fe91a3 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -1246,11 +1246,11 @@ namespace VectorTools rhs_vector = 0; - std::pair::active_cell_iterator, Point > + const std::pair::active_cell_iterator, Point > cell_point = GridTools::find_active_cell_around_point (mapping, dof_handler, p); - Quadrature q(GeometryInfo::project_to_unit_cell(cell_point.second)); + const Quadrature q(GeometryInfo::project_to_unit_cell(cell_point.second)); const FEValuesExtractors::Vector vec (0); FEValues fe_values(mapping, dof_handler.get_fe(),