]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Introduced the type of the Euler vector as a template parameter.
authoroliver <oliver@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 May 2005 15:18:56 +0000 (15:18 +0000)
committeroliver <oliver@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 31 May 2005 15:18:56 +0000 (15:18 +0000)
git-svn-id: https://svn.dealii.org/trunk@10789 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/mapping_q1_eulerian.h

index d47fa173fcb0f676b0ac855d4686f98ab600b0fe..4e5b949d2b9f6ed11e0833cd529b0c79d1acd84f 100644 (file)
  * make sure that whenever you use this object, the given objects
  * still represent valid data.
  *
+ * To enable the use of the MappingQ1Eulerian class also in the context
+ * of parallel codes using the PETSc wrapper classes, the type of
+ * the vector can be specified as template parameter <tt>EulerVectorType</tt>
+ * Not specifying this template argument in applications using the PETSc
+ * vector classes leads to the construction of a copy of the vector
+ * which is not acccessible afterwards!
+ *
  * @author Michael Stadler, 2001
  */
-template <int dim>
+template <int dim, class EulerVectorType = Vector<double> >
 class MappingQ1Eulerian : public MappingQ1<dim>
 {
   public:
@@ -98,7 +105,7 @@ class MappingQ1Eulerian : public MappingQ1<dim>
                                      * can be initialized by
                                      * <tt>DoFObjectAccessor::set_dof_values()</tt>.
                                      */
-    MappingQ1Eulerian (const Vector<double>  &euler_transform_vectors,
+    MappingQ1Eulerian (const EulerVectorType  &euler_transform_vectors,
                        const DoFHandler<dim> &shiftmap_dof_handler);
 
 
@@ -128,7 +135,7 @@ class MappingQ1Eulerian : public MappingQ1<dim>
                                      * Reference to the vector of
                                      * shifts.
                                      */
-    const Vector<double> &euler_transform_vectors;
+    const EulerVectorType &euler_transform_vectors;
     
                                      /**
                                      * Pointer to the DoFHandler to

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.