]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a clone() function for MappingQEulerian which is needed for adding this mapping...
authorTobias Leicht <tobias.leicht@dlr.de>
Thu, 20 Mar 2008 10:40:19 +0000 (10:40 +0000)
committerTobias Leicht <tobias.leicht@dlr.de>
Thu, 20 Mar 2008 10:40:19 +0000 (10:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@15913 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/mapping_q_eulerian.h
deal.II/deal.II/source/fe/mapping_q_eulerian.cc

index 17f7e6110fc560ead163d36803f3d2afe5438b66..c1786d4e59860f63daccd772396f2aaab4645d33 100644 (file)
@@ -116,6 +116,14 @@ class MappingQEulerian : public MappingQ<dim>
                       const EulerVectorType  &euler_vector,
                       const DoFHandler<dim>  &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<dim> * clone () const;
+
                                      /**
                                       * Exception
                                       */
index 2a53da39738a61dfde8ba6727007cd5003f644e8..a78968ab79a64b88f9ae64bfc731c44760ac1f6b 100644 (file)
@@ -45,6 +45,18 @@ MappingQEulerian (const unsigned int degree,
 { }
 
 
+
+template <int dim, class EulerVectorType>
+Mapping<dim> *
+MappingQEulerian<dim, EulerVectorType>::clone () const
+{
+  return new MappingQEulerian<dim,EulerVectorType>(this->get_degree(),
+                                                  euler_vector,
+                                                  *euler_dof_handler);
+}
+
+
+
 // .... SUPPORT QUADRATURE CONSTRUCTOR
 
 template <int dim, class EulerVectorType>

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.