From e7be0d596ddf28b862f83bb8b174956a1234f5bc Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 1 May 2006 22:00:23 +0000 Subject: [PATCH] Merge a bunch of code. git-svn-id: https://svn.dealii.org/trunk@12945 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/dofs/dof_accessor.templates.h | 728 ++++-------------- 1 file changed, 161 insertions(+), 567 deletions(-) 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 2f4702ed62..a3de91ff91 100644 --- a/deal.II/deal.II/include/dofs/dof_accessor.templates.h +++ b/deal.II/deal.II/include/dofs/dof_accessor.templates.h @@ -190,6 +190,46 @@ DoFObjectAccessor (const Triangulation *tria, +template +inline +void +DoFObjectAccessor<1,DH>::get_dof_indices (std::vector &dof_indices, + const unsigned int fe_index) const +{ + Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), + ExcMessage ("DoFHandler not initialized")); + + Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, typename BaseClass::ExcInvalidObject()); + Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex + + this->dof_handler->get_fe()[fe_index].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->dof_handler->get_fe()[fe_index].dofs_per_cell == + 2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex), + typename BaseClass::ExcNotActive()); + + const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex, + dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line; + std::vector::iterator next = dof_indices.begin(); + for (unsigned int vertex=0; vertex<2; ++vertex) + for (unsigned int d=0; dvertex_dof_index(vertex,d,fe_index); + for (unsigned int d=0; d -----------------------*/ @@ -226,6 +266,53 @@ DoFObjectAccessor<2,DH>::line (const unsigned int i) const +template +inline +void +DoFObjectAccessor<2,DH>::get_dof_indices (std::vector &dof_indices, + const unsigned int fe_index) const +{ + Assert (this->dof_handler != 0, + typename BaseClass::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, + typename BaseClass::ExcInvalidObject()); + Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex + + 4*this->dof_handler->get_fe()[fe_index].dofs_per_line + + this->dof_handler->get_fe()[fe_index].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->dof_handler->get_fe()[fe_index].dofs_per_cell == + 4*this->dof_handler->get_fe()[fe_index].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->dof_handler->get_fe()[fe_index].dofs_per_vertex, + dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line, + dofs_per_quad = this->dof_handler->get_fe()[fe_index].dofs_per_quad; + std::vector::iterator next = dof_indices.begin(); + for (unsigned int vertex=0; vertex<4; ++vertex) + for (unsigned int d=0; dvertex_dof_index(vertex,d,fe_index); + for (unsigned int line=0; line<4; ++line) + for (unsigned int d=0; dline(line)->dof_index(d,fe_index); + for (unsigned int d=0; d -----------------------*/ template @@ -274,50 +361,25 @@ DoFObjectAccessor<3,DH>::quad (const unsigned int i) const } -/*--------------- Functions: DoFObjectAccessor<1,DoFHandler> -----------*/ - - -template <> -inline -unsigned int -DoFObjectAccessor<1,DoFHandler<1> >::dof_index (const unsigned int i, - const unsigned int fe_index) const -{ - Assert (fe_index == DoFHandler<1>::default_fe_index, - ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects")); - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject()); - // make sure a FE has been selected - // and enough room was reserved - Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject()); - Assert (idof_handler->get_fe().dofs_per_line, - ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line)); - - return this->dof_handler->levels[this->present_level] - ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i]; -} - - -template <> +template inline void -DoFObjectAccessor<1,DoFHandler<1> >::get_dof_indices (std::vector &dof_indices, - const unsigned int fe_index) const +DoFObjectAccessor<3,DH>::get_dof_indices (std::vector &dof_indices, + const unsigned int fe_index) const { - Assert (fe_index == DoFHandler<1>::default_fe_index, - ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects")); + Assert (this->dof_handler != 0, + typename BaseClass::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, + typename BaseClass::ExcInvalidObject()); + Assert (dof_indices.size() == (8*this->dof_handler->get_fe()[fe_index].dofs_per_vertex + + 12*this->dof_handler->get_fe()[fe_index].dofs_per_line + + 6*this->dof_handler->get_fe()[fe_index].dofs_per_quad + + this->dof_handler->get_fe()[fe_index].dofs_per_hex), + typename BaseClass::ExcVectorDoesNotMatch()); Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), ExcMessage ("DoFHandler not initialized")); - Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject()); - Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (2*this->dof_handler->get_fe().dofs_per_vertex + - this->dof_handler->get_fe().dofs_per_line), - BaseClass::ExcVectorDoesNotMatch()); - // this function really only makes // sense on non-active objects if // all degrees of freedom are @@ -327,29 +389,43 @@ DoFObjectAccessor<1,DoFHandler<1> >::get_dof_indices (std::vector // not allocated for this // non-active thing Assert (!this->has_children() || - (this->dof_handler->get_fe().dofs_per_cell == - 2*this->dof_handler->get_fe().dofs_per_vertex), - BaseClass::ExcNotActive()); + (this->dof_handler->get_fe()[fe_index].dofs_per_cell == + 8*this->dof_handler->get_fe()[fe_index].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->dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = this->dof_handler->get_fe().dofs_per_line; + const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex, + dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line, + dofs_per_quad = this->dof_handler->get_fe()[fe_index].dofs_per_quad, + dofs_per_hex = this->dof_handler->get_fe()[fe_index].dofs_per_hex; std::vector::iterator next = dof_indices.begin(); - for (unsigned int vertex=0; vertex<2; ++vertex) + for (unsigned int vertex=0; vertex<8; ++vertex) for (unsigned int d=0; dvertex_dof_index(vertex,d); - for (unsigned int d=0; dvertex_dof_index(vertex,d,fe_index); + for (unsigned int line=0; line<12; ++line) + for (unsigned int d=0; dline(line)->dof_index(d,fe_index); + for (unsigned int quad=0; quad<6; ++quad) + for (unsigned int d=0; dquad(quad)->dof_index(d,fe_index); + for (unsigned int d=0; d -----------*/ + + template <> inline unsigned int -DoFObjectAccessor<1,DoFHandler<2> >::dof_index (const unsigned int i, +DoFObjectAccessor<1,DoFHandler<1> >::dof_index (const unsigned int i, const unsigned int fe_index) const { - Assert (fe_index == DoFHandler<2>::default_fe_index, + Assert (fe_index == DoFHandler<1>::default_fe_index, ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects")); Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), ExcMessage ("DoFHandler not initialized")); @@ -369,9 +445,9 @@ DoFObjectAccessor<1,DoFHandler<2> >::dof_index (const unsigned int i, template <> inline -void -DoFObjectAccessor<1,DoFHandler<2> >::get_dof_indices (std::vector &dof_indices, - const unsigned int fe_index) const +unsigned int +DoFObjectAccessor<1,DoFHandler<2> >::dof_index (const unsigned int i, + const unsigned int fe_index) const { Assert (fe_index == DoFHandler<2>::default_fe_index, ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects")); @@ -379,32 +455,14 @@ DoFObjectAccessor<1,DoFHandler<2> >::get_dof_indices (std::vector ExcMessage ("DoFHandler not initialized")); Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject()); + // make sure a FE has been selected + // and enough room was reserved Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (2*this->dof_handler->get_fe().dofs_per_vertex + - this->dof_handler->get_fe().dofs_per_line), - BaseClass::ExcVectorDoesNotMatch()); + Assert (idof_handler->get_fe().dofs_per_line, + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line)); - // 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->dof_handler->get_fe().dofs_per_cell == - 2*this->dof_handler->get_fe().dofs_per_vertex), - BaseClass::ExcNotActive()); - - const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = this->dof_handler->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; dvertex_dof_index(vertex,d); - for (unsigned int d=0; ddof_handler->levels[this->present_level] + ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i]; } @@ -433,48 +491,6 @@ DoFObjectAccessor<1,DoFHandler<3> >::dof_index (const unsigned int i, -template <> -inline -void -DoFObjectAccessor<1,DoFHandler<3> >::get_dof_indices (std::vector &dof_indices, - const unsigned int fe_index) const -{ - Assert (fe_index == DoFHandler<3>::default_fe_index, - ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects")); - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject()); - Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (2*this->dof_handler->get_fe().dofs_per_vertex + - this->dof_handler->get_fe().dofs_per_line), - 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->dof_handler->get_fe().dofs_per_cell == - 2*this->dof_handler->get_fe().dofs_per_vertex), - BaseClass::ExcNotActive()); - - const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = this->dof_handler->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; dvertex_dof_index(vertex,d); - for (unsigned int d=0; d -----------*/ template <> @@ -504,57 +520,38 @@ DoFObjectAccessor<2,DoFHandler<2> >::dof_index (const unsigned int i, template <> inline -void -DoFObjectAccessor<2,DoFHandler<2> >::get_dof_indices (std::vector &dof_indices, - const unsigned int fe_index) const +unsigned int +DoFObjectAccessor<2,DoFHandler<3> >::dof_index (const unsigned int i, + const unsigned int fe_index) const { - Assert (fe_index == DoFHandler<2>::default_fe_index, + Assert (fe_index == DoFHandler<3>::default_fe_index, ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects")); Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject()); + // make sure a FE has been selected + // and enough room was reserved Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (4*this->dof_handler->get_fe().dofs_per_vertex + - 4*this->dof_handler->get_fe().dofs_per_line + - this->dof_handler->get_fe().dofs_per_quad), - 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->dof_handler->get_fe().dofs_per_cell == - 4*this->dof_handler->get_fe().dofs_per_vertex), - BaseClass::ExcNotActive()); - + Assert (idof_handler->get_fe().dofs_per_quad, + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_quad)); Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), ExcMessage ("DoFHandler not initialized")); - - const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = this->dof_handler->get_fe().dofs_per_line, - dofs_per_quad = this->dof_handler->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; dvertex_dof_index(vertex,d); - for (unsigned int line=0; line<4; ++line) - for (unsigned int d=0; dline(line)->dof_index(d); - for (unsigned int d=0; ddof_handler->levels[this->present_level] + ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i]; } +/*--------------- Functions: DoFObjectAccessor<3,DoFHandler> -----------*/ + + + + template <> inline unsigned int -DoFObjectAccessor<2,DoFHandler<3> >::dof_index (const unsigned int i, +DoFObjectAccessor<3,DoFHandler<3> >::dof_index (const unsigned int i, const unsigned int fe_index) const { Assert (fe_index == DoFHandler<3>::default_fe_index, @@ -565,161 +562,27 @@ DoFObjectAccessor<2,DoFHandler<3> >::dof_index (const unsigned int i, // and enough room was reserved Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject()); - Assert (idof_handler->get_fe().dofs_per_quad, - ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_quad)); + Assert (idof_handler->get_fe().dofs_per_hex, + ExcIndexRange (i, 0, this->dof_handler->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] - ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i]; + ->hex_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_hex+i]; } +/* -------------- hp vertex dofs stuff ------------------------------------ */ + + +/*--------------- Functions: DoFObjectAccessor<1,hp::DoFHandler> -----------*/ + template <> inline -void -DoFObjectAccessor<2,DoFHandler<3> >::get_dof_indices (std::vector &dof_indices, - const unsigned int fe_index) const -{ - Assert (fe_index == DoFHandler<3>::default_fe_index, - ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects")); - Assert (this->dof_handler != 0, - BaseClass::ExcInvalidObject()); - Assert (&this->dof_handler->get_fe() != 0, - BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (4*this->dof_handler->get_fe().dofs_per_vertex + - 4*this->dof_handler->get_fe().dofs_per_line + - this->dof_handler->get_fe().dofs_per_quad), - 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->dof_handler->get_fe().dofs_per_cell == - 4*this->dof_handler->get_fe().dofs_per_vertex), - BaseClass::ExcNotActive()); - - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = this->dof_handler->get_fe().dofs_per_line, - dofs_per_quad = this->dof_handler->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; dvertex_dof_index(vertex,d); - for (unsigned int line=0; line<4; ++line) - 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 unsigned int fe_index) const -{ - Assert (fe_index == DoFHandler<3>::default_fe_index, - ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects")); - Assert (this->dof_handler != 0, - BaseClass::ExcInvalidObject()); - // make sure a FE has been selected - // and enough room was reserved - Assert (&this->dof_handler->get_fe() != 0, - BaseClass::ExcInvalidObject()); - Assert (idof_handler->get_fe().dofs_per_hex, - ExcIndexRange (i, 0, this->dof_handler->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->dof_handler->get_fe().dofs_per_hex+i]; -} - - - -template <> -inline -void -DoFObjectAccessor<3,DoFHandler<3> >::get_dof_indices (std::vector &dof_indices, - const unsigned int fe_index) const -{ - Assert (fe_index == DoFHandler<3>::default_fe_index, - ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects")); - Assert (this->dof_handler != 0, - BaseClass::ExcInvalidObject()); - Assert (&this->dof_handler->get_fe() != 0, - BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (8*this->dof_handler->get_fe().dofs_per_vertex + - 12*this->dof_handler->get_fe().dofs_per_line + - 6*this->dof_handler->get_fe().dofs_per_quad + - this->dof_handler->get_fe().dofs_per_hex), - BaseClass::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->dof_handler->get_fe().dofs_per_cell == - 8*this->dof_handler->get_fe().dofs_per_vertex), - BaseClass::ExcNotActive()); - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = this->dof_handler->get_fe().dofs_per_line, - dofs_per_quad = this->dof_handler->get_fe().dofs_per_quad, - dofs_per_hex = this->dof_handler->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; dvertex_dof_index(vertex,d); - for (unsigned int line=0; line<12; ++line) - 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 -----------*/ - -template <> -inline -unsigned int -DoFObjectAccessor<1,hp::DoFHandler<1> >::dof_index (const unsigned int i, - const unsigned int fe_index) const +unsigned int +DoFObjectAccessor<1,hp::DoFHandler<1> >::dof_index (const unsigned int i, + const unsigned int fe_index) const { return this->dof_handler->levels[this->present_level] ->get_line_dof_index (*this->dof_handler, @@ -730,46 +593,6 @@ DoFObjectAccessor<1,hp::DoFHandler<1> >::dof_index (const unsigned int i, -template <> -inline -void -DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_indices (std::vector &dof_indices, - const unsigned int fe_index) const -{ - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject()); - Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex + - this->dof_handler->get_fe()[fe_index].dofs_per_line), - 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->dof_handler->get_fe()[fe_index].dofs_per_cell == - 2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex), - BaseClass::ExcNotActive()); - - const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex, - dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line; - std::vector::iterator next = dof_indices.begin(); - for (unsigned int vertex=0; vertex<2; ++vertex) - for (unsigned int d=0; dvertex_dof_index(vertex,d,fe_index); - for (unsigned int d=0; d inline unsigned int @@ -785,46 +608,6 @@ DoFObjectAccessor<1,hp::DoFHandler<2> >::dof_index (const unsigned int i, -template <> -inline -void -DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_indices (std::vector &dof_indices, - const unsigned int fe_index) const -{ - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject()); - Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex + - this->dof_handler->get_fe()[fe_index].dofs_per_line), - 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->dof_handler->get_fe()[fe_index].dofs_per_cell == - 2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex), - BaseClass::ExcNotActive()); - - const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex, - dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line; - std::vector::iterator next = dof_indices.begin(); - for (unsigned int vertex=0; vertex<2; ++vertex) - for (unsigned int d=0; dvertex_dof_index(vertex,d,fe_index); - for (unsigned int d=0; d inline unsigned int @@ -840,46 +623,6 @@ DoFObjectAccessor<1,hp::DoFHandler<3> >::dof_index (const unsigned int i, -template <> -inline -void -DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_indices (std::vector &dof_indices, - const unsigned int fe_index) const -{ - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject()); - Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex + - this->dof_handler->get_fe()[fe_index].dofs_per_line), - 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->dof_handler->get_fe()[fe_index].dofs_per_cell == - 2*this->dof_handler->get_fe()[fe_index].dofs_per_vertex), - BaseClass::ExcNotActive()); - - const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex, - dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line; - std::vector::iterator next = dof_indices.begin(); - for (unsigned int vertex=0; vertex<2; ++vertex) - for (unsigned int d=0; dvertex_dof_index(vertex,d,fe_index); - for (unsigned int d=0; d inline void @@ -996,101 +739,6 @@ 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 unsigned int fe_index) const -{ - Assert (this->dof_handler != 0, - BaseClass::ExcInvalidObject()); - Assert (&this->dof_handler->get_fe() != 0, - BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex + - 4*this->dof_handler->get_fe()[fe_index].dofs_per_line + - this->dof_handler->get_fe()[fe_index].dofs_per_quad), - 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->dof_handler->get_fe()[fe_index].dofs_per_cell == - 4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex), - BaseClass::ExcNotActive()); - - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex, - dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line, - dofs_per_quad = this->dof_handler->get_fe()[fe_index].dofs_per_quad; - std::vector::iterator next = dof_indices.begin(); - for (unsigned int vertex=0; vertex<4; ++vertex) - for (unsigned int d=0; dvertex_dof_index(vertex,d,fe_index); - for (unsigned int line=0; line<4; ++line) - for (unsigned int d=0; dline(line)->dof_index(d,fe_index); - for (unsigned int d=0; d -inline -void -DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_indices (std::vector &dof_indices, - const unsigned int fe_index) const -{ - Assert (this->dof_handler != 0, - BaseClass::ExcInvalidObject()); - Assert (&this->dof_handler->get_fe() != 0, - BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex + - 4*this->dof_handler->get_fe()[fe_index].dofs_per_line + - this->dof_handler->get_fe()[fe_index].dofs_per_quad), - 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->dof_handler->get_fe()[fe_index].dofs_per_cell == - 4*this->dof_handler->get_fe()[fe_index].dofs_per_vertex), - BaseClass::ExcNotActive()); - - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex, - dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line, - dofs_per_quad = this->dof_handler->get_fe()[fe_index].dofs_per_quad; - std::vector::iterator next = dof_indices.begin(); - for (unsigned int vertex=0; vertex<4; ++vertex) - for (unsigned int d=0; dvertex_dof_index(vertex,d,fe_index); - for (unsigned int line=0; line<4; ++line) - for (unsigned int d=0; dline(line)->dof_index(d,fe_index); - for (unsigned int d=0; d -------------*/ @@ -1126,60 +774,6 @@ 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 unsigned int fe_index) const -{ - Assert (this->dof_handler != 0, - BaseClass::ExcInvalidObject()); - Assert (&this->dof_handler->get_fe() != 0, - BaseClass::ExcInvalidObject()); - Assert (dof_indices.size() == (8*this->dof_handler->get_fe()[fe_index].dofs_per_vertex + - 12*this->dof_handler->get_fe()[fe_index].dofs_per_line + - 6*this->dof_handler->get_fe()[fe_index].dofs_per_quad + - this->dof_handler->get_fe()[fe_index].dofs_per_hex), - BaseClass::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->dof_handler->get_fe()[fe_index].dofs_per_cell == - 8*this->dof_handler->get_fe()[fe_index].dofs_per_vertex), - BaseClass::ExcNotActive()); - Assert (static_cast(this->present_level) < this->dof_handler->levels.size(), - ExcMessage ("DoFHandler not initialized")); - - const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[fe_index].dofs_per_vertex, - dofs_per_line = this->dof_handler->get_fe()[fe_index].dofs_per_line, - dofs_per_quad = this->dof_handler->get_fe()[fe_index].dofs_per_quad, - dofs_per_hex = this->dof_handler->get_fe()[fe_index].dofs_per_hex; - std::vector::iterator next = dof_indices.begin(); - for (unsigned int vertex=0; vertex<8; ++vertex) - for (unsigned int d=0; dvertex_dof_index(vertex,d,fe_index); - for (unsigned int line=0; line<12; ++line) - for (unsigned int d=0; dline(line)->dof_index(d,fe_index); - for (unsigned int quad=0; quad<6; ++quad) - for (unsigned int d=0; dquad(quad)->dof_index(d,fe_index); - for (unsigned int d=0; d -- 2.39.5