]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Changed default parameter to true. 7913/head
authorLuca Heltai <luca.heltai@sissa.it>
Fri, 26 Apr 2019 07:07:31 +0000 (09:07 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Fri, 26 Apr 2019 07:07:31 +0000 (09:07 +0200)
include/deal.II/fe/mapping.h
tests/mappings/mapping_q_eulerian_12.cc

index c1c60aac8ba789f1db81d4680a92999e856f6150..544ba862e2c469b831caac902834916b1eabc273 100644 (file)
@@ -343,24 +343,27 @@ public:
    * locations, this function simply returns the value also produced by
    * `cell->center()`. However, there are also mappings that add displacements
    * or choose completely different locations, e.g., MappingQEulerian,
-   * MappingQ1Eulerian, or MappingFEField.
+   * MappingQ1Eulerian, or MappingFEField, and mappings based on high order
+   * polynomials, for which the center may not coincide with the average of
+   * the vertex locations.
    *
-   * By default, this function returns the average of the vertex locations
-   * returned by the the get_vertices() method. If the parameter
-   * @p map_center_of_reference_cell is set to true, than a more expensive
-   * algorithm is used, that returns the mapped center of the reference cell,
-   * obtained by the transform_unit_to_real_cell() method.
+   * By default, this function returns the push forward of the center of the
+   * reference cell. If the parameter
+   * @p map_center_of_reference_cell is set to false, than the return value
+   * will be the average of the vertex locations, as returned by the
+   * get_vertices() method.
    *
    * @param[in] cell The cell for which you want to compute the center
    * @param[in] map_center_of_reference_cell A flag that switches the algorithm
-   * for the computation of the cell center from vertex averages to
+   * for the computation of the cell center from
    * transform_unit_to_real_cell() applied to the center of the reference cell
+   * to computing the vertex averages.
    *
    * @author Luca Heltai, 2019.
    */
   virtual Point<spacedim>
   get_center(const typename Triangulation<dim, spacedim>::cell_iterator &cell,
-             const bool map_center_of_reference_cell = false) const;
+             const bool map_center_of_reference_cell = true) const;
 
   /**
    * Return whether the mapping preserves vertex locations. In other words,
index e8626585c5069a882e15433f1ea1d04177467cc0..6af088162e8d2ad228eff09c8373c40ae1d24a85 100644 (file)
@@ -77,7 +77,7 @@ test()
   for (const auto &cell : dof_handler.active_cell_iterators())
     {
       deallog << "Center: [" << cell->center() << "], with mapping ["
-              << euler.get_center(cell) << "]" << std::endl;
+              << euler.get_center(cell, false) << "]" << std::endl;
       deallog << "Center: [" << cell->center() << "], with mapping + flag ["
               << euler.get_center(cell, true) << "]" << std::endl;
     }

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.