From 480ed147a259220916ab2cb2346ca5717cf6f8d6 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Fri, 26 Apr 2019 09:07:31 +0200 Subject: [PATCH] Changed default parameter to true. --- include/deal.II/fe/mapping.h | 19 +++++++++++-------- tests/mappings/mapping_q_eulerian_12.cc | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/include/deal.II/fe/mapping.h b/include/deal.II/fe/mapping.h index c1c60aac8b..544ba862e2 100644 --- a/include/deal.II/fe/mapping.h +++ b/include/deal.II/fe/mapping.h @@ -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 get_center(const typename Triangulation::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, diff --git a/tests/mappings/mapping_q_eulerian_12.cc b/tests/mappings/mapping_q_eulerian_12.cc index e8626585c5..6af088162e 100644 --- a/tests/mappings/mapping_q_eulerian_12.cc +++ b/tests/mappings/mapping_q_eulerian_12.cc @@ -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; } -- 2.39.5