From: Wolfgang Bangerth Date: Wed, 26 Apr 2006 22:13:59 +0000 (+0000) Subject: Split out functions that are different between DoFHandler and hp::DoFHandler. The... X-Git-Tag: v8.0.0~11858 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f30b7482ceb00039e1c04492f2fe43a53a96d0c6;p=dealii.git Split out functions that are different between DoFHandler and hp::DoFHandler. The differences are still to be implemented, however. git-svn-id: https://svn.dealii.org/trunk@12914 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/dofs/dof_accessor.h b/deal.II/deal.II/include/dofs/dof_accessor.h index 226cbe2f59..63761b4c65 100644 --- a/deal.II/deal.II/include/dofs/dof_accessor.h +++ b/deal.II/deal.II/include/dofs/dof_accessor.h @@ -222,10 +222,12 @@ class DoFObjectAccessor_Inheritance * Common template for access to the data on a line, quad, hex. Note * that this class is only here for documentation purposes, the actual * implementation of functions is in classes with specialized template - * parameters. In this class here, we only collect all functions which - * are in the specialized classes for simpler reference. Some - * functions, however, might be missing in the specialized classes, - * such as @p quad in the accessors for lines and quads, etc. + * parameters (see @ref DoFObjectAccessor<1,DH>, @ref + * DoFObjectAccessor<2,DH>, @ref DoFObjectAccessor<3,DH>). In this + * class here, we only collect all functions which are in the + * specialized classes for simpler reference. Some functions, however, + * might be missing in the specialized classes, such as @p quad in the + * accessors for lines and quads, etc. * * This class follows mainly the route laid out by the accessor library * declared in the triangulation library (TriaAccessor). It enables @@ -250,7 +252,7 @@ class DoFObjectAccessor_Inheritance * documentation directory. * * @ingroup dofs - * @ingroup Accessors + * @ingroup Accessors * @author Wolfgang Bangerth, 1998; Guido Kanschat, 1999 */ template @@ -497,6 +499,7 @@ class DoFObjectAccessor : public DoFAccessor, /** * Closure class. * @ingroup dofs + * @ingroup Accessors */ template class DoFObjectAccessor<0, DH> : public DoFAccessor, @@ -552,6 +555,7 @@ class DoFObjectAccessor<0, DH> : public DoFAccessor, * like an ordinary line in all other cases. * * @ingroup dofs + * @ingroup Accessors * @author Wolfgang Bangerth, 1998 */ template @@ -782,6 +786,7 @@ class DoFObjectAccessor<1, DH> : * Grant access to the degrees of freedom located on quads. * * @ingroup dofs + * @ingroup Accessors */ template class DoFObjectAccessor<2, DH> : @@ -1020,6 +1025,7 @@ class DoFObjectAccessor<2, DH> : * Grant access to the degrees of freedom located on hexes. * * @ingroup dofs + * @ingroup Accessors */ template class DoFObjectAccessor<3, DH> : @@ -1278,6 +1284,7 @@ class DoFObjectAccessor<3, DH> : * DoFCellAccessor class as well. * * @ingroup dofs + * @ingroup Accessors * @author Wolfgang Bangerth, 1998 */ template diff --git a/deal.II/deal.II/include/dofs/dof_accessor.templates.h b/deal.II/deal.II/include/dofs/dof_accessor.templates.h index c1fd53f834..050c7d6fc5 100644 --- a/deal.II/deal.II/include/dofs/dof_accessor.templates.h +++ b/deal.II/deal.II/include/dofs/dof_accessor.templates.h @@ -128,122 +128,6 @@ DoFObjectAccessor (const Triangulation *tria, -template -inline -unsigned int -DoFObjectAccessor<1,DH>::dof_index (const unsigned int i) const -{ - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - // since the exception classes are - // from a template dependent base - // class, we have to fully qualify - // them. to work around more - // trouble, typedef the template - // dependent base class to a - // non-template dependent name and - // use that to specify the - // qualified exception names - typedef DoFAccessor BaseClass; - - Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject()); - // make sure a FE has been selected - // and enough room was reserved - Assert (&this->get_fe() != 0, typename BaseClass::ExcInvalidObject()); - Assert (iget_fe().dofs_per_line, - ExcIndexRange (i, 0, this->get_fe().dofs_per_line)); - - return this->dof_handler->levels[this->present_level] - ->line_dofs[this->present_index*this->get_fe().dofs_per_line+i]; -} - - - -template -inline -unsigned int -DoFObjectAccessor<1,DH>::vertex_dof_index (const unsigned int vertex, - const unsigned int i) const -{ - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - // since the exception classes are - // from a template dependent base - // class, we have to fully qualify - // them. to work around more - // trouble, typedef the template - // dependent base class to a - // non-template dependent name and - // use that to specify the - // qualified exception names - typedef DoFAccessor BaseClass; - - Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject()); - Assert (&this->get_fe() != 0, typename BaseClass::ExcInvalidObject()); - Assert (vertex<2, ExcIndexRange (i,0,2)); - Assert (iget_fe().dofs_per_vertex, - ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); - - const unsigned int dof_number = (this->vertex_index(vertex) * - this->get_fe().dofs_per_vertex + - i); - return this->dof_handler->vertex_dofs[dof_number]; -} - - - -template -inline -void -DoFObjectAccessor<1,DH>::get_dof_indices (std::vector &dof_indices) const -{ - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - // since the exception classes are - // from a template dependent base - // class, we have to fully qualify - // them. to work around more - // trouble, typedef the template - // dependent base class to a - // non-template dependent name and - // use that to specify the - // qualified exception names - typedef DoFAccessor BaseClass; - - Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject()); - Assert (&this->get_fe() != 0, typename BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex + - this->get_fe().dofs_per_line), - typename BaseClass::ExcVectorDoesNotMatch()); - - // this function really only makes - // sense on non-active objects if - // all degrees of freedom are - // located on vertices, since - // otherwise there are degrees of - // freedom on sub-objects which are - // not allocated for this - // non-active thing - Assert (!this->has_children() || - (this->get_fe().dofs_per_cell == - 2*this->get_fe().dofs_per_vertex), - typename BaseClass::ExcNotActive()); - - const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex, - dofs_per_line = this->get_fe().dofs_per_line; - std::vector::iterator next = dof_indices.begin(); - for (unsigned int vertex=0; vertex<2; ++vertex) - for (unsigned int d=0; d inline TriaIterator > @@ -347,104 +231,6 @@ DoFObjectAccessor (const Triangulation *tria, -template -inline -unsigned int -DoFObjectAccessor<2,DH>::dof_index (const unsigned int i) const -{ - typedef DoFAccessor BaseClass; - - Assert (this->dof_handler != 0, - typename BaseClass::ExcInvalidObject()); - // make sure a FE has been selected - // and enough room was reserved - Assert (&this->get_fe() != 0, - typename BaseClass::ExcInvalidObject()); - Assert (iget_fe().dofs_per_quad, - ExcIndexRange (i, 0, this->get_fe().dofs_per_quad)); - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - return this->dof_handler->levels[this->present_level] - ->quad_dofs[this->present_index*this->get_fe().dofs_per_quad+i]; -} - - - -template -inline -unsigned int -DoFObjectAccessor<2,DH>::vertex_dof_index (const unsigned int vertex, - const unsigned int i) const -{ - typedef DoFAccessor BaseClass; - - Assert (this->dof_handler != 0, - typename BaseClass::ExcInvalidObject()); - Assert (&this->get_fe() != 0, - typename BaseClass::ExcInvalidObject()); - Assert (vertex<4, ExcIndexRange (i,0,4)); - Assert (iget_fe().dofs_per_vertex, - ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - const unsigned int dof_number = (this->vertex_index(vertex) * - this->get_fe().dofs_per_vertex + - i); - return this->dof_handler->vertex_dofs[dof_number]; -} - - - -template -inline -void -DoFObjectAccessor<2,DH>::get_dof_indices (std::vector &dof_indices) const -{ - typedef DoFAccessor BaseClass; - - Assert (this->dof_handler != 0, - typename BaseClass::ExcInvalidObject()); - Assert (&this->get_fe() != 0, - typename BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (4*this->get_fe().dofs_per_vertex + - 4*this->get_fe().dofs_per_line + - this->get_fe().dofs_per_quad), - typename BaseClass::ExcVectorDoesNotMatch()); - - // this function really only makes - // sense on non-active objects if - // all degrees of freedom are - // located on vertices, since - // otherwise there are degrees of - // freedom on sub-objects which are - // not allocated for this - // non-active thing - Assert (!this->has_children() || - (this->get_fe().dofs_per_cell == - 4*this->get_fe().dofs_per_vertex), - typename BaseClass::ExcNotActive()); - - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex, - dofs_per_line = this->get_fe().dofs_per_line, - dofs_per_quad = this->get_fe().dofs_per_quad; - std::vector::iterator next = dof_indices.begin(); - for (unsigned int vertex=0; vertex<4; ++vertex) - for (unsigned int d=0; dline(line)->dof_index(d); - for (unsigned int d=0; d inline TriaIterator > @@ -572,70 +358,620 @@ DoFObjectAccessor (const Triangulation *tria, template inline -unsigned int -DoFObjectAccessor<3,DH>::dof_index (const unsigned int i) const +TriaIterator > +DoFObjectAccessor<3,DH>::line (const unsigned int i) const { - typedef DoFAccessor BaseClass; - - Assert (this->dof_handler != 0, - typename BaseClass::ExcInvalidObject()); - // make sure a FE has been selected - // and enough room was reserved - Assert (&this->get_fe() != 0, - typename BaseClass::ExcInvalidObject()); - Assert (iget_fe().dofs_per_hex, - ExcIndexRange (i, 0, this->get_fe().dofs_per_hex)); - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - return this->dof_handler->levels[this->present_level] - ->hex_dofs[this->present_index*this->get_fe().dofs_per_hex+i]; + TriaIterator > l = BaseClass::line(i); + return TriaIterator > + ( + this->tria, + this->present_level, + l->index(), + this->dof_handler + ); } - template inline -unsigned int -DoFObjectAccessor<3,DH>::vertex_dof_index (const unsigned int vertex, - const unsigned int i) const +TriaIterator > +DoFObjectAccessor<3,DH>::quad (const unsigned int i) const { - typedef DoFAccessor BaseClass; - - Assert (this->dof_handler != 0, - typename BaseClass::ExcInvalidObject()); - Assert (&this->get_fe() != 0, - typename BaseClass::ExcInvalidObject()); - Assert (vertex<8, ExcIndexRange (i,0,8)); - Assert (iget_fe().dofs_per_vertex, - ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); + Assert (i<6, ExcIndexRange (i, 0, 6)); - const unsigned int dof_number = (this->vertex_index(vertex) * - this->get_fe().dofs_per_vertex + - i); - return this->dof_handler->vertex_dofs[dof_number]; + return TriaIterator > + ( + this->tria, + this->present_level, + this->quad_index (i), + this->dof_handler + ); } - template inline -void -DoFObjectAccessor<3,DH>::get_dof_indices (std::vector &dof_indices) const +TriaIterator > +DoFObjectAccessor<3,DH>::child (const unsigned int i) const { - typedef DoFAccessor BaseClass; + TriaIterator > q (this->tria, + this->present_level+1, + this->child_index (i), + this->dof_handler); + +#ifdef DEBUG + if (q.state() != IteratorState::past_the_end) + Assert (q->used(), typename TriaAccessor::ExcUnusedCellAsChild()); +#endif + return q; +} + + +template +inline +const FiniteElement & +DoFObjectAccessor<3,DH>::get_fe () const +{ + return *this->dof_handler->selected_fe; +} + + + +template +inline +unsigned int +DoFObjectAccessor<3,DH>::active_fe_index () const +{ + return 0; +} + + + +template +inline +void +DoFObjectAccessor<3,DH>::set_active_fe_index (const unsigned int i) +{ + typedef DoFAccessor BaseClass; + Assert (i == 0, typename BaseClass::ExcInvalidObject()); +} + + + +template +void DoFObjectAccessor<3,DH>::copy_from (const DoFObjectAccessor<3,DH> &a) +{ + BaseClass::copy_from (a); + this->set_dof_handler (a.dof_handler); +} + + + +template +inline +bool +DoFObjectAccessor<3,DH>::operator == (const DoFObjectAccessor<3,DH> &a) const +{ + return (TriaObjectAccessor<3,dim>::operator == (a) + && + DoFAccessor::operator == (a)); +} + + +template +inline +bool +DoFObjectAccessor<3,DH>::operator != (const DoFObjectAccessor<3,DH> &a) const +{ + return (TriaObjectAccessor<3,dim>::operator != (a) + || + DoFAccessor::operator != (a)); +} + + +/*--------------- Functions: DoFObjectAccessor<1,DoFHandler> -----------*/ + + +template <> +inline +unsigned int +DoFObjectAccessor<1,DoFHandler<1> >::dof_index (const unsigned int i) const +{ + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + // make sure a FE has been selected + // and enough room was reserved + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (iget_fe().dofs_per_line, + ExcIndexRange (i, 0, this->get_fe().dofs_per_line)); + + return this->dof_handler->levels[this->present_level] + ->line_dofs[this->present_index*this->get_fe().dofs_per_line+i]; +} + + + +template <> +inline +unsigned int +DoFObjectAccessor<1,DoFHandler<1> >::vertex_dof_index (const unsigned int vertex, + const unsigned int i) const +{ + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (vertex<2, ExcIndexRange (i,0,2)); + Assert (iget_fe().dofs_per_vertex, + ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); + + const unsigned int dof_number = (this->vertex_index(vertex) * + this->get_fe().dofs_per_vertex + + i); + return this->dof_handler->vertex_dofs[dof_number]; +} + + + +template <> +inline +void +DoFObjectAccessor<1,DoFHandler<1> >::get_dof_indices (std::vector &dof_indices) const +{ + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex + + this->get_fe().dofs_per_line), + DoFAccessor >::ExcVectorDoesNotMatch()); + + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (!this->has_children() || + (this->get_fe().dofs_per_cell == + 2*this->get_fe().dofs_per_vertex), + DoFAccessor >::ExcNotActive()); + + const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex, + dofs_per_line = this->get_fe().dofs_per_line; + std::vector::iterator next = dof_indices.begin(); + for (unsigned int vertex=0; vertex<2; ++vertex) + for (unsigned int d=0; d +inline +unsigned int +DoFObjectAccessor<1,DoFHandler<2> >::dof_index (const unsigned int i) const +{ + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + // make sure a FE has been selected + // and enough room was reserved + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (iget_fe().dofs_per_line, + ExcIndexRange (i, 0, this->get_fe().dofs_per_line)); + + return this->dof_handler->levels[this->present_level] + ->line_dofs[this->present_index*this->get_fe().dofs_per_line+i]; +} + + + +template <> +inline +unsigned int +DoFObjectAccessor<1,DoFHandler<2> >::vertex_dof_index (const unsigned int vertex, + const unsigned int i) const +{ + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (vertex<2, ExcIndexRange (i,0,2)); + Assert (iget_fe().dofs_per_vertex, + ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); + + const unsigned int dof_number = (this->vertex_index(vertex) * + this->get_fe().dofs_per_vertex + + i); + return this->dof_handler->vertex_dofs[dof_number]; +} + + + +template <> +inline +void +DoFObjectAccessor<1,DoFHandler<2> >::get_dof_indices (std::vector &dof_indices) const +{ + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex + + this->get_fe().dofs_per_line), + DoFAccessor >::ExcVectorDoesNotMatch()); + + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (!this->has_children() || + (this->get_fe().dofs_per_cell == + 2*this->get_fe().dofs_per_vertex), + DoFAccessor >::ExcNotActive()); + + const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex, + dofs_per_line = this->get_fe().dofs_per_line; + std::vector::iterator next = dof_indices.begin(); + for (unsigned int vertex=0; vertex<2; ++vertex) + for (unsigned int d=0; d +inline +unsigned int +DoFObjectAccessor<1,DoFHandler<3> >::dof_index (const unsigned int i) const +{ + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + // make sure a FE has been selected + // and enough room was reserved + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (iget_fe().dofs_per_line, + ExcIndexRange (i, 0, this->get_fe().dofs_per_line)); + + return this->dof_handler->levels[this->present_level] + ->line_dofs[this->present_index*this->get_fe().dofs_per_line+i]; +} + + + +template <> +inline +unsigned int +DoFObjectAccessor<1,DoFHandler<3> >::vertex_dof_index (const unsigned int vertex, + const unsigned int i) const +{ + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (vertex<2, ExcIndexRange (i,0,2)); + Assert (iget_fe().dofs_per_vertex, + ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); + + const unsigned int dof_number = (this->vertex_index(vertex) * + this->get_fe().dofs_per_vertex + + i); + return this->dof_handler->vertex_dofs[dof_number]; +} + + + +template <> +inline +void +DoFObjectAccessor<1,DoFHandler<3> >::get_dof_indices (std::vector &dof_indices) const +{ + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex + + this->get_fe().dofs_per_line), + DoFAccessor >::ExcVectorDoesNotMatch()); + + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (!this->has_children() || + (this->get_fe().dofs_per_cell == + 2*this->get_fe().dofs_per_vertex), + DoFAccessor >::ExcNotActive()); + + const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex, + dofs_per_line = this->get_fe().dofs_per_line; + std::vector::iterator next = dof_indices.begin(); + for (unsigned int vertex=0; vertex<2; ++vertex) + for (unsigned int d=0; d -----------*/ + +template <> +inline +unsigned int +DoFObjectAccessor<2,DoFHandler<2> >::dof_index (const unsigned int i) const +{ + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + // make sure a FE has been selected + // and enough room was reserved + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (iget_fe().dofs_per_quad, + ExcIndexRange (i, 0, this->get_fe().dofs_per_quad)); + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + return this->dof_handler->levels[this->present_level] + ->quad_dofs[this->present_index*this->get_fe().dofs_per_quad+i]; +} + + + +template <> +inline +unsigned int +DoFObjectAccessor<2,DoFHandler<2> >::vertex_dof_index (const unsigned int vertex, + const unsigned int i) const +{ + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (vertex<4, ExcIndexRange (i,0,4)); + Assert (iget_fe().dofs_per_vertex, + ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + const unsigned int dof_number = (this->vertex_index(vertex) * + this->get_fe().dofs_per_vertex + + i); + return this->dof_handler->vertex_dofs[dof_number]; +} + + + +template <> +inline +void +DoFObjectAccessor<2,DoFHandler<2> >::get_dof_indices (std::vector &dof_indices) const +{ + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (dof_indices.size() == (4*this->get_fe().dofs_per_vertex + + 4*this->get_fe().dofs_per_line + + this->get_fe().dofs_per_quad), + DoFAccessor >::ExcVectorDoesNotMatch()); + + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (!this->has_children() || + (this->get_fe().dofs_per_cell == + 4*this->get_fe().dofs_per_vertex), + DoFAccessor >::ExcNotActive()); + + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex, + dofs_per_line = this->get_fe().dofs_per_line, + dofs_per_quad = this->get_fe().dofs_per_quad; + std::vector::iterator next = dof_indices.begin(); + for (unsigned int vertex=0; vertex<4; ++vertex) + for (unsigned int d=0; dline(line)->dof_index(d); + for (unsigned int d=0; d +inline +unsigned int +DoFObjectAccessor<2,DoFHandler<3> >::dof_index (const unsigned int i) const +{ + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + // make sure a FE has been selected + // and enough room was reserved + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (iget_fe().dofs_per_quad, + ExcIndexRange (i, 0, this->get_fe().dofs_per_quad)); + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + return this->dof_handler->levels[this->present_level] + ->quad_dofs[this->present_index*this->get_fe().dofs_per_quad+i]; +} + + +template <> +inline +unsigned int +DoFObjectAccessor<2,DoFHandler<3> >::vertex_dof_index (const unsigned int vertex, + const unsigned int i) const +{ Assert (this->dof_handler != 0, - typename BaseClass::ExcInvalidObject()); + DoFAccessor >::ExcInvalidObject()); Assert (&this->get_fe() != 0, - typename BaseClass::ExcInvalidObject()); + DoFAccessor >::ExcInvalidObject()); + Assert (vertex<4, ExcIndexRange (i,0,4)); + Assert (iget_fe().dofs_per_vertex, + ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + const unsigned int dof_number = (this->vertex_index(vertex) * + this->get_fe().dofs_per_vertex + + i); + return this->dof_handler->vertex_dofs[dof_number]; +} + + + +template <> +inline +void +DoFObjectAccessor<2,DoFHandler<3> >::get_dof_indices (std::vector &dof_indices) const +{ + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (dof_indices.size() == (4*this->get_fe().dofs_per_vertex + + 4*this->get_fe().dofs_per_line + + this->get_fe().dofs_per_quad), + DoFAccessor >::ExcVectorDoesNotMatch()); + + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (!this->has_children() || + (this->get_fe().dofs_per_cell == + 4*this->get_fe().dofs_per_vertex), + DoFAccessor >::ExcNotActive()); + + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex, + dofs_per_line = this->get_fe().dofs_per_line, + dofs_per_quad = this->get_fe().dofs_per_quad; + std::vector::iterator next = dof_indices.begin(); + for (unsigned int vertex=0; vertex<4; ++vertex) + for (unsigned int d=0; dline(line)->dof_index(d); + for (unsigned int d=0; d -----------*/ + + + + +template <> +inline +unsigned int +DoFObjectAccessor<3,DoFHandler<3> >::dof_index (const unsigned int i) const +{ + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + // make sure a FE has been selected + // and enough room was reserved + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (iget_fe().dofs_per_hex, + ExcIndexRange (i, 0, this->get_fe().dofs_per_hex)); + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + return this->dof_handler->levels[this->present_level] + ->hex_dofs[this->present_index*this->get_fe().dofs_per_hex+i]; +} + + + +template <> +inline +unsigned int +DoFObjectAccessor<3,DoFHandler<3> >::vertex_dof_index (const unsigned int vertex, + const unsigned int i) const +{ + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (vertex<8, ExcIndexRange (i,0,8)); + Assert (iget_fe().dofs_per_vertex, + ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + const unsigned int dof_number = (this->vertex_index(vertex) * + this->get_fe().dofs_per_vertex + + i); + return this->dof_handler->vertex_dofs[dof_number]; +} + + + +template <> +inline +void +DoFObjectAccessor<3,DoFHandler<3> >::get_dof_indices (std::vector &dof_indices) const +{ + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); Assert (dof_indices.size() == (8*this->get_fe().dofs_per_vertex + 12*this->get_fe().dofs_per_line + 6*this->get_fe().dofs_per_quad + this->get_fe().dofs_per_hex), - typename BaseClass::ExcVectorDoesNotMatch()); + DoFAccessor >::ExcVectorDoesNotMatch()); Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), ExcMessage ("DoFHandler not initialized")); @@ -650,7 +986,7 @@ DoFObjectAccessor<3,DH>::get_dof_indices (std::vector &dof_indices Assert (!this->has_children() || (this->get_fe().dofs_per_cell == 8*this->get_fe().dofs_per_vertex), - typename BaseClass::ExcNotActive()); + DoFAccessor >::ExcNotActive()); Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), ExcMessage ("DoFHandler not initialized")); @@ -674,120 +1010,147 @@ DoFObjectAccessor<3,DH>::get_dof_indices (std::vector &dof_indices -template -inline -TriaIterator > -DoFObjectAccessor<3,DH>::line (const unsigned int i) const -{ - TriaIterator > l = BaseClass::line(i); - return TriaIterator > - ( - this->tria, - this->present_level, - l->index(), - this->dof_handler - ); -} - +/* -------------- hp vertex dofs stuff ------------------------------------ */ -template +template <> inline -TriaIterator > -DoFObjectAccessor<3,DH>::quad (const unsigned int i) const +unsigned int +DoFObjectAccessor<1,hp::DoFHandler<1> >::vertex_dof_index (const unsigned int vertex, + const unsigned int i) const { - Assert (i<6, ExcIndexRange (i, 0, 6)); + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("hp::DoFHandler not initialized")); - return TriaIterator > - ( - this->tria, - this->present_level, - this->quad_index (i), - this->dof_handler - ); + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (vertex<2, ExcIndexRange (i,0,2)); + Assert (iget_fe().dofs_per_vertex, + ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); + + const unsigned int dof_number = (this->vertex_index(vertex) * + this->get_fe().dofs_per_vertex + + i); + return this->dof_handler->vertex_dofs[dof_number]; } -template + +template <> inline -TriaIterator > -DoFObjectAccessor<3,DH>::child (const unsigned int i) const +unsigned int +DoFObjectAccessor<1,hp::DoFHandler<2> >::vertex_dof_index (const unsigned int vertex, + const unsigned int i) const { - TriaIterator > q (this->tria, - this->present_level+1, - this->child_index (i), - this->dof_handler); - -#ifdef DEBUG - if (q.state() != IteratorState::past_the_end) - Assert (q->used(), typename TriaAccessor::ExcUnusedCellAsChild()); -#endif - return q; -} + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("hp::DoFHandler not initialized")); + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (vertex<2, ExcIndexRange (i,0,2)); + Assert (iget_fe().dofs_per_vertex, + ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); -template -inline -const FiniteElement & -DoFObjectAccessor<3,DH>::get_fe () const -{ - return *this->dof_handler->selected_fe; + const unsigned int dof_number = (this->vertex_index(vertex) * + this->get_fe().dofs_per_vertex + + i); + return this->dof_handler->vertex_dofs[dof_number]; } - -template +template <> inline unsigned int -DoFObjectAccessor<3,DH>::active_fe_index () const +DoFObjectAccessor<1,hp::DoFHandler<3> >::vertex_dof_index (const unsigned int vertex, + const unsigned int i) const { - return 0; -} - + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("hp::DoFHandler not initialized")); + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (vertex<2, ExcIndexRange (i,0,2)); + Assert (iget_fe().dofs_per_vertex, + ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); -template -inline -void -DoFObjectAccessor<3,DH>::set_active_fe_index (const unsigned int i) -{ - typedef DoFAccessor BaseClass; - Assert (i == 0, typename BaseClass::ExcInvalidObject()); + const unsigned int dof_number = (this->vertex_index(vertex) * + this->get_fe().dofs_per_vertex + + i); + return this->dof_handler->vertex_dofs[dof_number]; } - -template -void DoFObjectAccessor<3,DH>::copy_from (const DoFObjectAccessor<3,DH> &a) +template <> +inline +unsigned int +DoFObjectAccessor<2,hp::DoFHandler<2> >::vertex_dof_index (const unsigned int vertex, + const unsigned int i) const { - BaseClass::copy_from (a); - this->set_dof_handler (a.dof_handler); + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (vertex<4, ExcIndexRange (i,0,4)); + Assert (iget_fe().dofs_per_vertex, + ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("hp::DoFHandler not initialized")); + + const unsigned int dof_number = (this->vertex_index(vertex) * + this->get_fe().dofs_per_vertex + + i); + return this->dof_handler->vertex_dofs[dof_number]; } -template +template <> inline -bool -DoFObjectAccessor<3,DH>::operator == (const DoFObjectAccessor<3,DH> &a) const +unsigned int +DoFObjectAccessor<2,hp::DoFHandler<3> >::vertex_dof_index (const unsigned int vertex, + const unsigned int i) const { - return (TriaObjectAccessor<3,dim>::operator == (a) - && - DoFAccessor::operator == (a)); + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (vertex<4, ExcIndexRange (i,0,4)); + Assert (iget_fe().dofs_per_vertex, + ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("hp::DoFHandler not initialized")); + + const unsigned int dof_number = (this->vertex_index(vertex) * + this->get_fe().dofs_per_vertex + + i); + return this->dof_handler->vertex_dofs[dof_number]; } -template + +template <> inline -bool -DoFObjectAccessor<3,DH>::operator != (const DoFObjectAccessor<3,DH> &a) const +unsigned int +DoFObjectAccessor<3,hp::DoFHandler<3> >::vertex_dof_index (const unsigned int vertex, + const unsigned int i) const { - return (TriaObjectAccessor<3,dim>::operator != (a) - || - DoFAccessor::operator != (a)); + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (vertex<4, ExcIndexRange (i,0,4)); + Assert (iget_fe().dofs_per_vertex, + ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex)); + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("hp::DoFHandler not initialized")); + + const unsigned int dof_number = (this->vertex_index(vertex) * + this->get_fe().dofs_per_vertex + + i); + return this->dof_handler->vertex_dofs[dof_number]; } -/*--------------- Functions: DoFObjectAccessor<1,dim,hp::DoFHandler> -----------*/ +/*--------------- Functions: DoFObjectAccessor<1,hp::DoFHandler> -----------*/ template <> inline @@ -831,6 +1194,45 @@ DoFObjectAccessor<1,hp::DoFHandler<1> >::dof_index (const unsigned int i) const +template <> +inline +void +DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_indices (std::vector &dof_indices) const +{ + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex + + this->get_fe().dofs_per_line), + DoFAccessor >::ExcVectorDoesNotMatch()); + + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (!this->has_children() || + (this->get_fe().dofs_per_cell == + 2*this->get_fe().dofs_per_vertex), + DoFAccessor >::ExcNotActive()); + + const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex, + dofs_per_line = this->get_fe().dofs_per_line; + std::vector::iterator next = dof_indices.begin(); + for (unsigned int vertex=0; vertex<2; ++vertex) + for (unsigned int d=0; d inline unsigned int @@ -869,6 +1271,45 @@ DoFObjectAccessor<1,hp::DoFHandler<2> >::dof_index (const unsigned int i) const +template <> +inline +void +DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_indices (std::vector &dof_indices) const +{ + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex + + this->get_fe().dofs_per_line), + DoFAccessor >::ExcVectorDoesNotMatch()); + + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (!this->has_children() || + (this->get_fe().dofs_per_cell == + 2*this->get_fe().dofs_per_vertex), + DoFAccessor >::ExcNotActive()); + + const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex, + dofs_per_line = this->get_fe().dofs_per_line; + std::vector::iterator next = dof_indices.begin(); + for (unsigned int vertex=0; vertex<2; ++vertex) + for (unsigned int d=0; d inline unsigned int @@ -907,6 +1348,45 @@ DoFObjectAccessor<1,hp::DoFHandler<3> >::dof_index (const unsigned int i) const +template <> +inline +void +DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_indices (std::vector &dof_indices) const +{ + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + Assert (this->dof_handler != 0, DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, DoFAccessor >::ExcInvalidObject()); + Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex + + this->get_fe().dofs_per_line), + DoFAccessor >::ExcVectorDoesNotMatch()); + + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (!this->has_children() || + (this->get_fe().dofs_per_cell == + 2*this->get_fe().dofs_per_vertex), + DoFAccessor >::ExcNotActive()); + + const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex, + dofs_per_line = this->get_fe().dofs_per_line; + std::vector::iterator next = dof_indices.begin(); + for (unsigned int vertex=0; vertex<2; ++vertex) + for (unsigned int d=0; d inline void @@ -1135,7 +1615,7 @@ DoFObjectAccessor<1,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int } -/*------------- Functions: DoFObjectAccessor<2,dim,hp::DoFHandler> -------------*/ +/*------------- Functions: DoFObjectAccessor<2,hp::DoFHandler> -------------*/ template <> inline @@ -1269,6 +1749,98 @@ DoFObjectAccessor<2, hp::DoFHandler<3> >::set_dof_index (const unsigned int i, +template <> +inline +void +DoFObjectAccessor<2,hp::DoFHandler<2> >::get_dof_indices (std::vector &dof_indices) const +{ + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (dof_indices.size() == (4*this->get_fe().dofs_per_vertex + + 4*this->get_fe().dofs_per_line + + this->get_fe().dofs_per_quad), + DoFAccessor >::ExcVectorDoesNotMatch()); + + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (!this->has_children() || + (this->get_fe().dofs_per_cell == + 4*this->get_fe().dofs_per_vertex), + DoFAccessor >::ExcNotActive()); + + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex, + dofs_per_line = this->get_fe().dofs_per_line, + dofs_per_quad = this->get_fe().dofs_per_quad; + std::vector::iterator next = dof_indices.begin(); + for (unsigned int vertex=0; vertex<4; ++vertex) + for (unsigned int d=0; dline(line)->dof_index(d); + for (unsigned int d=0; d +inline +void +DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_indices (std::vector &dof_indices) const +{ + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (dof_indices.size() == (4*this->get_fe().dofs_per_vertex + + 4*this->get_fe().dofs_per_line + + this->get_fe().dofs_per_quad), + DoFAccessor >::ExcVectorDoesNotMatch()); + + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (!this->has_children() || + (this->get_fe().dofs_per_cell == + 4*this->get_fe().dofs_per_vertex), + DoFAccessor >::ExcNotActive()); + + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex, + dofs_per_line = this->get_fe().dofs_per_line, + dofs_per_quad = this->get_fe().dofs_per_quad; + std::vector::iterator next = dof_indices.begin(); + for (unsigned int vertex=0; vertex<4; ++vertex) + for (unsigned int d=0; dline(line)->dof_index(d); + for (unsigned int d=0; d inline const FiniteElement<2> & @@ -1358,7 +1930,7 @@ DoFObjectAccessor<2,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int } -/*------------- Functions: DoFObjectAccessor<3,dim,hp::DoFHandler> -------------*/ +/*------------- Functions: DoFObjectAccessor<3,hp::DoFHandler> -------------*/ template <> inline @@ -1431,6 +2003,58 @@ DoFObjectAccessor<3, hp::DoFHandler<3> >::set_dof_index (const unsigned int i, +template <> +inline +void +DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_indices (std::vector &dof_indices) const +{ + Assert (this->dof_handler != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (&this->get_fe() != 0, + DoFAccessor >::ExcInvalidObject()); + Assert (dof_indices.size() == (8*this->get_fe().dofs_per_vertex + + 12*this->get_fe().dofs_per_line + + 6*this->get_fe().dofs_per_quad + + this->get_fe().dofs_per_hex), + DoFAccessor >::ExcVectorDoesNotMatch()); + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + // this function really only makes + // sense on non-active objects if + // all degrees of freedom are + // located on vertices, since + // otherwise there are degrees of + // freedom on sub-objects which are + // not allocated for this + // non-active thing + Assert (!this->has_children() || + (this->get_fe().dofs_per_cell == + 8*this->get_fe().dofs_per_vertex), + DoFAccessor >::ExcNotActive()); + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex, + dofs_per_line = this->get_fe().dofs_per_line, + dofs_per_quad = this->get_fe().dofs_per_quad, + dofs_per_hex = this->get_fe().dofs_per_hex; + std::vector::iterator next = dof_indices.begin(); + for (unsigned int vertex=0; vertex<8; ++vertex) + for (unsigned int d=0; dline(line)->dof_index(d); + for (unsigned int quad=0; quad<6; ++quad) + for (unsigned int d=0; dquad(quad)->dof_index(d); + for (unsigned int d=0; d inline const FiniteElement<3> & @@ -1478,6 +2102,7 @@ DoFObjectAccessor<3,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int } + /*------------------------- Functions: DoFCellAccessor -----------------------*/ template