From: bangerth Date: Tue, 4 Feb 2014 21:31:42 +0000 (+0000) Subject: Make the spelling of 'lda' and 'level_dof_access' uniform between dof_accessor.h... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d356c7bbd313da6cdaa2c27a18b6c8c748b7e40;p=dealii-svn.git Make the spelling of 'lda' and 'level_dof_access' uniform between dof_accessor.h and .templates.h. Help MS VC++ by introducing a typedef rather than trying to be overly tricky with the return type of the face() function. git-svn-id: https://svn.dealii.org/trunk@32405 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/dofs/dof_accessor.h b/deal.II/include/deal.II/dofs/dof_accessor.h index 038443436e..1c56c862d5 100644 --- a/deal.II/include/deal.II/dofs/dof_accessor.h +++ b/deal.II/include/deal.II/dofs/dof_accessor.h @@ -1208,6 +1208,14 @@ public: */ typedef DH Container; + /** + * A type for an iterator over the faces of a cell. This is + * what the face() function returns. + */ + typedef + TriaIterator > + face_iterator; + /** * @name Constructors and initialization */ @@ -1284,10 +1292,10 @@ public: /** * Return an iterator to the @p ith face of this cell. * - * This function is not implemented in 1D, and maps to - * DoFAccessor::line in 2D. + * This function is not implemented in 1D, and returns + * DoFAccessor::line in 2D and DoFAccessor::quad in 3d. */ - TriaIterator > + face_iterator face (const unsigned int i) const; /** @@ -1748,12 +1756,12 @@ private: }; -template +template inline bool -DoFAccessor::is_level_cell() +DoFAccessor::is_level_cell() { - return lda; + return level_dof_access; } diff --git a/deal.II/include/deal.II/dofs/dof_accessor.templates.h b/deal.II/include/deal.II/dofs/dof_accessor.templates.h index 9b689af2ab..ec4b975442 100644 --- a/deal.II/include/deal.II/dofs/dof_accessor.templates.h +++ b/deal.II/include/deal.II/dofs/dof_accessor.templates.h @@ -38,18 +38,18 @@ DEAL_II_NAMESPACE_OPEN /*------------------------- Functions: DoFAccessor ---------------------------*/ -template +template inline -DoFAccessor::DoFAccessor () +DoFAccessor::DoFAccessor () { Assert (false, ExcInvalidObject()); } -template +template inline -DoFAccessor::DoFAccessor ( +DoFAccessor::DoFAccessor ( const Triangulation *tria, const int level, const int index, @@ -64,19 +64,19 @@ DoFAccessor::DoFAccessor ( -template +template template -DoFAccessor::DoFAccessor (const InvalidAccessor &) +DoFAccessor::DoFAccessor (const InvalidAccessor &) { Assert (false, ExcInvalidObject()); } -template -template +template +template inline -DoFAccessor::DoFAccessor (const DoFAccessor &other) +DoFAccessor::DoFAccessor (const DoFAccessor &other) : BaseClass(other), dof_handler(0) { @@ -90,10 +90,10 @@ DoFAccessor::DoFAccessor (const DoFAccessor & -template -template +template +template inline -DoFAccessor::DoFAccessor (const DoFAccessor &other) +DoFAccessor::DoFAccessor (const DoFAccessor &other) : BaseClass(other), dof_handler(const_cast(other.dof_handler)) { @@ -101,10 +101,10 @@ DoFAccessor::DoFAccessor (const DoFAccessor +template inline void -DoFAccessor::set_dof_handler (DH *dh) +DoFAccessor::set_dof_handler (DH *dh) { Assert (dh != 0, ExcInvalidObject()); this->dof_handler = dh; @@ -112,20 +112,20 @@ DoFAccessor::set_dof_handler (DH *dh) -template +template inline const DH & -DoFAccessor::get_dof_handler () const +DoFAccessor::get_dof_handler () const { return *this->dof_handler; } -template +template inline void -DoFAccessor::copy_from ( +DoFAccessor::copy_from ( const TriaAccessorBase &da) { Assert (this->dof_handler != 0, ExcInvalidObject()); @@ -134,11 +134,11 @@ DoFAccessor::copy_from ( -template -template +template +template inline void -DoFAccessor::copy_from (const DoFAccessor &a) +DoFAccessor::copy_from (const DoFAccessor &a) { BaseClass::copy_from (a); set_dof_handler (a.dof_handler); @@ -146,11 +146,11 @@ DoFAccessor::copy_from (const DoFAccessor & -template -template +template +template inline bool -DoFAccessor::operator == (const DoFAccessor &a) const +DoFAccessor::operator == (const DoFAccessor &a) const { Assert (structdim == dim2, ExcCantCompareIterators()); Assert (this->dof_handler == a.dof_handler, ExcCantCompareIterators()); @@ -159,11 +159,11 @@ DoFAccessor::operator == (const DoFAccessor &a) -template -template +template +template inline bool -DoFAccessor::operator != (const DoFAccessor &a) const +DoFAccessor::operator != (const DoFAccessor &a) const { Assert (structdim == dim2, ExcCantCompareIterators()); Assert (this->dof_handler == a.dof_handler, ExcCantCompareIterators()); @@ -172,10 +172,10 @@ DoFAccessor::operator != (const DoFAccessor &a) -template +template inline -TriaIterator > -DoFAccessor::child (const unsigned int i) const +TriaIterator > +DoFAccessor::child (const unsigned int i) const { Assert (static_cast(this->level()) < this->dof_handler->levels.size(), ExcMessage ("DoFHandler not initialized")); @@ -183,15 +183,15 @@ DoFAccessor::child (const unsigned int i) const TriaIterator > t = TriaAccessor::child(i); - TriaIterator > q (*t, this->dof_handler); + TriaIterator > q (*t, this->dof_handler); return q; } -template +template inline -TriaIterator > -DoFAccessor::parent () const +TriaIterator > +DoFAccessor::parent () const { Assert (static_cast(this->level()) < this->dof_handler->levels.size(), ExcMessage ("DoFHandler not initialized")); @@ -206,7 +206,7 @@ DoFAccessor::parent () const else previous_level = 0; - TriaIterator > q (this->tria, + TriaIterator > q (this->tria, previous_level, this->parent_index (), this->dof_handler); @@ -1421,9 +1421,9 @@ namespace internal } } - template + template static - void set_mg_dof_indices (const dealii::DoFAccessor<1,DH,lda> &, + void set_mg_dof_indices (const dealii::DoFAccessor<1,DH,level_dof_access> &, const int, const std::vector &, const unsigned int) @@ -1433,9 +1433,9 @@ namespace internal - template + template static - void set_mg_dof_indices (dealii::DoFAccessor<2, DH,lda> &accessor, + void set_mg_dof_indices (dealii::DoFAccessor<2, DH,level_dof_access> &accessor, const int level, const std::vector &dof_indices, const unsigned int fe_index) @@ -1459,9 +1459,9 @@ namespace internal - template + template static - void set_mg_dof_indices (const dealii::DoFAccessor<3, DH,lda> &, + void set_mg_dof_indices (const dealii::DoFAccessor<3, DH,level_dof_access> &, const int, const std::vector &, const unsigned int) @@ -1475,10 +1475,10 @@ namespace internal -template +template inline types::global_dof_index -DoFAccessor::dof_index (const unsigned int i, +DoFAccessor::dof_index (const unsigned int i, const unsigned int fe_index) const { // access the respective DoF @@ -1491,20 +1491,20 @@ DoFAccessor::dof_index (const unsigned int i, } -template +template inline types::global_dof_index -DoFAccessor::mg_dof_index (const int level, +DoFAccessor::mg_dof_index (const int level, const unsigned int i) const { return this->dof_handler->template get_dof_index (level, this->present_index, 0, i); } -template +template inline void -DoFAccessor::set_dof_index (const unsigned int i, +DoFAccessor::set_dof_index (const unsigned int i, const types::global_dof_index index, const unsigned int fe_index) const { @@ -1520,10 +1520,10 @@ DoFAccessor::set_dof_index (const unsigned int i, -template +template inline unsigned int -DoFAccessor::n_active_fe_indices () const +DoFAccessor::n_active_fe_indices () const { // access the respective DoF return @@ -1536,10 +1536,10 @@ DoFAccessor::n_active_fe_indices () const -template +template inline unsigned int -DoFAccessor::nth_active_fe_index (const unsigned int n) const +DoFAccessor::nth_active_fe_index (const unsigned int n) const { // access the respective DoF return @@ -1553,10 +1553,10 @@ DoFAccessor::nth_active_fe_index (const unsigned int n) const -template +template inline bool -DoFAccessor::fe_index_is_active (const unsigned int fe_index) const +DoFAccessor::fe_index_is_active (const unsigned int fe_index) const { // access the respective DoF return @@ -1570,10 +1570,10 @@ DoFAccessor::fe_index_is_active (const unsigned int fe_index) const -template +template inline types::global_dof_index -DoFAccessor::vertex_dof_index (const unsigned int vertex, +DoFAccessor::vertex_dof_index (const unsigned int vertex, const unsigned int i, const unsigned int fe_index) const { @@ -1586,10 +1586,10 @@ DoFAccessor::vertex_dof_index (const unsigned int vertex, } -template +template inline types::global_dof_index -DoFAccessor::mg_vertex_dof_index (const int level, +DoFAccessor::mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const unsigned int fe_index) const @@ -1602,10 +1602,10 @@ DoFAccessor::mg_vertex_dof_index (const int level, } -template +template inline void -DoFAccessor::set_vertex_dof_index (const unsigned int vertex, +DoFAccessor::set_vertex_dof_index (const unsigned int vertex, const unsigned int i, const types::global_dof_index index, const unsigned int fe_index) const @@ -1619,10 +1619,10 @@ DoFAccessor::set_vertex_dof_index (const unsigned int vertex, } -template +template inline void -DoFAccessor::set_mg_vertex_dof_index (const int level, +DoFAccessor::set_mg_vertex_dof_index (const int level, const unsigned int vertex, const unsigned int i, const types::global_dof_index index, @@ -1636,10 +1636,10 @@ DoFAccessor::set_mg_vertex_dof_index (const int level, } -template +template inline void -DoFAccessor::set_mg_dof_index (const int level, +DoFAccessor::set_mg_dof_index (const int level, const unsigned int i, const types::global_dof_index index) const { @@ -1674,10 +1674,10 @@ namespace internal } -template +template inline const FiniteElement & -DoFAccessor::get_fe (const unsigned int fe_index) const +DoFAccessor::get_fe (const unsigned int fe_index) const { Assert (fe_index_is_active (fe_index) == true, ExcMessage ("This function can only be called for active fe indices")); @@ -1691,8 +1691,8 @@ namespace internal { namespace DoFAccessor { - template - void get_dof_indices (const dealii::DoFAccessor<1,DH,lda> &accessor, + template + void get_dof_indices (const dealii::DoFAccessor<1,DH,level_dof_access> &accessor, std::vector &dof_indices, const unsigned int fe_index) { @@ -1708,8 +1708,8 @@ namespace internal - template - void get_dof_indices (const dealii::DoFAccessor<2,DH,lda> &accessor, + template + void get_dof_indices (const dealii::DoFAccessor<2,DH,level_dof_access> &accessor, std::vector &dof_indices, const unsigned int fe_index) { @@ -1743,8 +1743,8 @@ namespace internal - template - void get_dof_indices (const dealii::DoFAccessor<3,DH,lda> &accessor, + template + void get_dof_indices (const dealii::DoFAccessor<3,DH,level_dof_access> &accessor, std::vector &dof_indices, const unsigned int fe_index) { @@ -1799,8 +1799,8 @@ namespace internal - template - void get_mg_dof_indices (const dealii::DoFAccessor<1, DH,lda> &accessor, + template + void get_mg_dof_indices (const dealii::DoFAccessor<1, DH,level_dof_access> &accessor, const int level, std::vector &dof_indices, const unsigned int fe_index) @@ -1825,8 +1825,8 @@ namespace internal - template - void get_mg_dof_indices (const dealii::DoFAccessor<2, DH,lda> &accessor, + template + void get_mg_dof_indices (const dealii::DoFAccessor<2, DH,level_dof_access> &accessor, const int level, std::vector &dof_indices, const unsigned int fe_index) @@ -1854,8 +1854,8 @@ namespace internal - template - void get_mg_dof_indices (const dealii::DoFAccessor<3, DH,lda> &accessor, + template + void get_mg_dof_indices (const dealii::DoFAccessor<3, DH,level_dof_access> &accessor, const int level, std::vector &dof_indices, const unsigned int fe_index) @@ -1890,10 +1890,10 @@ namespace internal } -template +template inline void -DoFAccessor::get_dof_indices (std::vector &dof_indices, +DoFAccessor::get_dof_indices (std::vector &dof_indices, const unsigned int fe_index) const { Assert (this->dof_handler != 0, ExcNotInitialized()); @@ -1953,9 +1953,9 @@ DoFAccessor::get_dof_indices (std::vector +template inline -void DoFAccessor::get_mg_dof_indices (const int level, +void DoFAccessor::get_mg_dof_indices (const int level, std::vector &dof_indices, const unsigned int fe_index) const { @@ -2005,9 +2005,9 @@ void DoFAccessor::get_mg_dof_indices (const int level, } -template +template inline -void DoFAccessor::set_mg_dof_indices (const int level, +void DoFAccessor::set_mg_dof_indices (const int level, const std::vector &dof_indices, const unsigned int fe_index) { @@ -2061,9 +2061,9 @@ namespace internal { namespace DoFAccessor { - template + template inline - typename dealii::internal::DoFHandler::Iterators::quad_iterator + typename dealii::internal::DoFHandler::Iterators::quad_iterator get_quad(const dealii::Triangulation *tria, unsigned int index, DH *dof_handler) @@ -2071,57 +2071,57 @@ namespace internal } - template + template inline - typename dealii::internal::DoFHandler::Iterators, lda>::quad_iterator + typename dealii::internal::DoFHandler::Iterators, level_dof_access>::quad_iterator get_quad(const dealii::Triangulation<2,2> *, unsigned int, dealii::DoFHandler<2,2> *) { Assert(false, ExcNotImplemented()); - return typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator(); + return typename dealii::internal::DoFHandler::Iterators, level_dof_access>::line_iterator(); } - template + template inline - typename dealii::internal::DoFHandler::Iterators, lda>::quad_iterator + typename dealii::internal::DoFHandler::Iterators, level_dof_access>::quad_iterator get_quad(const dealii::Triangulation<2,3> *, unsigned int, dealii::DoFHandler<2,3> *) { Assert(false, ExcNotImplemented()); - return typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator(); + return typename dealii::internal::DoFHandler::Iterators, level_dof_access>::line_iterator(); } - template + template inline - typename dealii::internal::DoFHandler::Iterators, lda>::quad_iterator + typename dealii::internal::DoFHandler::Iterators, level_dof_access>::quad_iterator get_quad(const dealii::Triangulation<2,2> *, unsigned int, dealii::hp::DoFHandler<2,2> *) { Assert(false, ExcNotImplemented()); - return typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator(); + return typename dealii::internal::DoFHandler::Iterators, level_dof_access>::line_iterator(); } - template + template inline - typename dealii::internal::DoFHandler::Iterators, lda>::quad_iterator + typename dealii::internal::DoFHandler::Iterators, level_dof_access>::quad_iterator get_quad(const dealii::Triangulation<2,3> *, unsigned int, dealii::hp::DoFHandler<2,3> *) { Assert(false, ExcNotImplemented()); - return typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator(); + return typename dealii::internal::DoFHandler::Iterators, level_dof_access>::line_iterator(); } } } -template +template inline -typename dealii::internal::DoFHandler::Iterators::line_iterator -DoFAccessor::line (const unsigned int i) const +typename dealii::internal::DoFHandler::Iterators::line_iterator +DoFAccessor::line (const unsigned int i) const { // if we are asking for a particular line and this object refers to // a line, then the only valid index is i==0 and we should return @@ -2131,7 +2131,7 @@ DoFAccessor::line (const unsigned int i) const Assert (i==0, ExcMessage ("You can only ask for line zero if the " "current object is a line itself.")); return - typename dealii::internal::DoFHandler::Iterators::cell_iterator + typename dealii::internal::DoFHandler::Iterators::cell_iterator (&this->get_triangulation(), this->level(), this->index(), @@ -2143,7 +2143,7 @@ DoFAccessor::line (const unsigned int i) const Assert (DH::dimension > 1, ExcImpossibleInDim(DH::dimension)); // checking of 'i' happens in line_index(i) - return typename dealii::internal::DoFHandler::Iterators::line_iterator + return typename dealii::internal::DoFHandler::Iterators::line_iterator (this->tria, 0, // only sub-objects are allowed, which have no level this->line_index(i), @@ -2151,10 +2151,10 @@ DoFAccessor::line (const unsigned int i) const } -template +template inline -typename dealii::internal::DoFHandler::Iterators::quad_iterator -DoFAccessor::quad (const unsigned int i) const +typename dealii::internal::DoFHandler::Iterators::quad_iterator +DoFAccessor::quad (const unsigned int i) const { // if we are asking for a // particular quad and this object @@ -2178,7 +2178,7 @@ DoFAccessor::quad (const unsigned int i) const Assert (DH::dimension > 2, ExcImpossibleInDim(DH::dimension)); // checking of 'i' happens in quad_index(i) - return typename dealii::internal::DoFHandler::Iterators::quad_iterator + return typename dealii::internal::DoFHandler::Iterators::quad_iterator (this->tria, 0, // only sub-objects are allowed, which have no level this->quad_index(i), @@ -2189,18 +2189,18 @@ DoFAccessor::quad (const unsigned int i) const /*------------------------- Functions: DoFAccessor<0,1,spacedim> ---------------------------*/ -template