]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a check for translation of vertices by mapping. Use this to improve DataOut.
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 24 Nov 2009 00:03:32 +0000 (00:03 +0000)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 24 Nov 2009 00:03:32 +0000 (00:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@20158 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/mapping.h
deal.II/deal.II/include/fe/mapping_cartesian.h
deal.II/deal.II/include/fe/mapping_q.h
deal.II/deal.II/include/fe/mapping_q1.h
deal.II/deal.II/include/fe/mapping_q1_eulerian.h
deal.II/deal.II/source/dofs/dof_renumbering.cc
deal.II/deal.II/source/numerics/data_out.cc

index ad7c193492f2e0cbb2c3c217cecd60241d50a3aa..3e57fe9a1d31b9eda38d5b3636c95ed4241fd6ab 100644 (file)
@@ -443,6 +443,16 @@ class Mapping : public Subscriptor
     virtual
     Mapping<dim,spacedim> * clone () const = 0;
     
+                                    /**
+                                     * Returns whether the mapping preserves
+                                     * vertex locations. Returns @p true for
+                                     * MappingQ, MappingQ1, MappingCartesian,
+                                     * but @p false for MappingQEulerian,
+                                     * MappingQ1Eulerian.
+                                     */
+    virtual
+    bool preserves_vertex_locations () const = 0;
+
                                     /**
                                      * Exception
                                      */
index 8fa505d91a6824af33d1694b38bc03ba3b8471a2..737a0b06a5e20ca3ca282b4fe0ea6a237d1a59ec 100644 (file)
@@ -32,7 +32,7 @@ DEAL_II_NAMESPACE_OPEN
  * along the coordinate directions. It is specifically developed for
  * cartesian meshes. Apply this mapping to a general mesh to get
  * strange results.
- * 
+ *
  * For more information about the <tt>spacedim</tt> template parameter
  * check the documentation of FiniteElement or the one of
  * Triangulation.
@@ -101,8 +101,8 @@ class MappingCartesian : public Mapping<dim,spacedim>
     transform (const VectorSlice<const std::vector<Tensor<2,dim> > > input,
                VectorSlice<std::vector<Tensor<2,spacedim> > > output,
                const typename Mapping<dim,spacedim>::InternalDataBase &internal,
-              const MappingType type) const;    
-    
+              const MappingType type) const;
+
     virtual Point<spacedim>
     transform_unit_to_real_cell (
       const typename Triangulation<dim,spacedim>::cell_iterator &cell,
@@ -122,7 +122,7 @@ class MappingCartesian : public Mapping<dim,spacedim>
     transform_real_to_unit_cell (
       const typename Triangulation<dim,spacedim>::cell_iterator &cell,
       const Point<spacedim>                            &p) const;
-    
+
 
                                      /**
                                       * Return a pointer to a copy of the
@@ -131,9 +131,16 @@ class MappingCartesian : public Mapping<dim,spacedim>
                                       */
     virtual
     Mapping<dim, spacedim> * clone () const;
-    
+
+                                    /**
+                                     * Always returns @p true because
+                                     * MappingCartesian preserves vertex
+                                     * locations.
+                                     */
+    bool preserves_vertex_locations () const;
+
   protected:
-                                    /** 
+                                    /**
                                      * Storage for internal data of
                                      * the scaling.
                                      */
@@ -165,7 +172,7 @@ class MappingCartesian : public Mapping<dim,spacedim>
                                          * The volume element
                                          */
        double volume_element;
-       
+
                                         /**
                                          * Vector of all quadrature
                                          * points. Especially, all
@@ -173,7 +180,7 @@ class MappingCartesian : public Mapping<dim,spacedim>
                                          */
        std::vector<Point<dim> > quadrature_points;
     };
-    
+
                                     /**
                                      * Do the computation for the
                                      * <tt>fill_*</tt> functions.
@@ -187,21 +194,33 @@ class MappingCartesian : public Mapping<dim,spacedim>
                       std::vector<Point<dim> >& normal_vectors) const;
 
   private:
-    virtual UpdateFlags update_once (const UpdateFlags) const;    
+    virtual UpdateFlags update_once (const UpdateFlags) const;
     virtual UpdateFlags update_each (const UpdateFlags) const;
-    
+
                                     /**
                                      * Value to indicate that a given
                                      * face or subface number is
                                      * invalid.
                                      */
-    static const unsigned int invalid_face_number = numbers::invalid_unsigned_int;    
+    static const unsigned int invalid_face_number = numbers::invalid_unsigned_int;
 };
 
 /*@}*/
 
 /* -------------- declaration of explicit specializations ------------- */
 
+#ifndef DOXYGEN
+
+template <int dim, int spacedim>
+inline
+bool
+MappingCartesian<dim,spacedim>::preserves_vertex_locations () const
+{
+  return true;
+}
+
+#endif // DOXYGEN
+
 DEAL_II_NAMESPACE_CLOSE
 
 #endif
index deb56a34f1be83300ed3e4a1826050d823ddb7b9..4dfe95605efc41e227d7ecbc352486842bcd1b6b 100644 (file)
@@ -35,7 +35,7 @@ template <int dim> class TensorProductPolynomials;
  * For more details about Qp-mappings, see the `mapping' report at
  * <tt>deal.II/doc/reports/mapping_q/index.html</tt> in the `Reports'
  * section of `Documentation'.
- * 
+ *
  * For more information about the <tt>spacedim</tt> template parameter
  * check the documentation of FiniteElement or the one of
  * Triangulation.
@@ -89,7 +89,7 @@ class MappingQ : public MappingQ1<dim,spacedim>
                                      * Destructor.
                                      */
     virtual ~MappingQ ();
-    
+
                                     /**
                                      * Transforms the point @p p on
                                      * the unit cell to the point
@@ -100,7 +100,7 @@ class MappingQ : public MappingQ1<dim,spacedim>
     transform_unit_to_real_cell (
       const typename Triangulation<dim,spacedim>::cell_iterator &cell,
       const Point<dim>                                 &p) const;
-    
+
                                     /**
                                      * Transforms the point @p p on
                                      * the real cell to the point
@@ -127,7 +127,7 @@ class MappingQ : public MappingQ1<dim,spacedim>
                VectorSlice<std::vector<Tensor<2,spacedim> > > output,
                const typename Mapping<dim,spacedim>::InternalDataBase &internal,
               const MappingType type) const;
-    
+
                                     /**
                                      * Return the degree of the
                                      * mapping, i.e. the value which
@@ -142,8 +142,8 @@ class MappingQ : public MappingQ1<dim,spacedim>
                                       */
     virtual
     Mapping<dim,spacedim> * clone () const;
-    
-                                    /** 
+
+                                    /**
                                      * Storage for internal data of
                                      * Q_degree transformation.
                                      */
@@ -154,7 +154,7 @@ class MappingQ : public MappingQ1<dim,spacedim>
                                          * Constructor.
                                          */
        InternalData (const unsigned int n_shape_functions);
-       
+
 
                                         /**
                                          * Return an estimate (in
@@ -189,7 +189,7 @@ class MappingQ : public MappingQ1<dim,spacedim>
                                          * used.
                                          */
        bool use_mapping_q1_on_current_cell;
-       
+
                                         /**
                                          * On interior cells
                                          * @p MappingQ1 is used.
@@ -297,9 +297,9 @@ class MappingQ : public MappingQ1<dim,spacedim>
     virtual void
     add_quad_support_points(const typename Triangulation<dim,spacedim>::cell_iterator &cell,
                            std::vector<Point<dim> > &a) const;
-    
+
   private:
-    
+
     virtual
     typename Mapping<dim,spacedim>::InternalDataBase *
     get_data (const UpdateFlags,
@@ -314,7 +314,7 @@ class MappingQ : public MappingQ1<dim,spacedim>
     typename Mapping<dim,spacedim>::InternalDataBase *
     get_subface_data (const UpdateFlags flags,
                      const Quadrature<dim-1>& quadrature) const;
-    
+
                                     /**
                                      * Compute shape values and/or
                                      * derivatives.
@@ -342,7 +342,7 @@ class MappingQ : public MappingQ1<dim,spacedim>
                                      */
     void
     set_laplace_on_quad_vector(Table<2,double> &loqvs) const;
-    
+
                                     /**
                                      * This function is needed by the
                                      * constructor of <tt>MappingQ<3></tt>.
@@ -360,7 +360,7 @@ class MappingQ : public MappingQ1<dim,spacedim>
                                      * of the `mapping' report.
                                      */
     void set_laplace_on_hex_vector(Table<2,double> &lohvs) const;
-    
+
                                     /**
                                      * Computes the
                                      * <tt>laplace_on_quad(hex)_vector</tt>.
@@ -397,7 +397,7 @@ class MappingQ : public MappingQ1<dim,spacedim>
                                      */
     void apply_laplace_vector(const Table<2,double>   &lvs,
                              std::vector<Point<dim> > &a) const;
-    
+
                                     /**
                                      * Computes the support points of
                                      * the mapping.
@@ -423,7 +423,7 @@ class MappingQ : public MappingQ1<dim,spacedim>
     void compute_support_points_laplace(
       const typename Triangulation<dim,spacedim>::cell_iterator &cell,
       std::vector<Point<dim> > &a) const;
-    
+
                                     /**
                                      * Needed by the
                                      * @p laplace_on_quad function
@@ -445,7 +445,7 @@ class MappingQ : public MappingQ1<dim,spacedim>
                                      * `mapping' report.
                                      */
     Table<2,double> laplace_on_quad_vector;
-    
+
                                     /**
                                      * Needed by the
                                      * @p laplace_on_hex function
@@ -464,13 +464,13 @@ class MappingQ : public MappingQ1<dim,spacedim>
     DeclException1 (ExcLaplaceVectorNotSet,
                    int,
                    << "laplace_vector not set for degree=" << arg1 << ".");
-     
+
                                     /**
                                      * Degree @p p of the
                                      * polynomials used as shape
                                      * functions for the Qp mapping
                                      * of cells at the boundary.
-                                     */  
+                                     */
     const unsigned int degree;
 
                                     /**
@@ -484,7 +484,7 @@ class MappingQ : public MappingQ1<dim,spacedim>
                                      * functions on the boundary.
                                      */
     const unsigned int n_outer;
-    
+
                                     /**
                                      * Pointer to the
                                      * @p dim-dimensional tensor
@@ -494,7 +494,7 @@ class MappingQ : public MappingQ1<dim,spacedim>
                                      * boundary.
                                      */
     const TensorProductPolynomials<dim> *tensor_pols;
-    
+
                                     /**
                                      * Number of the Qp tensor
                                      * product shape functions.
index 8df810df35238be553e2c8369f16183e641f1c61..f3ef1992fc3ece55644456f019c25500646231d2 100644 (file)
@@ -41,7 +41,7 @@ DEAL_II_NAMESPACE_OPEN
  * Shape function for this mapping are the same as for the finite
  * element FE_Q of order 1. Therefore, coupling these two yields
  * an isoparametric element.
- * 
+ *
  * For more information about the <tt>spacedim</tt> template parameter
  * check the documentation of FiniteElement or the one of
  * Triangulation.
@@ -56,12 +56,12 @@ class MappingQ1 : public Mapping<dim,spacedim>
                                      * Default constructor.
                                      */
     MappingQ1 ();
-    
+
     virtual Point<spacedim>
     transform_unit_to_real_cell (
       const typename Triangulation<dim,spacedim>::cell_iterator &cell,
       const Point<dim>                                 &p) const;
-    
+
                                     /**
                                      * Transforms the point @p p on
                                      * the real cell to the point
@@ -76,7 +76,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
     transform_real_to_unit_cell (
       const typename Triangulation<dim,spacedim>::cell_iterator &cell,
       const Point<spacedim>                            &p) const;
-    
+
     virtual void
     transform (const VectorSlice<const std::vector<Tensor<1,dim> > > input,
                VectorSlice<std::vector<Tensor<1,spacedim> > > output,
@@ -88,7 +88,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                VectorSlice<std::vector<Tensor<2,spacedim> > > output,
                const typename Mapping<dim,spacedim>::InternalDataBase &internal,
               const MappingType type) const;
-    
+
                                      /**
                                       * Return a pointer to a copy of the
                                       * present object. The caller of this
@@ -97,7 +97,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
     virtual
     Mapping<dim,spacedim> * clone () const;
 
-                                    /** 
+                                    /**
                                      * Storage for internal data of
                                      * d-linear transformation.
                                      */
@@ -119,14 +119,14 @@ class MappingQ1 : public Mapping<dim,spacedim>
                                          */
        double shape (const unsigned int qpoint,
                      const unsigned int shape_nr) const;
-       
+
                                         /**
                                          * Shape function at quadrature
                                          * point. See above.
                                          */
        double &shape (const unsigned int qpoint,
                       const unsigned int shape_nr);
-       
+
                                         /**
                                          * Gradient of shape function
                                          * in quadrature point. See
@@ -166,7 +166,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                                          * object.
                                          */
        virtual unsigned int memory_consumption () const;
-       
+
                                         /**
                                          * Values of shape
                                          * functions. Access by
@@ -175,7 +175,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                                          * Computed once.
                                          */
        std::vector<double> shape_values;
-       
+
                                         /**
                                          * Values of shape function
                                          * derivatives. Access by
@@ -184,7 +184,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                                          * Computed once.
                                          */
        std::vector<Tensor<1,dim> > shape_derivatives;
-       
+
                                         /**
                                          * Values of shape function
                                          * second derivatives. Access
@@ -194,7 +194,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                                          * Computed once.
                                          */
        std::vector<Tensor<2,dim> > shape_second_derivatives;
-       
+
                                         /**
                                          * Tensors of covariant
                                          * transformation at each of
@@ -209,7 +209,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                                          * Computed on each cell.
                                          */
        std::vector<Tensor<2,spacedim> > covariant;
-       
+
                                         /**
                                          * Tensors of contravariant
                                          * transformation at each of
@@ -222,7 +222,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                                          * Computed on each cell.
                                          */
        std::vector<Tensor<2,spacedim> > contravariant;
-       
+
                                         /**
                                          * Unit tangential vectors. Used
                                          * for the computation of
@@ -232,7 +232,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                                          * Filled once.
                                          */
         std::vector<std::vector<Tensor<1,spacedim> > > unit_tangentials;
-       
+
                                         /**
                                          * Auxiliary vectors for internal use.
                                          */
@@ -244,14 +244,14 @@ class MappingQ1 : public Mapping<dim,spacedim>
                                          * the @p cell_of_current_support_points.
                                          */
        std::vector<Point<spacedim> > mapping_support_points;
-       
+
                                         /**
                                          * Stores the cell of which the
                                          * @p mapping_support_points are
                                          * stored.
                                          */
        typename Triangulation<dim,spacedim>::cell_iterator cell_of_current_support_points;
-       
+
                                         /**
                                          * Default value of this flag
                                          * is @p true. If <tt>*this</tt>
@@ -287,7 +287,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
     typedef
     typename QProjector<dim>::DataSetDescriptor
     DataSetDescriptor;
-    
+
                                     /**
                                      * Implementation of the interface in
                                      * Mapping.
@@ -332,7 +332,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                            std::vector<double>             &JxW_values,
                            typename std::vector<Tensor<1,dim> >        &boundary_form,
                            typename std::vector<Point<spacedim> >        &normal_vectors) const ;
-    
+
                                     /**
                                      * Compute shape values and/or
                                      * derivatives.
@@ -377,7 +377,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                            const Quadrature<dim> &quadrature,
                            const unsigned int n_orig_q_points,
                            InternalData &data) const;
-    
+
                                     /**
                                      * Do the computation for the
                                      * <tt>fill_*</tt> functions.
@@ -388,7 +388,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                       const CellSimilarity::Similarity cell_similarity,
                       InternalData           &data,
                       std::vector<Point<spacedim> > &quadrature_points) const;
-    
+
                                     /**
                                      * Do the computation for the
                                      * <tt>fill_*</tt> functions.
@@ -404,7 +404,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                            std::vector<double>         &JxW_values,
                            std::vector<Tensor<1,dim> > &boundary_form,
                            std::vector<Point<spacedim> > &normal_vectors) const;
-    
+
                                     /**
                                      * Compute shape values and/or
                                      * derivatives.
@@ -439,7 +439,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                                      * support points.
                                      */
     Point<spacedim> transform_unit_to_real_cell_internal (const InternalData &mdata) const;
-    
+
                                     /**
                                      * Transforms the point @p p on
                                      * the real cell to the point
@@ -479,6 +479,13 @@ class MappingQ1 : public Mapping<dim,spacedim>
                                               InternalData &mdata,
                                               Point<dim> &p_unit) const;
 
+                                    /**
+                                     * Always returns @p true because
+                                     * MappingQ1 preserves vertex locations.
+                                     */
+    virtual
+    bool preserves_vertex_locations () const;
+
   private:
                                     /**
                                      * Implementation of the interface in
@@ -509,7 +516,7 @@ class MappingQ1 : public Mapping<dim,spacedim>
                                      * </ul>
                                      */
     virtual UpdateFlags update_once (const UpdateFlags flags) const;
-    
+
                                     /**
                                      * Implementation of the interface in
                                      * Mapping.
@@ -700,6 +707,15 @@ MappingQ1<dim,spacedim>::InternalData::second_derivative (const unsigned int qpo
 }
 
 
+
+template <int dim, int spacedim>
+inline
+bool
+MappingQ1<dim,spacedim>::preserves_vertex_locations () const
+{
+  return true;
+}
+
 #endif // DOXYGEN
 
 /* -------------- declaration of explicit specializations ------------- */
index 6cb5a0fcd9f396aac2cb49b71ad7a12b58821496..0077db0097e6da38e6aa252bd43d932669d143ef 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <base/config.h>
 #include <base/smartpointer.h>
-#include <fe/mapping_q1.h> 
+#include <fe/mapping_q1.h>
 
 DEAL_II_NAMESPACE_OPEN
 
@@ -27,19 +27,19 @@ DEAL_II_NAMESPACE_OPEN
  * functions. Each cell is thus shifted in space by values given to
  * the mapping through a finite element field.
  *
- * <h3>Usage</h3> 
+ * <h3>Usage</h3>
  *
  * The constructor of this class takes two arguments: a reference to
  * the vector that defines the mapping from the reference
  * configuration to the current configuration and a reference to the
  * DoFHandler. The vector should then represent a (flattened out
- * version of a) vector valued field defined at nodes defined by the 
+ * version of a) vector valued field defined at nodes defined by the
  * the DoFHandler, where the number of components of the vector
- * field equals the number of space dimensions. Thus, the 
- * DoFHandler shall operate on a finite element that has as many 
- * components as space dimensions. As an additional requirement, we 
+ * field equals the number of space dimensions. Thus, the
+ * DoFHandler shall operate on a finite element that has as many
+ * components as space dimensions. As an additional requirement, we
  * impose that it have as many degree of freedom per vertex as there
- * are space dimensions; since this object only evaluates the finite 
+ * are space dimensions; since this object only evaluates the finite
  * element field at the vertices, the values
  * of all other degrees of freedom (not associated to vertices) are
  * ignored. These requirements are met if the finite element which the
@@ -77,7 +77,7 @@ DEAL_II_NAMESPACE_OPEN
  * 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!
- * 
+ *
  * For more information about the <tt>spacedim</tt> template parameter
  * check the documentation of FiniteElement or the one of
  * Triangulation.
@@ -112,7 +112,7 @@ class MappingQ1Eulerian : public MappingQ1<dim,spacedim>
                                      */
     MappingQ1Eulerian (const VECTOR  &euler_transform_vectors,
                        const DoFHandler<dim,spacedim> &shiftmap_dof_handler);
-    
+
                                      /**
                                       * Return a pointer to a copy of the
                                       * present object. The caller of this
@@ -121,12 +121,19 @@ class MappingQ1Eulerian : public MappingQ1<dim,spacedim>
     virtual
     Mapping<dim,spacedim> * clone () const;
 
-    
+                                    /**
+                                     * Always returns @p false because
+                                     * MappingQ1Eulerian does not preserve
+                                     * vertex locations.
+                                     */
+    bool preserves_vertex_locations () const;
+
+
                                     /**
                                      * Exception
                                      */
     DeclException0 (ExcWrongNoOfComponents);
-    
+
                                     /**
                                      * Exception.
                                      */
@@ -166,16 +173,16 @@ class MappingQ1Eulerian : public MappingQ1<dim,spacedim>
                                      * shifts.
                                      */
     const VECTOR &euler_transform_vectors;
-    
+
                                      /**
                                      * Pointer to the DoFHandler to
                                      * which the mapping vector is
                                      * associated.
                                      */
     const SmartPointer<const DoFHandler<dim,spacedim>,MappingQ1Eulerian<dim,VECTOR,spacedim> > shiftmap_dof_handler;
-    
 
-  private:    
+
+  private:
                                     /**
                                      * Computes the support points of
                                      * the mapping. For
@@ -185,11 +192,25 @@ class MappingQ1Eulerian : public MappingQ1<dim,spacedim>
     virtual void compute_mapping_support_points(
        const typename Triangulation<dim,spacedim>::cell_iterator &cell,
       std::vector<Point<spacedim> > &a) const;
-    
+
 };
 
 /*@}*/
 
+/*----------------------------------------------------------------------*/
+
+#ifndef DOXYGEN
+
+template <int dim, class VECTOR, int spacedim>
+inline
+bool
+MappingQ1Eulerian<dim,VECTOR,spacedim>::preserves_vertex_locations () const
+{
+  return false;
+}
+
+#endif // DOXYGEN
+
 DEAL_II_NAMESPACE_CLOSE
 
 #endif
index ab4b2683424fe46a576ffc992fa65ca7ea41d3f7..118e272d2c38646f4d7833935b22aa0bb0aa6b5c 100644 (file)
@@ -887,7 +887,7 @@ namespace DoFRenumbering
                                     // Actually, we compute the
                                     // inverse of the reordering
                                     // vector, called reverse here.
-                                    // Later, irs inverse is computed
+                                    // Later, its inverse is computed
                                     // into new_indices, which is the
                                     // return argument.
 
index 68e0793ed0ab505fab5ac5ab79e26384c392a923..f23595084ef4bdf6a6e177fac94511b29f4324b9 100644 (file)
@@ -679,13 +679,20 @@ build_one_patch (const std::pair<cell_iterator, unsigned int> *cell_and_index,
                 DataOutBase::Patch<DH::dimension, DH::space_dimension> &patch,
                 const CurvedCellRegion curved_cell_region)
 {
-                                  // use ucd_to_deal map as patch
-                                  // vertices are in the old,
-                                  // unnatural ordering
+                                  // use ucd_to_deal map as patch vertices
+                                  // are in the old, unnatural ordering. if
+                                  // the mapping does not preserve locations
+                                  // (e.g. MappingQEulerian), we need to
+                                  // compute the offset of the vertex for the
+                                  // graphical output. Otherwise, we can just
+                                  // use the vertex info.
   for (unsigned int vertex=0; vertex<GeometryInfo<DH::dimension>::vertices_per_cell; ++vertex)
-    patch.vertices[vertex] = data.mapping_collection[0].transform_unit_to_real_cell
-                            (cell_and_index->first,
-                             GeometryInfo<DH::dimension>::unit_cell_vertex (vertex));
+    if (data.mapping_collection[0].preserves_vertex_locations())
+      patch.vertices[vertex] = cell_and_index->first->vertex(vertex);
+    else
+      patch.vertices[vertex] = data.mapping_collection[0].transform_unit_to_real_cell
+                              (cell_and_index->first,
+                               GeometryInfo<DH::dimension>::unit_cell_vertex (vertex));
 
   if (data.n_datasets > 0)
     {

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.