Assert (i<this->get_fe().dofs_per_line,
ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+ // for lines in 1d, we only have to
+ // take care of the offset, no
+ // linked lists or whatever (see
+ // hp::DoFLevels)
const unsigned int offset = this->dof_handler->levels[this->present_level]
->dof_line_index_offset[this->present_index];
Assert (offset != this->dof_handler->invalid_dof_index,
}
+
template <>
inline
unsigned int
}
+
template <>
inline
unsigned int
Assert (i<this->get_fe().dofs_per_line,
ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+ // for lines in 1d, we only have to
+ // take care of the offset, no
+ // linked lists or whatever (see
+ // hp::DoFLevels)
const unsigned int offset = this->dof_handler->levels[this->present_level]
->dof_line_index_offset[this->present_index];
Assert (offset != this->dof_handler->invalid_dof_index,
}
+
template <>
inline
void
}
+
template <>
inline
void
const FiniteElement<2> &
DoFObjectAccessor<1,hp::DoFHandler<2> >::get_fe () const
{
- return (*dof_handler->finite_elements)[active_fe_index ()];
+ Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
+ "associated with active_fe_indices and corresponding "
+ "finite element objects"));
+ return (*dof_handler->finite_elements)[0];
}
const FiniteElement<3> &
DoFObjectAccessor<1,hp::DoFHandler<3> >::get_fe () const
{
- return (*dof_handler->finite_elements)[active_fe_index ()];
+ Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
+ "associated with active_fe_indices and corresponding "
+ "finite element objects"));
+ return (*dof_handler->finite_elements)[0];
}
unsigned int
DoFObjectAccessor<1,hp::DoFHandler<2> >::active_fe_index () const
{
- Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
- ExcMessage ("DoFHandler not initialized"));
- Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
- this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
- ExcIndexRange (this->present_index, 0,
- this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
- return this->dof_handler->levels[this->present_level]
- ->active_fe_indices[this->present_index];
+ Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
+ "associated with active_fe_indices and corresponding "
+ "finite element objects"));
+ return 0;
}
unsigned int
DoFObjectAccessor<1,hp::DoFHandler<3> >::active_fe_index () const
{
- Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
- ExcMessage ("DoFHandler not initialized"));
- Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
- this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
- ExcIndexRange (this->present_index, 0,
- this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
- return this->dof_handler->levels[this->present_level]
- ->active_fe_indices[this->present_index];
+ Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
+ "associated with active_fe_indices and corresponding "
+ "finite element objects"));
+ return 0;
}
template <>
inline
void
-DoFObjectAccessor<1,hp::DoFHandler<2> >::set_active_fe_index (const unsigned int i)
+DoFObjectAccessor<1,hp::DoFHandler<2> >::set_active_fe_index (const unsigned int)
{
- Assert (this->dof_handler != 0, ExcInvalidObject());
- Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
- ExcMessage ("DoFHandler not initialized"));
- Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
- this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
- ExcIndexRange (this->present_index, 0,
- this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
- Assert (i < this->dof_handler->finite_elements->size (),
- ExcIndexRange(i, 0, this->dof_handler->finite_elements->size ()));
-
- this->dof_handler->levels[this->present_level]
- ->active_fe_indices[this->present_index] = i;
+ Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
+ "associated with active_fe_indices and corresponding "
+ "finite element objects"));
}
template <>
inline
void
-DoFObjectAccessor<1,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i)
+DoFObjectAccessor<1,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int)
{
- Assert (this->dof_handler != 0, ExcInvalidObject());
- Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
- ExcMessage ("DoFHandler not initialized"));
- Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
- this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
- ExcIndexRange (this->present_index, 0,
- this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
- Assert (i < this->dof_handler->finite_elements->size (),
- ExcIndexRange(i, 0, this->dof_handler->finite_elements->size ()));
-
- this->dof_handler->levels[this->present_level]
- ->active_fe_indices[this->present_index] = i;
+ Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
+ "associated with active_fe_indices and corresponding "
+ "finite element objects"));
}
Assert (i<this->get_fe().dofs_per_quad,
ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+ // for quads in 2d, we only have to
+ // take care of the offset, no
+ // linked lists or whatever (see
+ // hp::DoFLevels)
const unsigned int offset = this->dof_handler->levels[this->present_level]
->dof_quad_index_offset[this->present_index];
Assert (offset != this->dof_handler->invalid_dof_index,
Assert (i<this->get_fe().dofs_per_quad,
ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+ // for quads in 2d, we only have to
+ // take care of the offset, no
+ // linked lists or whatever (see
+ // hp::DoFLevels)
const unsigned int offset = this->dof_handler->levels[this->present_level]
->dof_quad_index_offset[this->present_index];
Assert (offset != this->dof_handler->invalid_dof_index,
inline
void
DoFObjectAccessor<2, hp::DoFHandler<3> >::set_dof_index (const unsigned int i,
- const unsigned int index) const
+ const unsigned int index) const
{
typedef DoFAccessor<hp::DoFHandler<3> > BaseClass;
const FiniteElement<3> &
DoFObjectAccessor<2,hp::DoFHandler<3> >::get_fe () const
{
- return (*dof_handler->finite_elements)[active_fe_index ()];
+ Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
+ "associated with active_fe_indices and corresponding "
+ "finite element objects"));
+ return (*dof_handler->finite_elements)[0];
}
+
template <>
inline
unsigned int
+
template <>
inline
unsigned int
DoFObjectAccessor<2,hp::DoFHandler<3> >::active_fe_index () const
{
- Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
- ExcMessage ("DoFHandler not initialized"));
- Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
- this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
- ExcIndexRange (this->present_index, 0,
- this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
- return this->dof_handler->levels[this->present_level]
- ->active_fe_indices[this->present_index];
+ Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
+ "associated with active_fe_indices and corresponding "
+ "finite element objects"));
+ return 0;
}
+
template <>
inline
void
template <>
inline
void
-DoFObjectAccessor<2,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i)
+DoFObjectAccessor<2,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int)
{
- Assert (this->dof_handler != 0, ExcInvalidObject());
- Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
- ExcMessage ("DoFHandler not initialized"));
- Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
- this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
- ExcIndexRange (this->present_index, 0,
- this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
- Assert (i < this->dof_handler->finite_elements->size (),
- ExcIndexRange(i, 0, this->dof_handler->finite_elements->size ()));
-
- this->dof_handler->levels[this->present_level]
- ->active_fe_indices[this->present_index] = i;
+ Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
+ "associated with active_fe_indices and corresponding "
+ "finite element objects"));
}
Assert (i<this->get_fe().dofs_per_hex,
ExcIndexRange (i, 0, this->get_fe().dofs_per_hex));
+ // for hexes in 3d, we only have to
+ // take care of the offset, no
+ // linked lists or whatever (see
+ // hp::DoFLevels)
const unsigned int offset = this->dof_handler->levels[this->present_level]
->dof_hex_index_offset[this->present_index];
Assert (offset != this->dof_handler->invalid_dof_index,
}
+
template <>
inline
void
DoFObjectAccessor<3, hp::DoFHandler<3> >::set_dof_index (const unsigned int i,
- const unsigned int index) const
+ const unsigned int index) const
{
typedef DoFAccessor<hp::DoFHandler<3> > BaseClass;
Assert (i<this->get_fe().dofs_per_hex,
ExcIndexRange (i, 0, this->get_fe().dofs_per_hex));
+ // for hexes in 3d, we only have to
+ // take care of the offset, no
+ // linked lists or whatever (see
+ // hp::DoFLevels)
const unsigned int offset = this->dof_handler->levels[this->present_level]
->dof_hex_index_offset[this->present_index];
Assert (offset != this->dof_handler->invalid_dof_index,