--- /dev/null
+Fixed: One of the fucntions GridTools::find_active_cell_around_point()
+supports an additional `mapping` argument. This mapping was used
+to actually tranform points from the real to the reference space,
+but somewhere in the algorithm we look for the `closest_vertex` to
+the target point. Such search was done ignoring if the `mapping`
+actually changes the location of the vertices. This is now fixed,
+and the internal function that looks for the closest vertex now
+takes into account the `mapping` tranformation.
+<br>
+(Luca Heltai, 2017/09/27)
* location of vertices, like MappingQEulerian.
*
* @ref ConceptMeshType "MeshType concept".
- * @param container The container to extract vertices from
- * @param mapping The mapping to use to compute the points locations
+ * @param container The container to extract vertices from.
+ * @param mapping The mapping to use to compute the points locations.
*
* @author Luca Heltai, 2017.
*/
const Mapping<dim,spacedim> &mapping = StaticMappingQ1<dim,spacedim>::mapping);
/**
- * Find and return the number of the closest vertex to a given point in the
+ * Find and return the index of the closest vertex to a given point in the
* map of vertices passed as the first argument.
*
* @param vertices A map of index->vertex, as returned by
- * extract_used_vertices()
- * @param p The target point
- * @return The index of the vertex that is closest to the target point `p`
+ * GridTools::extract_used_vertices().
+ * @param p The target point.
+ * @return The index of the vertex that is closest to the target point `p`.
*
* @author Luca Heltai, 2017.
*/
const Point<spacedim> &p);
/**
- * Find and return the number of the used vertex (or marked vertex) in a
+ * Find and return the index of the used vertex (or marked vertex) in a
* given mesh that is located closest to a given point.
*
+ * This function uses the locations of vertices as stored in the
+ * triangulation. This is usually sufficient, unless you are using a Mapping
+ * that moves the vertices around (for example, MappingQEulerian). In this
+ * case, you should call the function with the same name and with an
+ * additional Mapping argument.
+ *
* @param mesh A variable of a type that satisfies the requirements of the
* @ref ConceptMeshType "MeshType concept".
* @param p The point for which we want to find the closest vertex.
const std::vector<bool> &marked_vertices = std::vector<bool>());
/**
- * Find and return the number of the used vertex (or marked vertex) in a
+ * Find and return the index of the used vertex (or marked vertex) in a
* given mesh that is located closest to a given point. Use the given
* mapping to compute the actual location of the vertices.
*
+ * If the Mapping does not modify the position of the mesh vertices (like,
+ * for example, MappingQEulerian does), then this function is equivalent to
+ * the one with the same name, and without the `mapping` argument.
+ *
* @param mapping A mapping used to compute the vertex locations
* @param mesh A variable of a type that satisfies the requirements of the
* @ref ConceptMeshType "MeshType concept".