* 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,
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;
}