std::vector<Point<spacedim> > &points) const;
+ /**
+ * Implementation of the Mapping::get_data() interface.
+ *
+ * As allowed by C++ (using a feature called "covariant return
+ * types"), this function returns a pointer to a
+ * MappingQ::InternalData object since these objects are
+ * derived from the Mapping::InternalDataBase class, pointers to
+ * which are returned by the Mapping::get_data() function. This
+ * makes some uses of this function simpler.
+ */
virtual
- typename Mapping<dim,spacedim>::InternalDataBase *
+ InternalData *
get_data (const UpdateFlags,
const Quadrature<dim> &quadrature) const;
*/
virtual UpdateFlags update_each (const UpdateFlags flags) const;
+ /**
+ * Implementation of the Mapping::get_data() interface.
+ *
+ * As allowed by C++ (using a feature called "covariant return
+ * types"), this function returns a pointer to a
+ * MappingQ1::InternalData object since these objects are
+ * derived from the Mapping::InternalDataBase class, pointers to
+ * which are returned by the Mapping::get_data() function. This
+ * makes some uses of this function simpler.
+ */
virtual
- typename Mapping<dim,spacedim>::InternalDataBase *
+ InternalData *
get_data (const UpdateFlags,
const Quadrature<dim> &quadrature) const;
template<int dim, int spacedim>
-typename Mapping<dim,spacedim>::InternalDataBase *
+typename MappingQ<dim,spacedim>::InternalData *
MappingQ<dim,spacedim>::get_data (const UpdateFlags update_flags,
const Quadrature<dim> &quadrature) const
{
// the right size and transformation shape values already computed at point
// p.
const Quadrature<dim> point_quadrature(p);
- std_cxx11::unique_ptr<InternalData>
- mdata (dynamic_cast<InternalData *> (
- get_data(update_transformation_values, point_quadrature)));
+ std_cxx11::unique_ptr<InternalData> mdata (get_data(update_transformation_values,
+ point_quadrature));
mdata->use_mapping_q1_on_current_cell = !(use_mapping_q_on_all_cells ||
cell->has_boundary_lines());
UpdateFlags update_flags = update_transformation_values|update_transformation_gradients;
if (spacedim>dim)
update_flags |= update_jacobian_grads;
- std_cxx11::unique_ptr<InternalData>
- mdata (dynamic_cast<InternalData *> (
- get_data(update_flags,point_quadrature)));
+ std_cxx11::unique_ptr<InternalData> mdata (get_data(update_flags,
+ point_quadrature));
mdata->use_mapping_q1_on_current_cell = false;
template<int dim, int spacedim>
-typename Mapping<dim,spacedim>::InternalDataBase *
+typename MappingQ1<dim,spacedim>::InternalData *
MappingQ1<dim,spacedim>::get_data (const UpdateFlags update_flags,
const Quadrature<dim> &q) const
{
const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const Point<dim> &p) const
{
- // Use the get_data function to
- // create an InternalData with data
- // vectors of the right size and
- // transformation shape values
- // already computed at point p.
+ // Use the get_data function to create an InternalData with data
+ // vectors of the right size and transformation shape values already
+ // computed at point p.
const Quadrature<dim> point_quadrature(p);
- std_cxx11::unique_ptr<InternalData>
- mdata (dynamic_cast<InternalData *> (
- get_data(update_transformation_values, point_quadrature)));
+ std_cxx11::unique_ptr<InternalData> mdata (get_data(update_transformation_values,
+ point_quadrature));
// compute the mapping support
// points
if (spacedim>dim)
update_flags |= update_jacobian_grads;
- std_cxx11::unique_ptr<InternalData>
- mdata(dynamic_cast<InternalData *> (
- MappingQ1<dim,spacedim>::get_data(update_flags, point_quadrature)));
+ std_cxx11::unique_ptr<InternalData> mdata(get_data(update_flags,
+ point_quadrature));
compute_mapping_support_points (cell, mdata->mapping_support_points);
// The support points have to be at