unsigned int
DoFObjectAccessor<1,DH>::dof_index (const unsigned int i) const
{
- // since the exception classes are
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
+
+ // since the exception classes are
// from a template dependent base
// class, we have to fully qualify
// them. to work around more
inline
unsigned int
DoFObjectAccessor<1,DH>::vertex_dof_index (const unsigned int vertex,
- const unsigned int i) const
+ const unsigned int i) const
{
- // since the exception classes are
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
+
+ // since the exception classes are
// from a template dependent base
// class, we have to fully qualify
// them. to work around more
void
DoFObjectAccessor<1,DH>::get_dof_indices (std::vector<unsigned int> &dof_indices) const
{
- // since the exception classes are
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
+
+ // since the exception classes are
// from a template dependent base
// class, we have to fully qualify
// them. to work around more
TriaIterator<DH::dimension,DoFObjectAccessor<1,DH> >
DoFObjectAccessor<1,DH>::child (const unsigned int i) const
{
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
+
TriaIterator<dim,DoFObjectAccessor<1,DH> > q (this->tria,
this->present_level+1,
this->child_index (i),
typename BaseClass::ExcInvalidObject());
Assert (i<this->get_fe().dofs_per_quad,
ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
return this->dof_handler->levels[this->present_level]
->quad_dofs[this->present_index*this->get_fe().dofs_per_quad+i];
Assert (vertex<4, ExcIndexRange (i,0,4));
Assert (i<this->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
const unsigned int dof_number = (this->vertex_index(vertex) *
this->get_fe().dofs_per_vertex +
4*this->get_fe().dofs_per_vertex),
typename BaseClass::ExcNotActive());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
dofs_per_line = this->get_fe().dofs_per_line,
DoFObjectAccessor<2,DH>::line (const unsigned int i) const
{
Assert (i<4, ExcIndexRange (i, 0, 4));
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
return TriaIterator<dim,DoFObjectAccessor<1,DH> >
(
}
+
template <class DH>
inline
TriaIterator<DH::dimension,DoFObjectAccessor<2,DH> >
DoFObjectAccessor<2,DH>::child (const unsigned int i) const
{
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
+
TriaIterator<dim,DoFObjectAccessor<2,DH> > q (this->tria,
this->present_level+1,
this->child_index (i),
}
+
template <class DH>
inline
const FiniteElement<DH::dimension> &
}
+
template <class DH>
inline
unsigned int
}
+
template <class DH>
inline
void
Assert (this->dof_handler->n_dofs() == global_destination.size(),
typename BaseClass::ExcVectorDoesNotMatch());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
+
const unsigned int n_dofs = local_source.size();
//TODO[WB]: This function could me made more efficient. First, it allocates memory, which could be avoided by passing in another argument as a scratch array. second, the elementwise access is really slow if we use PETSc vectors/matrices. This should be fixed eventually
typename BaseClass::ExcMatrixDoesNotMatch());
Assert (global_destination.m() == global_destination.n(),
typename BaseClass::ExcMatrixDoesNotMatch());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
const unsigned int n_dofs = local_source.m();
typename BaseClass::ExcInvalidObject());
Assert (i<this->get_fe().dofs_per_hex,
ExcIndexRange (i, 0, this->get_fe().dofs_per_hex));
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
return this->dof_handler->levels[this->present_level]
->hex_dofs[this->present_index*this->get_fe().dofs_per_hex+i];
}
+
template <class DH>
inline
unsigned int
Assert (vertex<8, ExcIndexRange (i,0,8));
Assert (i<this->get_fe().dofs_per_vertex,
ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
const unsigned int dof_number = (this->vertex_index(vertex) *
this->get_fe().dofs_per_vertex +
6*this->get_fe().dofs_per_quad +
this->get_fe().dofs_per_hex),
typename BaseClass::ExcVectorDoesNotMatch());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
// this function really only makes
// sense on non-active objects if
(this->get_fe().dofs_per_cell ==
8*this->get_fe().dofs_per_vertex),
typename BaseClass::ExcNotActive());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
dofs_per_line = this->get_fe().dofs_per_line,
typename BaseClass::ExcVectorDoesNotMatch());
Assert (this->dof_handler->n_dofs() == global_destination.size(),
typename BaseClass::ExcVectorDoesNotMatch());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
const unsigned int n_dofs = local_source.size();
typename BaseClass::ExcMatrixDoesNotMatch());
Assert (global_destination.m() == global_destination.n(),
typename BaseClass::ExcMatrixDoesNotMatch());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
const unsigned int n_dofs = local_source.m();
typedef DoFAccessor<hp::DoFHandler<1> > BaseClass;
Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
Assert (&this->get_fe() != 0, BaseClass::ExcInvalidObject());
typedef DoFAccessor<hp::DoFHandler<2> > BaseClass;
Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
Assert (&this->get_fe() != 0, BaseClass::ExcInvalidObject());
typedef DoFAccessor<hp::DoFHandler<3> > BaseClass;
Assert (this->dof_handler != 0, BaseClass::ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
Assert (&this->get_fe() != 0, BaseClass::ExcInvalidObject());
Assert (this->dof_handler != 0,
BaseClass::ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
Assert (&this->get_fe() != 0,
Assert (this->dof_handler != 0,
BaseClass::ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
Assert (&this->get_fe() != 0,
Assert (this->dof_handler != 0,
BaseClass::ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
Assert (&this->get_fe() != 0,
unsigned int
DoFObjectAccessor<1,hp::DoFHandler<1> >::active_fe_index () const
{
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
unsigned int
DoFObjectAccessor<1,hp::DoFHandler<2> >::active_fe_index () const
{
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
unsigned int
DoFObjectAccessor<1,hp::DoFHandler<3> >::active_fe_index () const
{
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
DoFObjectAccessor<1,hp::DoFHandler<1> >::set_active_fe_index (const unsigned int i)
{
Assert (dof_handler != 0, ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
DoFObjectAccessor<1,hp::DoFHandler<2> >::set_active_fe_index (const unsigned int i)
{
Assert (dof_handler != 0, ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
DoFObjectAccessor<1,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i)
{
Assert (dof_handler != 0, ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
Assert (this->dof_handler != 0,
BaseClass::ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
Assert (&this->get_fe() != 0,
Assert (this->dof_handler != 0,
BaseClass::ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
Assert (&this->get_fe() != 0,
Assert (this->dof_handler != 0,
BaseClass::ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
Assert (&this->get_fe() != 0,
Assert (this->dof_handler != 0,
BaseClass::ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
Assert (&this->get_fe() != 0,
unsigned int
DoFObjectAccessor<2,hp::DoFHandler<2> >::active_fe_index () const
{
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
unsigned int
DoFObjectAccessor<2,hp::DoFHandler<3> >::active_fe_index () const
{
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
DoFObjectAccessor<2,hp::DoFHandler<2> >::set_active_fe_index (const unsigned int i)
{
Assert (dof_handler != 0, ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
DoFObjectAccessor<2,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i)
{
Assert (dof_handler != 0, ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
Assert (this->dof_handler != 0,
BaseClass::ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
Assert (&this->get_fe() != 0,
Assert (this->dof_handler != 0,
BaseClass::ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
Assert (&this->get_fe() != 0,
}
+
template <>
inline
unsigned int
DoFObjectAccessor<3,hp::DoFHandler<3> >::active_fe_index () const
{
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
DoFObjectAccessor<3,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i)
{
Assert (dof_handler != 0, ExcInvalidObject());
+ Assert (static_cast<unsigned int>(this->present_level) < dof_handler->levels.size(),
+ ExcMessage ("hp::DoFHandler not initialized"));
Assert (static_cast<std::vector<unsigned int>::size_type>(this->present_index) <
dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,