From: Martin Kronbichler Date: Sat, 3 Jun 2017 14:51:00 +0000 (+0200) Subject: Fix bug in eulerian mapping regarding preservation of vertex locations X-Git-Tag: v9.0.0-rc1~1529^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=999b3cf7a5b4537647f34b4bf5e43ccef2ec1be3;p=dealii.git Fix bug in eulerian mapping regarding preservation of vertex locations --- 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 >