This patch simply moves the InternalDataBase, get_*_data() and fill_fe_*_values()
members of the derived mapping classes into a doxygen group. No changes in
functionality. No changes in text either.
class MappingCartesian : public Mapping<dim,spacedim>
{
public:
+private:
+
+ /**
+ * @name Interface with FEValues
+ * @{
+ */
+
// documentation can be found in Mapping::get_data()
virtual
typename Mapping<dim, spacedim>::InternalDataBase *
get_subface_data (const UpdateFlags flags,
const Quadrature<dim-1>& quadrature) const;
- /**
- * Compute mapping-related information for a cell.
- * See the documentation of Mapping::fill_fe_values() for
- * a discussion of purpose, arguments, and return value of this function.
- */
+ // documentation can be found in Mapping::fill_fe_values()
virtual
CellSimilarity::Similarity
fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
- /**
- * Compute mapping-related information for a face of a cell.
- * See the documentation of Mapping::fill_fe_face_values() for
- * a discussion of purpose and arguments of this function.
- */
+ // documentation can be found in Mapping::fill_fe_face_values()
virtual void
fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
- /**
- * Compute mapping-related information for a child of a face of a cell.
- * See the documentation of Mapping::fill_fe_subface_values() for
- * a discussion of purpose and arguments of this function.
- */
+ // documentation can be found in Mapping::fill_fe_subface_values()
virtual void
fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
+ /**
+ * @}
+ */
+
virtual void
transform (const VectorSlice<const std::vector<Tensor<1,dim> > > input,
VectorSlice<std::vector<Tensor<1,spacedim> > > output,
Mapping<dim,spacedim> *clone () const;
+
+ /**
+ * Always returns @p false.
+ */
+ virtual
+ bool preserves_vertex_locations () const;
+
+ DeclException0(ExcInactiveCell);
+
+protected:
+
+ /**
+ * This function and the next allow to generate the transform require by the
+ * virtual transform() in mapping, but unfortunately in C++ one cannot
+ * declare a virtual template function.
+ */
+ template < int rank >
+ void
+ transform_fields(const VectorSlice<const std::vector<Tensor<rank,dim> > > input,
+ VectorSlice< std::vector<Tensor<rank,spacedim> > > output,
+ const typename Mapping<dim,spacedim>::InternalDataBase &internal,
+ const MappingType type) const;
+
+
+ /**
+ * see doc in transform_fields
+ */
+ template < int rank >
+ void
+ transform_differential_forms(
+ const VectorSlice<const std::vector<DerivativeForm<rank, dim,spacedim> > > input,
+ VectorSlice<std::vector<Tensor<rank+1, spacedim> > > output,
+ const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
+ const MappingType mapping_type) const;
+
+
+protected:
+ /**
+ * Reference to the vector of shifts.
+ */
+
+ SmartPointer<const VECTOR, MappingFEField<dim,spacedim,DH,VECTOR> >euler_vector;
+ /**
+ * A FiniteElement object which is only needed in 3D, since it knows how to
+ * reorder shape functions/DoFs on non-standard faces. This is used to
+ * reorder support points in the same way. We could make this a pointer to
+ * prevent construction in 1D and 2D, but since memory and time requirements
+ * are not particularly high this seems unnecessary at the moment.
+ */
+ SmartPointer<const FiniteElement<dim,spacedim>, MappingFEField<dim,spacedim,DH,VECTOR> > fe;
+
+
+ /**
+ * Pointer to the DoFHandler to which the mapping vector is associated.
+ */
+ SmartPointer<const DH,MappingFEField<dim,spacedim,DH,VECTOR> >euler_dof_handler;
+
+
+
+private:
+
+ /**
+ * @name Interface with FEValues
+ * @{
+ */
+
+ // documentation can be found in Mapping::requires_update_flags()
+ virtual
+ UpdateFlags
+ requires_update_flags (const UpdateFlags update_flags) const;
+
+public:
/**
* Storage for internal data of this mapping. See Mapping::InternalDataBase
* for an extensive description.
mutable std::vector<double> local_dof_values;
};
+private:
+ // documentation can be found in Mapping::get_data()
+ virtual
+ InternalData *
+ get_data (const UpdateFlags,
+ const Quadrature<dim> &quadrature) const;
+
+ // documentation can be found in Mapping::get_face_data()
+ virtual
+ typename Mapping<dim,spacedim>::InternalDataBase *
+ get_face_data (const UpdateFlags flags,
+ const Quadrature<dim-1>& quadrature) const;
+
+ // documentation can be found in Mapping::get_subface_data()
+ virtual
+ typename Mapping<dim,spacedim>::InternalDataBase *
+ get_subface_data (const UpdateFlags flags,
+ const Quadrature<dim-1>& quadrature) const;
+
+ // documentation can be found in Mapping::fill_fe_values()
+ virtual
+ CellSimilarity::Similarity
+ fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const CellSimilarity::Similarity cell_similarity,
+ const Quadrature<dim> &quadrature,
+ const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
+ internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
+
+ // documentation can be found in Mapping::fill_fe_face_values()
+ virtual void
+ fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const unsigned int face_no,
+ const Quadrature<dim-1> &quadrature,
+ const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
+ internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
+
+ // documentation can be found in Mapping::fill_fe_subface_values()
+ virtual void
+ fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const unsigned int face_no,
+ const unsigned int subface_no,
+ const Quadrature<dim-1> &quadrature,
+ const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
+ internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
+
+ /**
+ * @}
+ */
+
+private:
/**
* Transforms a point @p p on the unit cell to the point @p p_real on the
* real cell @p cell and returns @p p_real.
const Point<dim> &initial_p_unit,
InternalData &mdata) const;
- /**
- * Always returns @p false.
- */
- virtual
- bool preserves_vertex_locations () const;
-
- DeclException0(ExcInactiveCell);
-
-protected:
- /**
- * Compute mapping-related information for a cell.
- * See the documentation of Mapping::fill_fe_values() for
- * a discussion of purpose, arguments, and return value of this function.
- */
- virtual
- CellSimilarity::Similarity
- fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const CellSimilarity::Similarity cell_similarity,
- const Quadrature<dim> &quadrature,
- const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
- internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
-
- /**
- * Compute mapping-related information for a face of a cell.
- * See the documentation of Mapping::fill_fe_face_values() for
- * a discussion of purpose and arguments of this function.
- */
- virtual void
- fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const unsigned int face_no,
- const Quadrature<dim-1> &quadrature,
- const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
- internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
-
- /**
- * Compute mapping-related information for a child of a face of a cell.
- * See the documentation of Mapping::fill_fe_subface_values() for
- * a discussion of purpose and arguments of this function.
- */
- virtual void
- fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const unsigned int face_no,
- const unsigned int subface_no,
- const Quadrature<dim-1> &quadrature,
- const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
- internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
-
- /**
- * This function and the next allow to generate the transform require by the
- * virtual transform() in mapping, but unfortunately in C++ one cannot
- * declare a virtual template function.
- */
- template < int rank >
- void
- transform_fields(const VectorSlice<const std::vector<Tensor<rank,dim> > > input,
- VectorSlice< std::vector<Tensor<rank,spacedim> > > output,
- const typename Mapping<dim,spacedim>::InternalDataBase &internal,
- const MappingType type) const;
-
-
- /**
- * see doc in transform_fields
- */
- template < int rank >
- void
- transform_differential_forms(
- const VectorSlice<const std::vector<DerivativeForm<rank, dim,spacedim> > > input,
- VectorSlice<std::vector<Tensor<rank+1, spacedim> > > output,
- const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
- const MappingType mapping_type) const;
-
-
-protected:
- /**
- * Reference to the vector of shifts.
- */
-
- SmartPointer<const VECTOR, MappingFEField<dim,spacedim,DH,VECTOR> >euler_vector;
- /**
- * A FiniteElement object which is only needed in 3D, since it knows how to
- * reorder shape functions/DoFs on non-standard faces. This is used to
- * reorder support points in the same way. We could make this a pointer to
- * prevent construction in 1D and 2D, but since memory and time requirements
- * are not particularly high this seems unnecessary at the moment.
- */
- SmartPointer<const FiniteElement<dim,spacedim>, MappingFEField<dim,spacedim,DH,VECTOR> > fe;
-
-
- /**
- * Pointer to the DoFHandler to which the mapping vector is associated.
- */
- SmartPointer<const DH,MappingFEField<dim,spacedim,DH,VECTOR> >euler_dof_handler;
-
-
-
-private:
/**
* Update internal degrees of freedom.
*/
compute_shapes_virtual (const std::vector<Point<dim> > &unit_points,
typename MappingFEField<dim, spacedim>::InternalData &data) const;
- // documentation can be found in Mapping::requires_update_flags()
- virtual
- UpdateFlags
- requires_update_flags (const UpdateFlags update_flags) const;
+ /*
+ * Which components to use for the mapping.
+ */
+ const ComponentMask fe_mask;
+
+
+ /**
+ * Mapping between indices in the FE space and the real space. This vector
+ * contains one index for each component of the finite element space. If the
+ * index is one for which the ComponentMask which is used to construct this
+ * element is false, then numbers::invalid_unsigned_int is returned,
+ * otherwise the component in real space is returned. For example, if we
+ * construct the mapping using ComponentMask(spacedim, true), then this
+ * vector contains {0,1,2} in spacedim = 3.
+ */
+ std::vector<unsigned int> fe_to_real;
/**
* Reimplemented from Mapping. See the documentation of the base class for
const unsigned int n_original_q_points,
InternalData &data) const;
- // documentation can be found in Mapping::get_data()
- virtual
- InternalData *
- get_data (const UpdateFlags,
- const Quadrature<dim> &quadrature) const;
-
- // documentation can be found in Mapping::get_face_data()
- virtual
- typename Mapping<dim,spacedim>::InternalDataBase *
- get_face_data (const UpdateFlags flags,
- const Quadrature<dim-1>& quadrature) const;
-
- // documentation can be found in Mapping::get_subface_data()
- virtual
- typename Mapping<dim,spacedim>::InternalDataBase *
- get_subface_data (const UpdateFlags flags,
- const Quadrature<dim-1>& quadrature) const;
-
-
- /*
- * Which components to use for the mapping.
- */
- const ComponentMask fe_mask;
-
-
- /**
- * Mapping between indices in the FE space and the real space. This vector
- * contains one index for each component of the finite element space. If the
- * index is one for which the ComponentMask which is used to construct this
- * element is false, then numbers::invalid_unsigned_int is returned,
- * otherwise the component in real space is returned. For example, if we
- * construct the mapping using ComponentMask(spacedim, true), then this
- * vector contains {0,1,2} in spacedim = 3.
- */
- std::vector<unsigned int> fe_to_real;
-
/**
* Declare other MappingFEField classes friends.
virtual
Mapping<dim,spacedim> *clone () const;
- /**
- * Storage for internal data of this mapping. See Mapping::InternalDataBase
- * for an extensive description.
- *
- * This includes data that is computed once when the object is created
- * (in get_data()) as well as data the class wants to store from between
- * the call to fill_fe_values(), fill_fe_face_values(), or
- * fill_fe_subface_values() until possible later calls from the finite
- * element to functions such as transform(). The latter class of
- * member variables are marked as 'mutable'.
- *
- * The current class uses essentially the same fields for storage
- * as the MappingQ1 class. Consequently, it inherits from
- * MappingQ1::InternalData, rather than from Mapping::InternalDataBase.
- */
- class InternalData : public MappingQ1<dim,spacedim>::InternalData
- {
- public:
- /**
- * Constructor.
- */
- InternalData (const unsigned int n_shape_functions);
-
-
- /**
- * Return an estimate (in bytes) or the memory consumption of this object.
- */
- virtual std::size_t memory_consumption () const;
-
- /**
- * Flag that is set by the <tt>fill_fe_[[sub]face]_values</tt> function.
- *
- * If this flag is @p true we are on an interior cell and the @p
- * mapping_q1_data is used.
- */
- mutable bool use_mapping_q1_on_current_cell;
-
- /**
- * A structure to store the corresponding information for the pure
- * $Q_1$ mapping that is, by default, used on all interior cells.
- */
- typename MappingQ1<dim,spacedim>::InternalData mapping_q1_data;
- };
protected:
- /**
- * Compute mapping-related information for a cell.
- * See the documentation of Mapping::fill_fe_values() for
- * a discussion of purpose, arguments, and return value of this function.
- */
- virtual
- CellSimilarity::Similarity
- fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const CellSimilarity::Similarity cell_similarity,
- const Quadrature<dim> &quadrature,
- const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
- internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
-
- /**
- * Compute mapping-related information for a face of a cell.
- * See the documentation of Mapping::fill_fe_face_values() for
- * a discussion of purpose and arguments of this function.
- */
- virtual void
- fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const unsigned int face_no,
- const Quadrature<dim-1> &quadrature,
- const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
- internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
-
- /**
- * Compute mapping-related information for a child of a face of a cell.
- * See the documentation of Mapping::fill_fe_subface_values() for
- * a discussion of purpose and arguments of this function.
- */
- virtual void
- fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const unsigned int face_no,
- const unsigned int subface_no,
- const Quadrature<dim-1> &quadrature,
- const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
- internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
/**
* For <tt>dim=2,3</tt>. Append the support points of all shape functions
const TriaIterator &iter,
std::vector<Point<spacedim> > &points) const;
+ /**
+ * @name Interface with FEValues
+ * @{
+ */
+
+protected:
+
+ /**
+ * Storage for internal data of this mapping. See Mapping::InternalDataBase
+ * for an extensive description.
+ *
+ * This includes data that is computed once when the object is created
+ * (in get_data()) as well as data the class wants to store from between
+ * the call to fill_fe_values(), fill_fe_face_values(), or
+ * fill_fe_subface_values() until possible later calls from the finite
+ * element to functions such as transform(). The latter class of
+ * member variables are marked as 'mutable'.
+ *
+ * The current class uses essentially the same fields for storage
+ * as the MappingQ1 class. Consequently, it inherits from
+ * MappingQ1::InternalData, rather than from Mapping::InternalDataBase.
+ */
+ class InternalData : public MappingQ1<dim,spacedim>::InternalData
+ {
+ public:
+ /**
+ * Constructor.
+ */
+ InternalData (const unsigned int n_shape_functions);
+
+
+ /**
+ * Return an estimate (in bytes) or the memory consumption of this object.
+ */
+ virtual std::size_t memory_consumption () const;
+
+ /**
+ * Flag that is set by the <tt>fill_fe_[[sub]face]_values</tt> function.
+ *
+ * If this flag is @p true we are on an interior cell and the @p
+ * mapping_q1_data is used.
+ */
+ mutable bool use_mapping_q1_on_current_cell;
+
+ /**
+ * A structure to store the corresponding information for the pure
+ * $Q_1$ mapping that is, by default, used on all interior cells.
+ */
+ typename MappingQ1<dim,spacedim>::InternalData mapping_q1_data;
+ };
+
// documentation can be found in Mapping::get_data()
virtual
InternalData *
get_subface_data (const UpdateFlags flags,
const Quadrature<dim-1>& quadrature) const;
+ // documentation can be found in Mapping::fill_fe_values()
+ virtual
+ CellSimilarity::Similarity
+ fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const CellSimilarity::Similarity cell_similarity,
+ const Quadrature<dim> &quadrature,
+ const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
+ internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
+
+ // documentation can be found in Mapping::fill_fe_face_values()
+ virtual void
+ fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const unsigned int face_no,
+ const Quadrature<dim-1> &quadrature,
+ const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
+ internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
+
+ // documentation can be found in Mapping::fill_fe_subface_values()
+ virtual void
+ fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const unsigned int face_no,
+ const unsigned int subface_no,
+ const Quadrature<dim-1> &quadrature,
+ const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
+ internal::FEValues::MappingRelatedData<dim,spacedim> &output_data) const;
+
+ /**
+ * @}
+ */
+
/**
* Compute shape values and/or derivatives.
*/
* the reference cell (e.g., using GeometryInfo::is_inside_unit_cell) or
* whether the exception mentioned above has been thrown.
*/
- virtual Point<dim>
- transform_real_to_unit_cell (
- const typename Triangulation<dim,spacedim>::cell_iterator &cell,
- const Point<spacedim> &p) const;
+ virtual
+ Point<dim>
+ transform_real_to_unit_cell (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+ const Point<spacedim> &p) const;
- virtual void
+ virtual
+ void
transform (const VectorSlice<const std::vector<Tensor<1,dim> > > input,
VectorSlice<std::vector<Tensor<1,spacedim> > > output,
const typename Mapping<dim,spacedim>::InternalDataBase &internal,
const MappingType type) const;
- virtual void
+ virtual
+ void
transform (const VectorSlice<const std::vector<DerivativeForm<1, dim,spacedim> > > input,
VectorSlice<std::vector<Tensor<2,spacedim> > > output,
const typename Mapping<dim,spacedim>::InternalDataBase &internal,
protected:
/**
- * This function and the next allow to generate the transform require by the
+ * This function and the next ones allow to generate the transform required by the
* virtual transform() in mapping, but unfortunately in C++ one cannot
* declare a virtual template function.
*/
VectorSlice< std::vector<Tensor<rank,spacedim> > > output,
const typename Mapping<dim,spacedim>::InternalDataBase &internal,
const MappingType type) const;
+
/**
* see doc in transform_fields
*/
const typename Mapping<dim,spacedim>::InternalDataBase &internal,
const MappingType type) const;
+ /**
+ * see doc in transform_fields
+ */
void
transform_hessians(const VectorSlice<const std::vector<Tensor<3,dim> > > input,
VectorSlice<std::vector<Tensor<3,spacedim> > > output,
public:
-
-
-
/**
* Return a pointer to a copy of the present object. The caller of this copy
* then assumes ownership of it.
virtual
Mapping<dim,spacedim> *clone () const;
+
+ /**
+ * Always returns @p true because MappingQ1 preserves vertex locations.
+ */
+ virtual
+ bool preserves_vertex_locations () const;
+
+
+ /**
+ * @name Interface with FEValues
+ * @{
+ */
+
+public:
/**
* Storage for internal data of d-linear mappings. See Mapping::InternalDataBase
* for an extensive description.
mutable std::vector<double> volume_elements;
};
- /**
- * Declare a convenience typedef for the class that describes offsets into
- * quadrature formulas projected onto faces and subfaces.
- */
- typedef
- typename QProjector<dim>::DataSetDescriptor
- DataSetDescriptor;
+protected:
- /**
- * Compute mapping-related information for a cell.
- * See the documentation of Mapping::fill_fe_values() for
- * a discussion of purpose, arguments, and return value of this function.
- */
+ // documentation can be found in Mapping::requires_update_flags()
+ virtual
+ UpdateFlags
+ requires_update_flags (const UpdateFlags update_flags) const;
+
+ // documentation can be found in Mapping::get_data()
+ virtual
+ InternalData *
+ get_data (const UpdateFlags,
+ const Quadrature<dim> &quadrature) const;
+
+ // documentation can be found in Mapping::get_face_data()
+ virtual
+ typename Mapping<dim,spacedim>::InternalDataBase *
+ get_face_data (const UpdateFlags flags,
+ const Quadrature<dim-1>& quadrature) const;
+
+ // documentation can be found in Mapping::get_subface_data()
+ virtual
+ typename Mapping<dim,spacedim>::InternalDataBase *
+ get_subface_data (const UpdateFlags flags,
+ const Quadrature<dim-1>& quadrature) const;
+
+ // documentation can be found in Mapping::fill_fe_values()
virtual
CellSimilarity::Similarity
fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
dealii::internal::FEValues::MappingRelatedData<dim, spacedim> &output_data) const;
- /**
- * Compute mapping-related information for a face of a cell.
- * See the documentation of Mapping::fill_fe_face_values() for
- * a discussion of purpose and arguments of this function.
- */
+ // documentation can be found in Mapping::fill_fe_face_values()
virtual void
fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
dealii::internal::FEValues::MappingRelatedData<dim, spacedim> &output_data) const;
- /**
- * Compute mapping-related information for a child of a face of a cell.
- * See the documentation of Mapping::fill_fe_subface_values() for
- * a discussion of purpose and arguments of this function.
- */
+ // documentation can be found in Mapping::fill_fe_subface_values()
virtual void
fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const typename Mapping<dim,spacedim>::InternalDataBase &internal_data,
dealii::internal::FEValues::MappingRelatedData<dim, spacedim> &output_data) const;
+ /**
+ * @}
+ */
+
+protected:
+ /* Trick to templatize transform_real_to_unit_cell<dim, dim+1> */
+ template<int dim_>
+ Point<dim_>
+ transform_real_to_unit_cell_internal_codim1
+ (const typename Triangulation<dim_,dim_+1>::cell_iterator &cell,
+ const Point<dim_+1> &p,
+ const Point<dim_> &initial_p_unit,
+ InternalData &mdata) const;
+
+ /**
+ * Compute an initial guess to pass to the Newton method in
+ * transform_real_to_unit_cell. For the initial guess we proceed in the
+ * following way:
+ * <ul>
+ * <li> find the least square dim-dimensional plane approximating the cell
+ * vertices, i.e. we find and affine map A x_hat + b from the reference cell
+ * to the real space.
+ * <li> Solve the equation A x_hat + b = p for x_hat
+ * <li> This x_hat is the initial solution used for the Newton Method.
+ * </ul>
+ * @note if dim<spacedim we first project p onto the plane. @note if dim==1
+ * (for any spacedim) the initial guess is the exact solution and no Newton
+ * iteration is needed. Some details about how we compute the least square
+ * plane. We look for a spacedim x (dim + 1) matrix X such that X * M = Y
+ * where M is a (dim+1) x n_vertices matrix and Y a spacedim x n_vertices.
+ * And: The i-th column of M is unit_vertex[i] and the last row all 1's. The
+ * i-th column of Y is real_vertex[i]. If we split X=[A|b], the least
+ * square approx is A x_hat+b Classically X = Y * (M^t (M M^t)^{-1}) Let
+ * K = M^t * (M M^t)^{-1} = [KA Kb] this can be precomputed, and that is
+ * exactly what we do. Finally A = Y*KA and b = Y*Kb.
+ */
+ Point<dim>
+ transform_real_to_unit_cell_initial_guess (const std::vector<Point<spacedim> > &vertex,
+ const Point<spacedim> &p) const;
+
+
+ /**
+ * Declare a convenience typedef for the class that describes offsets into
+ * quadrature formulas projected onto faces and subfaces.
+ */
+ typedef
+ typename QProjector<dim>::DataSetDescriptor
+ DataSetDescriptor;
+
+
/**
* Compute shape values and/or derivatives.
*
const Point<dim> &initial_p_unit,
InternalData &mdata) const;
- /**
- * Always returns @p true because MappingQ1 preserves vertex locations.
- */
- virtual
- bool preserves_vertex_locations () const;
-
-protected:
- /* Trick to templatize transform_real_to_unit_cell<dim, dim+1> */
- template<int dim_>
- Point<dim_>
- transform_real_to_unit_cell_internal_codim1
- (const typename Triangulation<dim_,dim_+1>::cell_iterator &cell,
- const Point<dim_+1> &p,
- const Point<dim_> &initial_p_unit,
- InternalData &mdata) const;
-
- /**
- * Compute an initial guess to pass to the Newton method in
- * transform_real_to_unit_cell. For the initial guess we proceed in the
- * following way:
- * <ul>
- * <li> find the least square dim-dimensional plane approximating the cell
- * vertices, i.e. we find and affine map A x_hat + b from the reference cell
- * to the real space.
- * <li> Solve the equation A x_hat + b = p for x_hat
- * <li> This x_hat is the initial solution used for the Newton Method.
- * </ul>
- * @note if dim<spacedim we first project p onto the plane. @note if dim==1
- * (for any spacedim) the initial guess is the exact solution and no Newton
- * iteration is needed. Some details about how we compute the least square
- * plane. We look for a spacedim x (dim + 1) matrix X such that X * M = Y
- * where M is a (dim+1) x n_vertices matrix and Y a spacedim x n_vertices.
- * And: The i-th column of M is unit_vertex[i] and the last row all 1's. The
- * i-th column of Y is real_vertex[i]. If we split X=[A|b], the least
- * square approx is A x_hat+b Classically X = Y * (M^t (M M^t)^{-1}) Let
- * K = M^t * (M M^t)^{-1} = [KA Kb] this can be precomputed, and that is
- * exactly what we do. Finally A = Y*KA and b = Y*Kb.
- */
- Point<dim>
- transform_real_to_unit_cell_initial_guess (const std::vector<Point<spacedim> > &vertex,
- const Point<spacedim> &p) const;
-
-
-private:
-
- // documentation can be found in Mapping::requires_update_flags()
- virtual
- UpdateFlags
- requires_update_flags (const UpdateFlags update_flags) const;
-
- // documentation can be found in Mapping::get_data()
- virtual
- InternalData *
- get_data (const UpdateFlags,
- const Quadrature<dim> &quadrature) const;
-
- // documentation can be found in Mapping::get_face_data()
- virtual
- typename Mapping<dim,spacedim>::InternalDataBase *
- get_face_data (const UpdateFlags flags,
- const Quadrature<dim-1>& quadrature) const;
-
- // documentation can be found in Mapping::get_subface_data()
- virtual
- typename Mapping<dim,spacedim>::InternalDataBase *
- get_subface_data (const UpdateFlags flags,
- const Quadrature<dim-1>& quadrature) const;
-
/**
* Computes the support points of the mapping. For @p MappingQ1 these are
* the vertices. However, other classes may override this function. In
*/
template <int dim, int spacedim>
void
- maybe_compute_q_points (const typename dealii::MappingQ1<dim,spacedim>::DataSetDescriptor data_set,
+ maybe_compute_q_points (const typename QProjector<dim>::DataSetDescriptor data_set,
const typename dealii::MappingQ1<dim,spacedim>::InternalData &data,
std::vector<Point<spacedim> > &quadrature_points)
{
template <int dim, int spacedim>
void
maybe_update_Jacobians (const CellSimilarity::Similarity cell_similarity,
- const typename dealii::MappingQ1<dim,spacedim>::DataSetDescriptor data_set,
+ const typename dealii::QProjector<dim>::DataSetDescriptor data_set,
const typename dealii::MappingQ1<dim,spacedim>::InternalData &data)
{
const UpdateFlags update_flags = data.update_each;
template <int dim, int spacedim>
void
maybe_update_jacobian_grads (const CellSimilarity::Similarity cell_similarity,
- const typename dealii::MappingQ1<dim,spacedim>::DataSetDescriptor data_set,
+ const typename QProjector<dim>::DataSetDescriptor data_set,
const typename dealii::MappingQ1<dim,spacedim>::InternalData &data,
std::vector<DerivativeForm<2,dim,spacedim> > &jacobian_grads)
{
const typename dealii::Triangulation<dim,spacedim>::cell_iterator &cell,
const unsigned int face_no,
const unsigned int subface_no,
- const typename dealii::MappingQ1<dim,spacedim>::DataSetDescriptor data_set,
+ const typename QProjector<dim>::DataSetDescriptor data_set,
const Quadrature<dim-1> &quadrature,
const typename dealii::MappingQ1<dim,spacedim>::InternalData &data,
internal::FEValues::MappingRelatedData<dim,spacedim> &output_data)