]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move more things out of MappingQ1 that don't need to be there.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 16 Sep 2015 22:14:07 +0000 (17:14 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 17 Sep 2015 19:45:32 +0000 (14:45 -0500)
include/deal.II/fe/mapping_q1.h
include/deal.II/fe/mapping_q1_eulerian.h
source/fe/mapping_q1.cc
source/fe/mapping_q1_eulerian.cc

index ee4fbf1f0b1e8c3910a84efdeb16b3db80887d87..91be437bb8f470487bfc0bcbc7023fdbc2b68cf7 100644 (file)
@@ -78,41 +78,6 @@ public:
   /**
    * @}
    */
-
-
-  /**
-   * @name Interface with FEValues
-   * @{
-   */
-
-public:
-  /**
-   * Use the InternalData class of the base class without modification
-   * and additions.
-   */
-  typedef typename MappingQGeneric<dim,spacedim>::InternalData InternalData;
-
-  /**
-   * @}
-   */
-
-protected:
-
-  /**
-   * Computes the support points of the mapping. For @p MappingQ1 these are
-   * the vertices, as obtained by calling Mapping::get_vertices().
-   *
-   * By default, that function just computes the locations of the vertices as
-   * reported by the Triangulation. However, other classes may override this
-   * function. In particular, the MappingQ1Eulerian class does exactly this by
-   * not computing the support points from the geometry of the current cell but
-   * instead evaluating an externally given displacement field in addition to
-   * the geometry of the cell.
-   */
-  virtual
-  void
-  compute_mapping_support_points(const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                                 std::vector<Point<spacedim> > &a) const;
 };
 
 
index 289a0a8f6fba6dc150d669532118a178e527901c..bd2e3078a5f1fbf8ce2fd2ab5850b827719437ba 100644 (file)
@@ -101,7 +101,10 @@ public:
                      const DoFHandler<dim,spacedim> &shiftmap_dof_handler);
 
   /**
-   * Return the mapped vertices of the cell.
+   * Return the mapped vertices of the cell. For the current class, this function does
+   * not use the support points from the geometry of the current cell but
+   * instead evaluates an externally given displacement field in addition to
+   * the geometry of the cell.
    */
   virtual
   std_cxx11::array<Point<spacedim>, GeometryInfo<dim>::vertices_per_cell>
@@ -146,6 +149,15 @@ protected:
                   const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
                   internal::FEValues::MappingRelatedData<dim,spacedim>      &output_data) const;
 
+  /**
+   * Compute the support points of the mapping. For the current class, these are
+   * the vertices, as obtained by calling Mapping::get_vertices().
+   */
+  virtual
+  void
+  compute_mapping_support_points(const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                                 std::vector<Point<spacedim> > &a) const;
+
   /**
    * Reference to the vector of shifts.
    */
index b375941d9b8b666a0b075f9f7967d80a5c472a97..c4684cd5c35263f4a47eadc6eef0e0820ceedd21 100644 (file)
@@ -181,22 +181,6 @@ namespace internal
 
 
 
-template<int dim, int spacedim>
-void
-MappingQ1<dim,spacedim>::compute_mapping_support_points(
-  const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-  std::vector<Point<spacedim> > &a) const
-{
-  std_cxx11::array<Point<spacedim>, GeometryInfo<dim>::vertices_per_cell>
-  vertices = this->get_vertices(cell);
-
-  a.resize(GeometryInfo<dim>::vertices_per_cell);
-  for (unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
-    a[i] = vertices[i];
-}
-
-
-
 /**
  * Compute an initial guess to pass to the Newton method in
  * transform_real_to_unit_cell.  For the initial guess we proceed in the
@@ -453,7 +437,8 @@ transform_real_to_unit_cell (const typename Triangulation<dim,spacedim>::cell_it
       //MappingQ1. this doesn't currently work because we here really need
       //a Q1 InternalData, but MappingQGeneric produces one with the
       //polynomial degree of the MappingQ
-      std_cxx11::unique_ptr<InternalData> mdata (new InternalData(1));
+      std_cxx11::unique_ptr<typename MappingQGeneric<dim,spacedim>::InternalData>
+      mdata (new typename MappingQGeneric<dim,spacedim>::InternalData(1));
       mdata->initialize (this->requires_update_flags (update_flags), point_quadrature, 1);
 
       compute_mapping_support_points (cell, mdata->mapping_support_points);
index 9d2e75b536855e289a65e18646e0607be0dac6a6..4393d813cb9877dde1f700f3906f97d04c82b789 100644 (file)
@@ -88,6 +88,24 @@ get_vertices
 
 
 
+template<int dim, class EulerVectorType, int spacedim>
+void
+MappingQ1Eulerian<dim,EulerVectorType,spacedim>::
+compute_mapping_support_points(const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                               std::vector<Point<spacedim> > &a) const
+{
+  const std_cxx11::array<Point<spacedim>, GeometryInfo<dim>::vertices_per_cell>
+  vertices = this->get_vertices(cell);
+
+  a.resize(GeometryInfo<dim>::vertices_per_cell);
+  for (unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
+    a[i] = vertices[i];
+}
+
+
+
+
+
 template <int dim, class EulerVectorType, int spacedim>
 MappingQ1Eulerian<dim,EulerVectorType,spacedim> *
 MappingQ1Eulerian<dim, EulerVectorType, spacedim>::clone () const

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.