From: Tobias Leicht Date: Thu, 20 Mar 2008 10:40:19 +0000 (+0000) Subject: Add a clone() function for MappingQEulerian which is needed for adding this mapping... X-Git-Tag: v8.0.0~9261 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a78b957b8a6674e63bc39436bf1b28ceb6e7be47;p=dealii.git Add a clone() function for MappingQEulerian which is needed for adding this mapping to a hp::MappingCollection. git-svn-id: https://svn.dealii.org/trunk@15913 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/mapping_q_eulerian.h b/deal.II/deal.II/include/fe/mapping_q_eulerian.h index 17f7e6110f..c1786d4e59 100644 --- a/deal.II/deal.II/include/fe/mapping_q_eulerian.h +++ b/deal.II/deal.II/include/fe/mapping_q_eulerian.h @@ -116,6 +116,14 @@ class MappingQEulerian : public MappingQ const EulerVectorType &euler_vector, const DoFHandler &euler_dof_handler); + /** + * Return a pointer to a copy of the + * present object. The caller of this + * copy then assumes ownership of it. + */ + virtual + Mapping * clone () const; + /** * Exception */ diff --git a/deal.II/deal.II/source/fe/mapping_q_eulerian.cc b/deal.II/deal.II/source/fe/mapping_q_eulerian.cc index 2a53da3973..a78968ab79 100644 --- a/deal.II/deal.II/source/fe/mapping_q_eulerian.cc +++ b/deal.II/deal.II/source/fe/mapping_q_eulerian.cc @@ -45,6 +45,18 @@ MappingQEulerian (const unsigned int degree, { } + +template +Mapping * +MappingQEulerian::clone () const +{ + return new MappingQEulerian(this->get_degree(), + euler_vector, + *euler_dof_handler); +} + + + // .... SUPPORT QUADRATURE CONSTRUCTOR template