unsigned int n_components () const;
/**
- * Return the @p{transform_functions}.
+ * Return the value of @p{transform_functions}.
*/
unsigned int n_transform_functions () const;
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
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
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.
#include <fe/fe_system.h>
+#include <grid/tria_iterator.h>
+#include <dofs/dof_accessor.h>
+
template <int dim>
};
+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
#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,