From edf6f3f1a97334f9640733641d31bf2967c6eac6 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 27 Jul 2014 14:02:58 -0500 Subject: [PATCH] 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. --- include/deal.II/numerics/vector_tools.h | 25 +++++++++++++------ .../deal.II/numerics/vector_tools.templates.h | 4 +-- 2 files changed, 19 insertions(+), 10 deletions(-) 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(), -- 2.39.5