From: Wolfgang Bangerth Date: Tue, 18 Aug 2015 15:12:51 +0000 (-0500) Subject: Sort members of MappingFEField into doxygen groups. X-Git-Tag: v8.4.0-rc2~574^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1383%2Fhead;p=dealii.git Sort members of MappingFEField into doxygen groups. --- diff --git a/include/deal.II/fe/mapping_fe_field.h b/include/deal.II/fe/mapping_fe_field.h index 3a917125ab..cbbc552f54 100644 --- a/include/deal.II/fe/mapping_fe_field.h +++ b/include/deal.II/fe/mapping_fe_field.h @@ -115,54 +115,65 @@ public: */ MappingFEField (const MappingFEField &mapping); + /** + * Return a pointer to a copy of the present object. The caller of this copy + * then assumes ownership of it. + */ + virtual + Mapping *clone () 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. + * Always returns @p false. */ - virtual Point - transform_unit_to_real_cell ( - const typename Triangulation::cell_iterator &cell, - const Point &p) const; + virtual + bool preserves_vertex_locations () const; + /** - * Transforms the point @p p on the real cell to the point @p p_unit on the - * unit cell @p cell and returns @p p_unit. - * - * Uses Newton iteration and the @p transform_unit_to_real_cell function. - * - * In the codimension one case, this function returns the normal projection - * of the real point @p p on the curve or surface identified by the @p cell. + * @name Mapping points between reference and real cells + * @{ */ - virtual Point - transform_real_to_unit_cell ( - const typename Triangulation::cell_iterator &cell, - const Point &p) const; + + // for documentation, see the Mapping base class + virtual + Point + transform_unit_to_real_cell (const typename Triangulation::cell_iterator &cell, + const Point &p) const; + + // for documentation, see the Mapping base class + virtual + Point + transform_real_to_unit_cell (const typename Triangulation::cell_iterator &cell, + const Point &p) const; /** - * Reimplemented from Mapping. See the documentation of the base class for - * detailed information. + * @} */ - virtual void + + /** + * @name Functions to transform tensors from reference to real coordinates + * @{ + */ + + // for documentation, see the Mapping base class + virtual + void transform (const VectorSlice > > input, VectorSlice > > output, const typename Mapping::InternalDataBase &internal, const MappingType type) const; - /** - * Reimplemented from Mapping. See the documentation of the base class for - * detailed information. - */ - virtual void + // for documentation, see the Mapping base class + virtual + void transform (const VectorSlice > > input, VectorSlice > > output, const typename Mapping::InternalDataBase &internal, const MappingType type) const; - /** - * Reimplemented from Mapping. See the documentation of the base class for - * detailed information. - */ + // for documentation, see the Mapping base class virtual void transform (const VectorSlice > > input, @@ -170,6 +181,7 @@ public: const typename Mapping::InternalDataBase &internal, const MappingType type) const; + // for documentation, see the Mapping base class virtual void transform (const VectorSlice > > input, @@ -177,6 +189,7 @@ public: const typename Mapping::InternalDataBase &internal, const MappingType type) const; + // for documentation, see the Mapping base class virtual void transform (const VectorSlice > > input, @@ -184,6 +197,9 @@ public: const typename Mapping::InternalDataBase &internal, const MappingType type) const; + /** + * @} + */ /** @@ -199,72 +215,10 @@ public: ComponentMask get_component_mask () const; /** - * Return a pointer to a copy of the present object. The caller of this copy - * then assumes ownership of it. + * Exception */ - virtual - Mapping *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 > > input, - VectorSlice< std::vector > > output, - const typename Mapping::InternalDataBase &internal, - const MappingType type) const; - - - /** - * see doc in transform_fields - */ - template < int rank > - void - transform_differential_forms( - const VectorSlice > > input, - VectorSlice > > output, - const typename Mapping::InternalDataBase &mapping_data, - const MappingType mapping_type) const; - - -protected: - /** - * Reference to the vector of shifts. - */ - - SmartPointer >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, MappingFEField > fe; - - - /** - * Pointer to the DoFHandler to which the mapping vector is associated. - */ - SmartPointer >euler_dof_handler; - - - private: /** @@ -491,6 +445,50 @@ private: * @} */ + /** + * 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 + void + transform_fields(const VectorSlice > > input, + VectorSlice > > output, + const typename Mapping::InternalDataBase &internal, + const MappingType mapping_type) const; + + + /** + * See transform_fields() above. + */ + template + void + transform_differential_forms(const VectorSlice > > input, + VectorSlice > > output, + const typename Mapping::InternalDataBase &mapping_data, + const MappingType mapping_type) const; + + + /** + * Reference to the vector of shifts. + */ + SmartPointer > 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, MappingFEField > fe; + + + /** + * Pointer to the DoFHandler to which the mapping vector is associated. + */ + SmartPointer > euler_dof_handler; + private: /** * Transforms a point @p p on the unit cell to the point @p p_real on the @@ -550,7 +548,6 @@ private: */ 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 @@ -562,20 +559,12 @@ private: */ std::vector fe_to_real; - /** - * Reimplemented from Mapping. See the documentation of the base class for - * detailed information. - */ void compute_data (const UpdateFlags update_flags, const Quadrature &q, const unsigned int n_original_q_points, InternalData &data) const; - /** - * Reimplemented from Mapping. See the documentation of the base class for - * detailed information. - */ void compute_face_data (const UpdateFlags update_flags, const Quadrature &q, @@ -596,96 +585,6 @@ private: #ifndef DOXYGEN -template -inline -const double & -MappingFEField::InternalData::shape (const unsigned int qpoint, - const unsigned int shape_nr) const -{ - Assert(qpoint*n_shape_functions + shape_nr < shape_values.size(), - ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, - shape_values.size())); - return shape_values [qpoint*n_shape_functions + shape_nr]; -} - - - -template -inline -double & -MappingFEField::InternalData::shape (const unsigned int qpoint, - const unsigned int shape_nr) -{ - Assert(qpoint*n_shape_functions + shape_nr < shape_values.size(), - ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, - shape_values.size())); - return shape_values [qpoint*n_shape_functions + shape_nr]; -} - - -template -inline -const Tensor<1,dim> & -MappingFEField::InternalData::derivative (const unsigned int qpoint, - const unsigned int shape_nr) const -{ - Assert(qpoint*n_shape_functions + shape_nr < shape_derivatives.size(), - ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, - shape_derivatives.size())); - return shape_derivatives [qpoint*n_shape_functions + shape_nr]; -} - - - -template -inline -Tensor<1,dim> & -MappingFEField::InternalData::derivative (const unsigned int qpoint, - const unsigned int shape_nr) -{ - Assert(qpoint*n_shape_functions + shape_nr < shape_derivatives.size(), - ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, - shape_derivatives.size())); - return shape_derivatives [qpoint*n_shape_functions + shape_nr]; -} - - -template -inline -const Tensor<2,dim> & -MappingFEField::InternalData::second_derivative (const unsigned int qpoint, - const unsigned int shape_nr) const -{ - Assert(qpoint*n_shape_functions + shape_nr < shape_second_derivatives.size(), - ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, - shape_second_derivatives.size())); - return shape_second_derivatives [qpoint*n_shape_functions + shape_nr]; -} - - - -template -inline -Tensor<2,dim> & -MappingFEField::InternalData::second_derivative (const unsigned int qpoint, - const unsigned int shape_nr) -{ - Assert(qpoint*n_shape_functions + shape_nr < shape_second_derivatives.size(), - ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, - shape_second_derivatives.size())); - return shape_second_derivatives [qpoint*n_shape_functions + shape_nr]; -} - - -template -inline -bool -MappingFEField::preserves_vertex_locations () const -{ - return false; -} - - #endif // DOXYGEN diff --git a/source/fe/mapping_fe_field.cc b/source/fe/mapping_fe_field.cc index 61c514ecb7..17c146e5ef 100644 --- a/source/fe/mapping_fe_field.cc +++ b/source/fe/mapping_fe_field.cc @@ -45,8 +45,9 @@ DEAL_II_NAMESPACE_OPEN template -MappingFEField::InternalData::InternalData (const FiniteElement &fe, - const ComponentMask mask) +MappingFEField::InternalData:: +InternalData (const FiniteElement &fe, + const ComponentMask mask) : n_shape_functions (fe.dofs_per_cell), mask (mask), @@ -58,13 +59,83 @@ MappingFEField::InternalData::InternalData (const Finite template std::size_t -MappingFEField::InternalData::memory_consumption () const +MappingFEField::InternalData:: +memory_consumption () const { Assert (false, ExcNotImplemented()); return 0; } + +template +double & +MappingFEField::InternalData:: +shape (const unsigned int qpoint, + const unsigned int shape_nr) +{ + Assert(qpoint*n_shape_functions + shape_nr < shape_values.size(), + ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, + shape_values.size())); + return shape_values [qpoint*n_shape_functions + shape_nr]; +} + + +template +const Tensor<1,dim> & +MappingFEField::InternalData:: +derivative (const unsigned int qpoint, + const unsigned int shape_nr) const +{ + Assert(qpoint*n_shape_functions + shape_nr < shape_derivatives.size(), + ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, + shape_derivatives.size())); + return shape_derivatives [qpoint*n_shape_functions + shape_nr]; +} + + + +template +Tensor<1,dim> & +MappingFEField::InternalData:: +derivative (const unsigned int qpoint, + const unsigned int shape_nr) +{ + Assert(qpoint*n_shape_functions + shape_nr < shape_derivatives.size(), + ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, + shape_derivatives.size())); + return shape_derivatives [qpoint*n_shape_functions + shape_nr]; +} + + +template +const Tensor<2,dim> & +MappingFEField::InternalData:: +second_derivative (const unsigned int qpoint, + const unsigned int shape_nr) const +{ + Assert(qpoint*n_shape_functions + shape_nr < shape_second_derivatives.size(), + ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, + shape_second_derivatives.size())); + return shape_second_derivatives [qpoint*n_shape_functions + shape_nr]; +} + + + +template +Tensor<2,dim> & +MappingFEField::InternalData:: +second_derivative (const unsigned int qpoint, + const unsigned int shape_nr) +{ + Assert(qpoint*n_shape_functions + shape_nr < shape_second_derivatives.size(), + ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, + shape_second_derivatives.size())); + return shape_second_derivatives [qpoint*n_shape_functions + shape_nr]; +} + + + template MappingFEField::MappingFEField (const DH &euler_dof_handler, const VECTOR &euler_vector, @@ -98,6 +169,30 @@ MappingFEField::MappingFEField (const MappingFEField +inline +const double & +MappingFEField::InternalData::shape (const unsigned int qpoint, + const unsigned int shape_nr) const +{ + Assert(qpoint*n_shape_functions + shape_nr < shape_values.size(), + ExcIndexRange(qpoint*n_shape_functions + shape_nr, 0, + shape_values.size())); + return shape_values [qpoint*n_shape_functions + shape_nr]; +} + + + +template +bool +MappingFEField::preserves_vertex_locations () const +{ + return false; +} + + + template void MappingFEField::compute_shapes_virtual (