]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
New transform_unit_to_real_cell function in FiniteElement
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 12 Oct 2000 11:55:41 +0000 (11:55 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 12 Oct 2000 11:55:41 +0000 (11:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@3428 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe.h
deal.II/deal.II/include/fe/fe_system.h
deal.II/deal.II/include/fe/q1_mapping.h
deal.II/deal.II/source/fe/fe_system.cc
deal.II/deal.II/source/fe/q1_mapping.cc

index 438c4c6350927ef0c750bc5ea885bd30dbb1769a..b3d0fc17c055fdee53070fb3e2ee268eec0c6844 100644 (file)
@@ -194,7 +194,7 @@ class FiniteElementData
     unsigned int n_components () const;
 
                                     /**
-                                     * Return the @p{transform_functions}.
+                                     * Return the value of @p{transform_functions}.
                                      */
     unsigned int n_transform_functions () const;
 
@@ -1077,6 +1077,15 @@ class FiniteElement : public FiniteElementBase<dim>
     virtual Tensor<2,dim> shape_grad_grad (const unsigned int  i,
                                           const Point<dim>   &p) const = 0;
 
+                                    /**
+                                     * Transforms the point @p{p} on
+                                     * the unit cell to the point
+                                     * @p{p_real} on the real cell
+                                     * @p{cell} and returns @p{p_real}.
+                                     */
+    virtual Point<dim> transform_unit_to_real_cell (const DoFHandler<dim>::cell_iterator cell,
+                                                   const Point<dim> &p) const = 0;
+    
                                     /**
                                      * Return the value of the
                                      * @p{i}th shape function of the
index 4b9d753ed4721caec475fbb377d5d0940e1edeac..9ee12608c762adfecbdf256fdb334dc9151b78b5 100644 (file)
@@ -251,6 +251,22 @@ class FESystem : public FiniteElement<dim>
     virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
                                        FullMatrix<double> &local_mass_matrix) const;
 
+                                    /**
+                                     * Transforms the point @p{p} on
+                                     * the unit cell to the point
+                                     * @p{p_real} on the real cell
+                                     * @p{cell} and returns
+                                     * @p{p_real}. As the
+                                     * transformation mapping of each
+                                     * @p{FiniteElement} of this
+                                     * @p{FESystem} should be the
+                                     * same, this function just calls
+                                     * the @p{transform} function of
+                                     * @p{base_element(0)}.
+                                     */
+    virtual Point<dim> transform_unit_to_real_cell (const DoFHandler<dim>::cell_iterator cell,
+                                                   const Point<dim> &p) const;
+
                                     /**
                                      * Return the value of the @p{i}th shape
                                      * function of the transformation mapping
index 3a554a15eeb57db92fd7d4b449f1e06c6dce86ce..ee47fc6e63448a29f1eec64279ed6f30e6b9458b 100644 (file)
@@ -47,6 +47,15 @@ class FEQ1Mapping : public FiniteElement<dim>
                 const unsigned int  n_components,
                 const vector<bool> &restriction_is_additive_flags);
 
+                                    /**
+                                     * Transforms the point @p{p} on
+                                     * the unit cell to the point
+                                     * @p{p_real} on the real cell
+                                     * @p{cell} and returns @p{p_real}.
+                                     */
+    virtual Point<dim> transform_unit_to_real_cell (const DoFHandler<dim>::cell_iterator cell,
+                                                   const Point<dim> &p) const;
+    
                                     /**
                                      * Return the value of the @p{i}th shape
                                      * function at point @p{p} on the unit cell.
index 6a2c7fbfb938f2ca3b7b26a002f2d67dd9e17627..883a6d7dfe3a113b430ef89e6de88b0b8dd809d6 100644 (file)
@@ -13,6 +13,9 @@
 
 
 #include <fe/fe_system.h>
+#include <grid/tria_iterator.h>
+#include <dofs/dof_accessor.h>
+
 
 
 template <int dim>
@@ -921,6 +924,15 @@ void FESystem<dim>::get_local_mass_matrix (const DoFHandler<dim>::cell_iterator
 };
 
 
+template <int dim>
+Point<dim> FESystem<dim>::transform_unit_to_real_cell (
+  const DoFHandler<dim>::cell_iterator cell,
+  const Point<dim> &p) const
+{
+  return base_elements[0].first->transform_unit_to_real_cell(cell, p);
+};
+
+
 template <int dim>
 double FESystem<dim>::shape_value_transform (const unsigned int i,
                                             const Point<dim>  &p) const
index 7ce933a7a9d97948606b3e1898193a886687e84f..3633c5c78443eaab4786d38bc007fc8b6c4e17a9 100644 (file)
@@ -531,6 +531,18 @@ void FEQ1Mapping<3>::get_normal_vectors (const DoFHandler<3>::cell_iterator &/*c
 #endif
 
 
+template <int dim>
+Point<dim> FEQ1Mapping<dim>::transform_unit_to_real_cell (
+  const DoFHandler<dim>::cell_iterator cell,
+  const Point<dim> &p) const
+{
+  Point<dim> p_real;
+  for (unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i)
+    p_real+=cell->vertex(i) * shape_value_transform (i, p);
+  return p_real;
+}
+
+
 template <int dim>
 void FEQ1Mapping<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator &cell,
                                       const vector<Point<dim> >            &unit_points,

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.