From: kanschat Date: Fri, 19 Nov 2010 15:03:17 +0000 (+0000) Subject: add transformation of vector fields and rearrange documentation from basic to hybrid X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00fa9ccf0f725ae0ef3275315c70a51f2292a457;p=dealii-svn.git add transformation of vector fields and rearrange documentation from basic to hybrid git-svn-id: https://svn.dealii.org/trunk@22821 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/fe/fe_values.h b/deal.II/include/deal.II/fe/fe_values.h index d7bedc06ff..7f357705b6 100644 --- a/deal.II/include/deal.II/fe/fe_values.h +++ b/deal.II/include/deal.II/fe/fe_values.h @@ -1214,12 +1214,6 @@ namespace internal - -/*!@addtogroup feaccess */ -/*@{*/ - - - //TODO: Add access to mapping values to FEValuesBase //TODO: Several FEValuesBase of a system should share Mapping @@ -1235,7 +1229,9 @@ namespace internal * The purpose of this class is discussed * on the page on @ref UpdateFlagsEssay. * - * @author Guido Kanschat, 2000 + * @ingroup feaccess + * @author Guido Kanschat + * @date 2000 */ template class FEValuesData @@ -1552,6 +1548,7 @@ class FEValuesData * The mechanisms by which this class works is also discussed * on the page on @ref UpdateFlagsEssay. * + * @ingroup feaccess * @author Wolfgang Bangerth, 1998, 2003, Guido Kanschat, 2001 */ template @@ -1613,53 +1610,6 @@ class FEValuesBase : protected FEValuesData, * Destructor. */ ~FEValuesBase (); - - /// @name Extractors Methods to extract individual components - //@{ - - /** - * Create a view of the current FEValues - * object that represents a particular - * scalar component of the possibly - * vector-valued finite element. The - * concept of views is explained in the - * documentation of the namespace - * FEValuesViews and in particular - * in the @ref vector_valued module. - */ - const FEValuesViews::Scalar & - operator[] (const FEValuesExtractors::Scalar &scalar) const; - - /** - * Create a view of the current FEValues - * object that represents a set of - * dim scalar components - * (i.e. a vector) of the vector-valued - * finite element. The concept of views - * is explained in the documentation of - * the namespace FEValuesViews and in particular - * in the @ref vector_valued module. - */ - const FEValuesViews::Vector & - operator[] (const FEValuesExtractors::Vector &vector) const; - - /** - * Create a view of the current FEValues - * object that represents a set of - * (dim*dim + dim)/2 scalar components - * (i.e. a symmetric 2nd order tensor) - * of the vector-valued - * finite element. The concept of views - * is explained in the documentation of - * the namespace FEValuesViews and in particular - * in the @ref vector_valued module. - */ - const FEValuesViews::SymmetricTensor<2,dim,spacedim> & - operator[] (const FEValuesExtractors::SymmetricTensor<2> &tensor) const; - - //@} - - /// @name ShapeAccess Access to shape function values //@{ @@ -2586,6 +2536,9 @@ class FEValuesBase : protected FEValuesData, bool quadrature_points_fastest = false) const; //@} + /// @name Geometry of the cell + //@{ + /** * Position of the ith * quadrature point in real space. @@ -2673,32 +2626,6 @@ class FEValuesBase : protected FEValuesData, * inverse_jacobian(). */ const std::vector > & get_inverse_jacobians () const; - - /** - * Constant reference to the - * selected mapping object. - */ - const Mapping & get_mapping () const; - - /** - * Constant reference to the - * selected finite element - * object. - */ - const FiniteElement & get_fe () const; - - /** - * Return the update flags set - * for this object. - */ - UpdateFlags get_update_flags () const; - - /** - * Return a triangulation - * iterator to the current cell. - */ - const typename Triangulation::cell_iterator get_cell () const; - /** * For a face, return the outward * normal vector to the cell at @@ -2727,6 +2654,17 @@ class FEValuesBase : protected FEValuesData, */ const std::vector > & get_normal_vectors () const; + /** + * Transform a set of vectors, + * one for each quadrature + * point. The mapping + * can be any of the ones defined + * in MappingType. + */ + void transform (std::vector >& transformed, + const std::vector >& original, + MappingType mapping) const; + /** * @deprecated Use * normal_vector() instead. @@ -2748,6 +2686,81 @@ class FEValuesBase : protected FEValuesData, */ const std::vector > & get_cell_normal_vectors () const; + //@} + + /// @name Extractors Methods to extract individual components + //@{ + + /** + * Create a view of the current FEValues + * object that represents a particular + * scalar component of the possibly + * vector-valued finite element. The + * concept of views is explained in the + * documentation of the namespace + * FEValuesViews and in particular + * in the @ref vector_valued module. + */ + const FEValuesViews::Scalar & + operator[] (const FEValuesExtractors::Scalar &scalar) const; + + /** + * Create a view of the current FEValues + * object that represents a set of + * dim scalar components + * (i.e. a vector) of the vector-valued + * finite element. The concept of views + * is explained in the documentation of + * the namespace FEValuesViews and in particular + * in the @ref vector_valued module. + */ + const FEValuesViews::Vector & + operator[] (const FEValuesExtractors::Vector &vector) const; + + /** + * Create a view of the current FEValues + * object that represents a set of + * (dim*dim + dim)/2 scalar components + * (i.e. a symmetric 2nd order tensor) + * of the vector-valued + * finite element. The concept of views + * is explained in the documentation of + * the namespace FEValuesViews and in particular + * in the @ref vector_valued module. + */ + const FEValuesViews::SymmetricTensor<2,dim,spacedim> & + operator[] (const FEValuesExtractors::SymmetricTensor<2> &tensor) const; + + //@} + + /// @name Access to the raw data + //@{ + + /** + * Constant reference to the + * selected mapping object. + */ + const Mapping & get_mapping () const; + + /** + * Constant reference to the + * selected finite element + * object. + */ + const FiniteElement & get_fe () const; + + /** + * Return the update flags set + * for this object. + */ + UpdateFlags get_update_flags () const; + + /** + * Return a triangulation + * iterator to the current cell. + */ + const typename Triangulation::cell_iterator get_cell () const; + /** * Return the relation of the current * cell to the previous cell. This @@ -2765,6 +2778,8 @@ class FEValuesBase : protected FEValuesData, * of this object. */ unsigned int memory_consumption () const; + //@} + /** * This exception is thrown if @@ -3000,6 +3015,7 @@ class FEValuesBase : protected FEValuesData, * FEValuesBase, if values in quadrature points of a cell are * needed. For further documentation see this class. * + * @ingroup feaccess * @author Wolfgang Bangerth, 1998, Guido Kanschat, 2001 */ template @@ -3182,6 +3198,7 @@ class FEValues : public FEValuesBase * * See FEValuesBase * + * @ingroup feaccess * @author Wolfgang Bangerth, 1998, Guido Kanschat, 2000, 2001 */ template @@ -3287,6 +3304,7 @@ class FEFaceValuesBase : public FEValuesBase * function to a mesh face. But, there are limits of these values * approaching the face from either of the neighboring cells. * + * @ingroup feaccess * @author Wolfgang Bangerth, 1998, Guido Kanschat, 2000, 2001 */ template @@ -3463,6 +3481,7 @@ class FEFaceValues : public FEFaceValuesBase * the refinement structure of the neighbor: a subface number * corresponds to the number of the child of the neighboring face. * + * @ingroup feaccess * @author Wolfgang Bangerth, 1998, Guido Kanschat, 2000, 2001 */ template @@ -3653,7 +3672,6 @@ class FESubfaceValues : public FEFaceValuesBase const unsigned int subface_no); }; -/*@}*/ #ifndef DOXYGEN diff --git a/deal.II/source/fe/fe_values.cc b/deal.II/source/fe/fe_values.cc index 6727e94170..d09ea748bd 100644 --- a/deal.II/source/fe/fe_values.cc +++ b/deal.II/source/fe/fe_values.cc @@ -3175,6 +3175,18 @@ FEValuesBase::get_cell_normal_vectors () const } +template +void +FEValuesBase::transform ( + std::vector >& transformed, + const std::vector >& original, + MappingType type) const +{ + VectorSlice > > src(original); + VectorSlice > > dst(transformed); + mapping->transform(src, dst, *mapping_data, type); +} + template unsigned int