From 873463268b0f2d8247d19c227a381f9776fbede1 Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 12 Feb 2013 21:19:45 +0000 Subject: [PATCH] Work around a bug in Intel ICC 10.1. This also significantly cleans up the code. git-svn-id: https://svn.dealii.org/trunk@28345 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/dofs/dof_accessor.templates.h | 122 +++--------------- 1 file changed, 21 insertions(+), 101 deletions(-) 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 2f654a07a4..3f3ffedcbe 100644 --- a/deal.II/include/deal.II/dofs/dof_accessor.templates.h +++ b/deal.II/include/deal.II/dofs/dof_accessor.templates.h @@ -2051,21 +2051,6 @@ namespace internal { namespace DoFAccessor { - template - inline - typename dealii::internal::DoFHandler::Iterators::line_iterator - get_line(const dealii::Triangulation *tria, - unsigned int index, - DH *dof_handler) - { - return typename dealii::internal::DoFHandler::Iterators::line_iterator - ( - tria, - 0, // only sub-objects are allowed, which have no level - index, - dof_handler); - } - template inline typename dealii::internal::DoFHandler::Iterators::quad_iterator @@ -2073,48 +2058,8 @@ namespace internal unsigned int index, DH *dof_handler) { - return typename dealii::internal::DoFHandler::Iterators::quad_iterator - ( - tria, - 0, // only sub-objects are allowed, which have no level - index, - dof_handler); - } - - // None of these specializations should ever be called - template - inline - typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator - get_line(const dealii::Triangulation<1,1> *, - unsigned int, - dealii::DoFHandler<1,1> *) - { - Assert(false, ExcNotImplemented()); - return typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator(); - } - - - template - inline - typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator - get_line(const dealii::Triangulation<1,2> *, - unsigned int, - dealii::DoFHandler<1,2> *) - { - Assert(false, ExcNotImplemented()); - return typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator(); } - template - inline - typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator - get_line(const dealii::Triangulation<1,3> *, - unsigned int, - dealii::DoFHandler<1,3> *) - { - Assert(false, ExcNotImplemented()); - return typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator(); - } template inline @@ -2138,39 +2083,6 @@ namespace internal return typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator(); } - template - inline - typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator - get_line(const dealii::Triangulation<1,1> *, - unsigned int, - dealii::hp::DoFHandler<1,1> *) - { - Assert(false, ExcNotImplemented()); - return typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator(); - } - - template - inline - typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator - get_line(const dealii::Triangulation<1,2> *, - unsigned int, - dealii::hp::DoFHandler<1,2> *) - { - Assert(false, ExcNotImplemented()); - return typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator(); - } - - template - inline - typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator - get_line(const dealii::Triangulation<1,3> *, - unsigned int, - dealii::hp::DoFHandler<1,3> *) - { - Assert(false, ExcNotImplemented()); - return typename dealii::internal::DoFHandler::Iterators, lda>::line_iterator(); - } - template inline typename dealii::internal::DoFHandler::Iterators, lda>::quad_iterator @@ -2201,11 +2113,9 @@ inline 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 *this + // 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 + // *this if (structdim == 1) { Assert (i==0, ExcMessage ("You can only ask for line zero if the " @@ -2218,9 +2128,16 @@ DoFAccessor::line (const unsigned int i) const &this->get_dof_handler()); } - // checking of 'i' happens in - // line_index(i) - return dealii::internal::DoFAccessor::get_line(this->tria, this->line_index(i), this->dof_handler); + // otherwise we need to be in structdim>=2 + Assert (structdim > 1, ExcImpossibleInDim(structdim)); + Assert (DH::dimension > 1, ExcImpossibleInDim(DH::dimension)); + + // checking of 'i' happens in line_index(i) + return typename dealii::internal::DoFHandler::Iterators::line_iterator + (this->tria, + 0, // only sub-objects are allowed, which have no level + this->line_index(i), + this->dof_handler); } @@ -2246,13 +2163,16 @@ DoFAccessor::quad (const unsigned int i) const &this->get_dof_handler()); } - // otherwise we need to be in - // structdim>=3 + // otherwise we need to be in structdim>=3 Assert (structdim > 2, ExcImpossibleInDim(structdim)); - // checking of 'i' happens in - // quad_index(i) + Assert (DH::dimension > 2, ExcImpossibleInDim(DH::dimension)); - return dealii::internal::DoFAccessor::get_quad(this->tria, this->quad_index(i), this->dof_handler); + // checking of 'i' happens in quad_index(i) + return typename dealii::internal::DoFHandler::Iterators::quad_iterator + (this->tria, + 0, // only sub-objects are allowed, which have no level + this->quad_index(i), + this->dof_handler); } -- 2.39.5