From: Guido Kanschat Date: Tue, 13 Nov 2007 16:37:35 +0000 (+0000) Subject: make update_once and update_each private, since they are only used by FEValues friends X-Git-Tag: v8.0.0~9609 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8ec5ec1a3cc7714b27e532e741db2a7699d547c;p=dealii.git make update_once and update_each private, since they are only used by FEValues friends git-svn-id: https://svn.dealii.org/trunk@15490 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/mapping.h b/deal.II/deal.II/include/fe/mapping.h index 8f5016af4d..a15317d5dc 100644 --- a/deal.II/deal.II/include/fe/mapping.h +++ b/deal.II/deal.II/include/fe/mapping.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors +// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -26,6 +26,7 @@ DEAL_II_NAMESPACE_OPEN template class Quadrature; template class FEValuesData; +template class FEValuesBase; template class FEValues; template class FEFaceValues; template class FESubfaceValues; @@ -330,31 +331,6 @@ class Mapping : public Subscriptor const unsigned int offset, const VectorSlice > > output, const typename Mapping::InternalDataBase &internal) const = 0; - - /** - * Indicate fields to be updated - * in the constructor of - * FEValues. Especially, - * fields not asked for by - * FEValues, but computed - * for efficiency reasons will be - * notified here. - * - * Refer to the same function in - * FiniteElement for - * further information. - * - * Example: refer to the same - * function in MappingQ1. - */ - virtual UpdateFlags update_once (const UpdateFlags) const = 0; - - /** - * The same as @p update_once, - * but for the flags to be updated for - * each grid cell. - */ - virtual UpdateFlags update_each (const UpdateFlags) const = 0; /** * Return a pointer to a copy of the @@ -379,6 +355,28 @@ class Mapping : public Subscriptor private: + /** + * Indicate fields to be updated + * in the constructor of + * FEValues. Especially, + * fields not asked for by + * FEValues, but computed + * for efficiency reasons will be + * notified here. + * + * See @ref UpdateFlagsEssay. + */ + virtual UpdateFlags update_once (const UpdateFlags) const = 0; + + /** + * The same as update_once(), + * but for the flags to be updated for + * each grid cell. + * + * See @ref UpdateFlagsEssay. + */ + virtual UpdateFlags update_each (const UpdateFlags) const = 0; + /** * Prepare internal data * structures and fill in values @@ -498,6 +496,7 @@ class Mapping : public Subscriptor * and fill_fe_...values * functions. */ + friend class FEValuesBase; friend class FEValues; friend class FEFaceValues; friend class FESubfaceValues; diff --git a/deal.II/deal.II/include/fe/mapping_cartesian.h b/deal.II/deal.II/include/fe/mapping_cartesian.h index 5a4282c1b4..67657e8a18 100644 --- a/deal.II/deal.II/include/fe/mapping_cartesian.h +++ b/deal.II/deal.II/include/fe/mapping_cartesian.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -83,40 +83,24 @@ class MappingCartesian : public Mapping std::vector > &normal_vectors, std::vector &cell_JxW_values) const ; - /** - * Implementation of the - * interface in Mapping. - */ virtual void transform_covariant (const VectorSlice > > input, const unsigned int offset, VectorSlice > > output, const typename Mapping::InternalDataBase &internal) const; - - /** - * Implementation of the - * interface in Mapping. - */ + virtual void transform_covariant (const VectorSlice > > input, const unsigned int offset, VectorSlice > > output, const typename Mapping::InternalDataBase &internal) const; - /** - * Implementation of the - * interface in Mapping. - */ virtual void transform_contravariant (const VectorSlice > > input, const unsigned int offset, VectorSlice > > output, const typename Mapping::InternalDataBase &internal) const; - /** - * Implementation of the - * interface in Mapping. - */ virtual void transform_contravariant (const VectorSlice > > input, const unsigned int offset, @@ -143,9 +127,6 @@ class MappingCartesian : public Mapping const typename Triangulation::cell_iterator &cell, const Point &p) const; - virtual UpdateFlags update_once (const UpdateFlags) const; - virtual UpdateFlags update_each (const UpdateFlags) const; - /** * Return a pointer to a copy of the @@ -213,6 +194,9 @@ class MappingCartesian : public Mapping std::vector >& normal_vectors) const; private: + virtual UpdateFlags update_once (const UpdateFlags) const; + virtual UpdateFlags update_each (const UpdateFlags) const; + /** * Value to indicate that a given * face or subface number is diff --git a/deal.II/deal.II/include/fe/mapping_q.h b/deal.II/deal.II/include/fe/mapping_q.h index fe0eef6225..021e94ccca 100644 --- a/deal.II/deal.II/include/fe/mapping_q.h +++ b/deal.II/deal.II/include/fe/mapping_q.h @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -298,28 +298,16 @@ class MappingQ : public MappingQ1 private: - /** - * Implementation of the interface in - * Mapping. - */ virtual typename Mapping::InternalDataBase * get_data (const UpdateFlags, const Quadrature& quadrature) const; - /** - * Implementation of the interface in - * Mapping. - */ virtual typename Mapping::InternalDataBase * get_face_data (const UpdateFlags flags, const Quadrature& quadrature) const; - /** - * Implementation of the interface in - * Mapping. - */ virtual typename Mapping::InternalDataBase * get_subface_data (const UpdateFlags flags, diff --git a/deal.II/deal.II/include/fe/mapping_q1.h b/deal.II/deal.II/include/fe/mapping_q1.h index 1c8dbf7cfd..503b05db91 100644 --- a/deal.II/deal.II/include/fe/mapping_q1.h +++ b/deal.II/deal.II/include/fe/mapping_q1.h @@ -53,12 +53,6 @@ class MappingQ1 : public Mapping */ MappingQ1 (); - /** - * Transforms the point p on the unit - * cell to the point p_real on the real - * cell cell and returns - * p_real. - */ virtual Point transform_unit_to_real_cell ( const typename Triangulation::cell_iterator &cell, @@ -79,122 +73,30 @@ class MappingQ1 : public Mapping const typename Triangulation::cell_iterator &cell, const Point &p) const; - /** - * Implementation of the interface in - * Mapping. - */ virtual void transform_covariant (const VectorSlice > > input, const unsigned int offset, VectorSlice > > output, const typename Mapping::InternalDataBase &internal) const; - /** - * Implementation of the interface in - * Mapping. - */ virtual void transform_covariant (const VectorSlice > > input, const unsigned int offset, VectorSlice > > output, const typename Mapping::InternalDataBase &internal) const; - /** - * Implementation of the interface in - * Mapping. - */ virtual void transform_contravariant (const VectorSlice > > input, const unsigned int offset, VectorSlice > > output, const typename Mapping::InternalDataBase &internal) const; - /** - * Implementation of the interface in - * Mapping. - */ virtual void transform_contravariant (const VectorSlice > > input, const unsigned int offset, VectorSlice > > output, const typename Mapping::InternalDataBase &internal) const; - /** - * Implementation of the interface in - * Mapping. - * - * Description of effects: - *
    - *
  • if @p update_quadrature_points - * is required, the output will - * contain - * @p update_transformation_values. This - * computes the values of the - * transformation basis - * polynomials at the unit cell - * quadrature points. - *
  • if any of - * @p update_covariant_transformation, - * @p update_contravariant_transformation, - * @p update_JxW_values, - * @p update_boundary_forms, - * @p update_normal_vectors is - * required, the output will - * contain - * @p update_transformation_gradients - * to compute derivatives of the - * transformation basis - * polynomials. - *
- */ - virtual UpdateFlags update_once (const UpdateFlags flags) const; - - /** - * Implementation of the interface in - * Mapping. - * - * Description of effects if - * @p flags contains: - *
    - *
  • update_quadrature_points is - * copied to the output to - * compute the quadrature points - * on the real cell. - *
  • update_JxW_values is - * copied and requires - * @p update_boundary_forms on - * faces. The latter, because the - * surface element is just the - * norm of the boundary form. - *
  • update_normal_vectors - * is copied and requires - * @p update_boundary_forms. The - * latter, because the normal - * vector is the normalized - * boundary form. - *
  • - * update_covariant_transformation - * is copied and requires - * @p update_contravariant_transformation, - * since it is computed as the - * inverse of the latter. - *
  • update_JxW_values is - * copied and requires - * update_contravariant_transformation, - * since it is computed as one - * over determinant of the - * latter. - *
  • update_boundary_forms - * is copied and requires - * update_contravariant_transformation, - * since the boundary form is - * computed as the contravariant - * image of the normal vector to - * the unit cell. - *
- */ - virtual UpdateFlags update_each (const UpdateFlags flags) const; - /** * Return a pointer to a copy of the * present object. The caller of this @@ -567,25 +469,89 @@ class MappingQ1 : public Mapping /** * Implementation of the interface in * Mapping. + * + * Description of effects: + *
    + *
  • if @p update_quadrature_points + * is required, the output will + * contain + * @p update_transformation_values. This + * computes the values of the + * transformation basis + * polynomials at the unit cell + * quadrature points. + *
  • if any of + * @p update_covariant_transformation, + * @p update_contravariant_transformation, + * @p update_JxW_values, + * @p update_boundary_forms, + * @p update_normal_vectors is + * required, the output will + * contain + * @p update_transformation_gradients + * to compute derivatives of the + * transformation basis + * polynomials. + *
*/ + virtual UpdateFlags update_once (const UpdateFlags flags) const; + + /** + * Implementation of the interface in + * Mapping. + * + * Description of effects if + * @p flags contains: + *
    + *
  • update_quadrature_points is + * copied to the output to + * compute the quadrature points + * on the real cell. + *
  • update_JxW_values is + * copied and requires + * @p update_boundary_forms on + * faces. The latter, because the + * surface element is just the + * norm of the boundary form. + *
  • update_normal_vectors + * is copied and requires + * @p update_boundary_forms. The + * latter, because the normal + * vector is the normalized + * boundary form. + *
  • + * update_covariant_transformation + * is copied and requires + * @p update_contravariant_transformation, + * since it is computed as the + * inverse of the latter. + *
  • update_JxW_values is + * copied and requires + * update_contravariant_transformation, + * since it is computed as one + * over determinant of the + * latter. + *
  • update_boundary_forms + * is copied and requires + * update_contravariant_transformation, + * since the boundary form is + * computed as the contravariant + * image of the normal vector to + * the unit cell. + *
+ */ + virtual UpdateFlags update_each (const UpdateFlags flags) const; + virtual typename Mapping::InternalDataBase * get_data (const UpdateFlags, const Quadrature& quadrature) const; - /** - * Implementation of the interface in - * Mapping. - */ virtual typename Mapping::InternalDataBase * get_face_data (const UpdateFlags flags, const Quadrature& quadrature) const; - /** - * Implementation of the interface in - * Mapping. - */ virtual typename Mapping::InternalDataBase * get_subface_data (const UpdateFlags flags,