* transformation @p initial_p_unit. Hence this function assumes that @p
* mdata already includes the transformation shape values and gradients
* computed at @p initial_p_unit.
- *
- * @p mdata will be changed by this function.
*/
Point<dim>
transform_real_to_unit_cell_internal (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const Point<spacedim> &p,
- const Point<dim> &initial_p_unit,
- InternalData &mdata) const;
+ const Point<dim> &initial_p_unit) const;
/**
* For <tt>dim=2,3</tt>. Append the support points of all shape
// a better starting point to the following iteration
initial_p_unit = GeometryInfo<dim>::project_to_unit_cell(initial_p_unit);
- const Quadrature<dim> point_quadrature(initial_p_unit);
-
- UpdateFlags update_flags = update_quadrature_points | update_jacobians;
- if (spacedim>dim)
- update_flags |= update_jacobian_grads;
- std_cxx11::unique_ptr<InternalData> mdata (get_data(update_flags,
- point_quadrature));
-
- compute_mapping_support_points (cell, mdata->mapping_support_points);
-
- return this->transform_real_to_unit_cell_internal(cell, p, initial_p_unit, *mdata);
+ return this->transform_real_to_unit_cell_internal(cell, p, initial_p_unit);
}
else
return initial_p_unit;
// cell), then project it back into the reference cell in hopes
// that this gives a better starting point to the following
// iteration
- const Quadrature<dim> point_quadrature(initial_p_unit);
-
- UpdateFlags update_flags = update_quadrature_points | update_jacobians;
- if (spacedim>dim)
- update_flags |= update_jacobian_grads;
-
- std_cxx11::unique_ptr<typename MappingQGeneric<dim,spacedim>::InternalData>
- mdata (this->get_data(update_flags,
- point_quadrature));
- mdata->mapping_support_points = a;
// perform the Newton iteration and
// return the result. note that this
// statement may throw an exception, which
// we simply pass up to the caller
- return this->transform_real_to_unit_cell_internal(cell, p, initial_p_unit,
- *mdata);
+ return this->transform_real_to_unit_cell_internal(cell, p, initial_p_unit);
}
}
Point<dim>
MappingQGeneric<dim,spacedim>::
transform_real_to_unit_cell_internal
-(const typename Triangulation<dim,spacedim>::cell_iterator &/*cell*/,
- const Point<spacedim> &/*p*/,
- const Point<dim> &/*initial_p_unit*/,
- InternalData &/*mdata*/) const
+(const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const Point<spacedim> &p,
+ const Point<dim> &initial_p_unit) const
{
- // default implementation (should never be called)
- Assert(false, ExcInternalError());
- return Point<dim>();
-}
+ const Quadrature<dim> point_quadrature(initial_p_unit);
-template<>
-Point<1>
-MappingQGeneric<1, 1>::
-transform_real_to_unit_cell_internal
-(const Triangulation<1, 1>::cell_iterator &cell,
- const Point<1> &p,
- const Point<1> &initial_p_unit,
- InternalData &mdata) const
-{
- return do_transform_real_to_unit_cell_internal(cell, p, initial_p_unit, mdata);
+ UpdateFlags update_flags = update_quadrature_points | update_jacobians;
+ if (spacedim>dim)
+ update_flags |= update_jacobian_grads;
+ std_cxx11::unique_ptr<InternalData> mdata (get_data(update_flags,
+ point_quadrature));
+
+ compute_mapping_support_points (cell, mdata->mapping_support_points);
+
+ // dispatch to the various specializations for spacedim=dim,
+ // spacedim=dim+1, etc
+ return do_transform_real_to_unit_cell_internal (cell, p, initial_p_unit, *mdata);
}
template<>