From 999b3cf7a5b4537647f34b4bf5e43ccef2ec1be3 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Sat, 3 Jun 2017 16:51:00 +0200 Subject: [PATCH] Fix bug in eulerian mapping regarding preservation of vertex locations --- include/deal.II/fe/mapping_q_eulerian.h | 9 +++++++++ source/fe/mapping_q_eulerian.cc | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/include/deal.II/fe/mapping_q_eulerian.h b/include/deal.II/fe/mapping_q_eulerian.h index d21ca6ce4b..96613488ba 100644 --- a/include/deal.II/fe/mapping_q_eulerian.h +++ b/include/deal.II/fe/mapping_q_eulerian.h @@ -129,6 +129,7 @@ public: * preserve vertex locations (unless the translation vector happens to * provide for zero displacements at vertex locations). */ + virtual bool preserves_vertex_locations () const; /** @@ -200,6 +201,14 @@ private: std::vector > compute_mapping_support_points(const typename Triangulation::cell_iterator &cell) const; + /** + * Always returns @p false because MappingQ1Eulerian does not in general + * preserve vertex locations (unless the translation vector happens to + * provide for zero displacements at vertex locations). + */ + virtual + bool preserves_vertex_locations () const; + private: /** * Reference to the surrounding object off of which we live. diff --git a/source/fe/mapping_q_eulerian.cc b/source/fe/mapping_q_eulerian.cc index bd9f65ffc2..39250e5d7a 100644 --- a/source/fe/mapping_q_eulerian.cc +++ b/source/fe/mapping_q_eulerian.cc @@ -153,6 +153,15 @@ get_vertices +template +bool +MappingQEulerian::MappingQEulerianGeneric:: +preserves_vertex_locations () const +{ + return false; +} + + template std::vector > -- 2.39.5