]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Improve the documentation of VectorTools::create_point_source_vector(). 35/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 27 Jul 2014 19:02:58 +0000 (14:02 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 27 Jul 2014 19:02:58 +0000 (14:02 -0500)
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
include/deal.II/numerics/vector_tools.templates.h

index 0f15f4c9788c958cde81205e6171e72acac7869f..f23c3b27f78e4dd4c27ac391eedc876427982f1e 100644 (file)
@@ -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<dim,spacedim>    &mapping,
                                   const DoFHandler<dim,spacedim> &dof,
                                   const Point<spacedim>          &p,
-                                  const Point<dim>               &orientation,
+                                  const Point<dim>               &direction,
                                   Vector<double>                 &rhs_vector);
 
   /**
@@ -1867,7 +1876,7 @@ namespace VectorTools
   template <int dim, int spacedim>
   void create_point_source_vector(const DoFHandler<dim,spacedim> &dof,
                                   const Point<spacedim>          &p,
-                                  const Point<dim>               &orientation,
+                                  const Point<dim>               &direction,
                                   Vector<double>                 &rhs_vector);
 
   /**
@@ -1878,7 +1887,7 @@ namespace VectorTools
   void create_point_source_vector(const hp::MappingCollection<dim,spacedim> &mapping,
                                   const hp::DoFHandler<dim,spacedim>        &dof,
                                   const Point<spacedim>                     &p,
-                                  const Point<dim>                          &orientation,
+                                  const Point<dim>                          &direction,
                                   Vector<double>                            &rhs_vector);
 
   /**
@@ -1894,7 +1903,7 @@ namespace VectorTools
   template <int dim, int spacedim>
   void create_point_source_vector(const hp::DoFHandler<dim,spacedim> &dof,
                                   const Point<spacedim>              &p,
-                                  const Point<dim>                   &orientation,
+                                  const Point<dim>                   &direction,
                                   Vector<double>                     &rhs_vector);
 
   /**
index cef2e584ce61ae297f7d5b754619f7eee3a748e6..a8f5fe91a372b2f68bf3ff33482ebed7bd6e553a 100644 (file)
@@ -1246,11 +1246,11 @@ namespace VectorTools
 
     rhs_vector = 0;
 
-    std::pair<typename DoFHandler<dim,spacedim>::active_cell_iterator, Point<spacedim> >
+    const std::pair<typename DoFHandler<dim,spacedim>::active_cell_iterator, Point<spacedim> >
     cell_point =
       GridTools::find_active_cell_around_point (mapping, dof_handler, p);
 
-    Quadrature<dim> q(GeometryInfo<dim>::project_to_unit_cell(cell_point.second));
+    const Quadrature<dim> q(GeometryInfo<dim>::project_to_unit_cell(cell_point.second));
 
     const FEValuesExtractors::Vector vec (0);
     FEValues<dim,spacedim> fe_values(mapping, dof_handler.get_fe(),

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.