From: Wolfgang Bangerth Date: Sun, 26 Jul 2015 17:32:14 +0000 (-0500) Subject: Document the various Mapping*::InternalData classes. X-Git-Tag: v8.4.0-rc2~718^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bf478c6c69c634db5550bee84eec06429d08be1;p=dealii.git Document the various Mapping*::InternalData classes. --- diff --git a/include/deal.II/fe/mapping_cartesian.h b/include/deal.II/fe/mapping_cartesian.h index 2d151d82b2..ba9bf2d63c 100644 --- a/include/deal.II/fe/mapping_cartesian.h +++ b/include/deal.II/fe/mapping_cartesian.h @@ -159,7 +159,8 @@ public: protected: /** - * Storage for internal data of the scaling. + * Storage for internal data of the 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 diff --git a/include/deal.II/fe/mapping_fe_field.h b/include/deal.II/fe/mapping_fe_field.h index e997c1901f..d982a9029d 100644 --- a/include/deal.II/fe/mapping_fe_field.h +++ b/include/deal.II/fe/mapping_fe_field.h @@ -193,7 +193,15 @@ public: /** - * Storage for internal data of d-linear transformation. + * 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', along with scratch arrays. */ class InternalData : public Mapping::InternalDataBase { @@ -268,32 +276,6 @@ public: */ std::vector > shape_second_derivatives; - /** - * Tensors of covariant transformation at each of the quadrature points. - * The matrix stored is the Jacobian * G^{-1}, where G = Jacobian^{t} * - * Jacobian, is the first fundamental form of the map; if dim=spacedim - * then it reduces to the transpose of the inverse of the Jacobian matrix, - * which itself is stored in the @p contravariant field of this structure. - * - * Computed on each cell. - */ - mutable std::vector > covariant; - - /** - * Tensors of contravariant transformation at each of the quadrature - * points. The contravariant matrix is the Jacobian of the transformation, - * i.e. $J_{ij}=dx_i/d\hat x_j$. - * - * Computed on each cell. - */ - mutable std::vector< DerivativeForm<1,dim,spacedim> > contravariant; - - /** - * The determinant of the Jacobian in each quadrature point. Filled if - * #update_volume_elements. - */ - mutable std::vector volume_elements; - /** * Unit tangential vectors. Used for the computation of boundary forms and * normal vectors. @@ -309,11 +291,6 @@ public: */ std::vector > > unit_tangentials; - /** - * Auxiliary vectors for internal use. - */ - mutable std::vector > > aux; - /** * Number of shape functions. If this is a Q1 mapping, then it is simply * the number of vertices per cell. However, since also derived classes @@ -336,13 +313,42 @@ public: */ ComponentMask mask; + /** + * Tensors of covariant transformation at each of the quadrature points. + * The matrix stored is the Jacobian * G^{-1}, where G = Jacobian^{t} * + * Jacobian, is the first fundamental form of the map; if dim=spacedim + * then it reduces to the transpose of the inverse of the Jacobian matrix, + * which itself is stored in the @p contravariant field of this structure. + * + * Computed on each cell. + */ + mutable std::vector > covariant; + + /** + * Tensors of contravariant transformation at each of the quadrature + * points. The contravariant matrix is the Jacobian of the transformation, + * i.e. $J_{ij}=dx_i/d\hat x_j$. + * + * Computed on each cell. + */ + mutable std::vector< DerivativeForm<1,dim,spacedim> > contravariant; + + /** + * The determinant of the Jacobian in each quadrature point. Filled if + * #update_volume_elements. + */ + mutable std::vector volume_elements; + + /** + * Auxiliary vectors for internal use. + */ + mutable std::vector > > aux; /** * Storage for the indices of the local degrees of freedom. */ mutable std::vector local_dof_indices; - /** * Storage for local degrees of freedom. */ diff --git a/include/deal.II/fe/mapping_q.h b/include/deal.II/fe/mapping_q.h index 3e44964e23..71e515ede5 100644 --- a/include/deal.II/fe/mapping_q.h +++ b/include/deal.II/fe/mapping_q.h @@ -151,7 +151,19 @@ public: Mapping *clone () const; /** - * Storage for internal data of Q_degree transformation. + * 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::InternalData { @@ -176,7 +188,8 @@ public: mutable bool use_mapping_q1_on_current_cell; /** - * On interior cells @p MappingQ1 is used. + * A structure to store the corresponding information for the pure + * $Q_1$ mapping that is, by default, used on all interior cells. */ typename MappingQ1::InternalData mapping_q1_data; }; diff --git a/include/deal.II/fe/mapping_q1.h b/include/deal.II/fe/mapping_q1.h index e34b736ddd..6e4395bed6 100644 --- a/include/deal.II/fe/mapping_q1.h +++ b/include/deal.II/fe/mapping_q1.h @@ -153,7 +153,15 @@ public: Mapping *clone () const; /** - * Storage for internal data of d-linear transformation. + * Storage for internal data of d-linear mappings. 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'. */ class InternalData : public Mapping::InternalDataBase { @@ -227,6 +235,37 @@ public: */ std::vector > shape_second_derivatives; + /** + * Unit tangential vectors. Used for the computation of boundary forms and + * normal vectors. + * + * This vector has (dim-1)GeometryInfo::faces_per_cell entries. The first + * GeometryInfo::faces_per_cell contain the vectors in the first + * tangential direction for each face; the second set of + * GeometryInfo::faces_per_cell entries contain the vectors in the second + * tangential direction (only in 3d, since there we have 2 tangential + * directions per face), etc. + * + * Filled once. + */ + std::vector > > unit_tangentials; + + /** + * Default value of this flag is @p true. If *this is an object + * of a derived class, this flag is set to @p false. (This is, for example, + * the case for MappingQ, which derives MappingQ::InternalData from the + * current MappingQ1::InternalData.) + */ + bool is_mapping_q1_data; + + /** + * Number of shape functions. If this is a Q1 mapping, then it is simply + * the number of vertices per cell. However, since also derived classes + * use this class (e.g. the Mapping_Q() class), the number of shape + * functions may also be different. + */ + unsigned int n_shape_functions; + /** * Tensors of covariant transformation at each of the quadrature points. * The matrix stored is the Jacobian * G^{-1}, where G = Jacobian^{t} * @@ -247,21 +286,6 @@ public: */ mutable std::vector< DerivativeForm<1,dim,spacedim> > contravariant; - /** - * Unit tangential vectors. Used for the computation of boundary forms and - * normal vectors. - * - * This vector has (dim-1)GeometryInfo::faces_per_cell entries. The first - * GeometryInfo::faces_per_cell contain the vectors in the first - * tangential direction for each face; the second set of - * GeometryInfo::faces_per_cell entries contain the vectors in the second - * tangential direction (only in 3d, since there we have 2 tangential - * directions per face), etc. - * - * Filled once. - */ - std::vector > > unit_tangentials; - /** * Auxiliary vectors for internal use. */ @@ -283,20 +307,6 @@ public: * #update_volume_elements. */ mutable std::vector volume_elements; - - /** - * Default value of this flag is @p true. If *this is an object - * of a derived class, this flag is set to @p false. - */ - bool is_mapping_q1_data; - - /** - * Number of shape functions. If this is a Q1 mapping, then it is simply - * the number of vertices per cell. However, since also derived classes - * use this class (e.g. the Mapping_Q() class), the number of shape - * functions may also be different. - */ - unsigned int n_shape_functions; }; /**