-template <class DH>
-inline
-const FiniteElement<DH::dimension> &
-DoFObjectAccessor<1,DH>::get_fe () const
-{
- return *this->dof_handler->selected_fe;
-}
-
-
-
-template <class DH>
-inline
-unsigned int
-DoFObjectAccessor<1,DH>::active_fe_index () const
-{
- return 0;
-}
-
-
-
-template <class DH>
-inline
-void
-DoFObjectAccessor<1,DH>::set_active_fe_index (const unsigned int i)
-{
- typedef DoFAccessor<DH> BaseClass;
- Assert (i == 0, typename BaseClass::ExcInvalidObject());
-}
-
-
-
template <class DH>
inline
void
-template <class DH>
-inline
-const FiniteElement<DH::dimension> &
-DoFObjectAccessor<2,DH>::get_fe () const
-{
- return *this->dof_handler->selected_fe;
-}
-
-
-
-template <class DH>
-inline
-unsigned int
-DoFObjectAccessor<2,DH>::active_fe_index () const
-{
- return 0;
-}
-
-
-
-template <class DH>
-inline
-void
-DoFObjectAccessor<2,DH>::set_active_fe_index (const unsigned int i)
-{
- typedef DoFAccessor<DH> BaseClass;
- Assert (i == 0, typename BaseClass::ExcInvalidObject());
-}
-
-
-
template <class DH>
inline
void
}
-template <class DH>
-inline
-const FiniteElement<DH::dimension> &
-DoFObjectAccessor<3,DH>::get_fe () const
-{
- return *this->dof_handler->selected_fe;
-}
-
-
-
-template <class DH>
-inline
-unsigned int
-DoFObjectAccessor<3,DH>::active_fe_index () const
-{
- return 0;
-}
-
-
-
-template <class DH>
-inline
-void
-DoFObjectAccessor<3,DH>::set_active_fe_index (const unsigned int i)
-{
- typedef DoFAccessor<DH> BaseClass;
- Assert (i == 0, typename BaseClass::ExcInvalidObject());
-}
-
-
-
template <class DH>
void DoFObjectAccessor<3,DH>::copy_from (const DoFObjectAccessor<3,DH> &a)
{
Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_line,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
+ Assert (i<this->dof_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->get_fe().dofs_per_line+i];
+ ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i];
}
ExcMessage ("DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
- Assert (i<this->get_fe().dofs_per_vertex,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+ Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
const unsigned int dof_number = (this->vertex_index(vertex) *
- this->get_fe().dofs_per_vertex +
+ this->dof_handler->get_fe().dofs_per_vertex +
i);
return this->dof_handler->vertex_dofs[dof_number];
}
ExcMessage ("DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
- Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex +
- this->get_fe().dofs_per_line),
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<1> >::ExcInvalidObject());
+ Assert (dof_indices.size() == (2*this->dof_handler->get_fe().dofs_per_vertex +
+ this->dof_handler->get_fe().dofs_per_line),
DoFAccessor<DoFHandler<1> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->get_fe().dofs_per_cell ==
- 2*this->get_fe().dofs_per_vertex),
+ (this->dof_handler->get_fe().dofs_per_cell ==
+ 2*this->dof_handler->get_fe().dofs_per_vertex),
DoFAccessor<DoFHandler<1> >::ExcNotActive());
- const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
- dofs_per_line = this->get_fe().dofs_per_line;
+ 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<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_line,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+ Assert (i<this->dof_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->get_fe().dofs_per_line+i];
+ ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i];
}
ExcMessage ("DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
- Assert (i<this->get_fe().dofs_per_vertex,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+ Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
const unsigned int dof_number = (this->vertex_index(vertex) *
- this->get_fe().dofs_per_vertex +
+ this->dof_handler->get_fe().dofs_per_vertex +
i);
return this->dof_handler->vertex_dofs[dof_number];
}
ExcMessage ("DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
- Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex +
- this->get_fe().dofs_per_line),
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
+ Assert (dof_indices.size() == (2*this->dof_handler->get_fe().dofs_per_vertex +
+ this->dof_handler->get_fe().dofs_per_line),
DoFAccessor<DoFHandler<2> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->get_fe().dofs_per_cell ==
- 2*this->get_fe().dofs_per_vertex),
+ (this->dof_handler->get_fe().dofs_per_cell ==
+ 2*this->dof_handler->get_fe().dofs_per_vertex),
DoFAccessor<DoFHandler<2> >::ExcNotActive());
- const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
- dofs_per_line = this->get_fe().dofs_per_line;
+ 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<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_line,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+ Assert (i<this->dof_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->get_fe().dofs_per_line+i];
+ ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i];
}
ExcMessage ("DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
- Assert (i<this->get_fe().dofs_per_vertex,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+ Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
const unsigned int dof_number = (this->vertex_index(vertex) *
- this->get_fe().dofs_per_vertex +
+ this->dof_handler->get_fe().dofs_per_vertex +
i);
return this->dof_handler->vertex_dofs[dof_number];
}
ExcMessage ("DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
- Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex +
- this->get_fe().dofs_per_line),
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
+ Assert (dof_indices.size() == (2*this->dof_handler->get_fe().dofs_per_vertex +
+ this->dof_handler->get_fe().dofs_per_line),
DoFAccessor<DoFHandler<3> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->get_fe().dofs_per_cell ==
- 2*this->get_fe().dofs_per_vertex),
+ (this->dof_handler->get_fe().dofs_per_cell ==
+ 2*this->dof_handler->get_fe().dofs_per_vertex),
DoFAccessor<DoFHandler<3> >::ExcNotActive());
- const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
- dofs_per_line = this->get_fe().dofs_per_line;
+ 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<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_quad,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+ Assert (i<this->dof_handler->get_fe().dofs_per_quad,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_quad));
Assert (static_cast<unsigned int>(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];
+ ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i];
}
{
Assert (this->dof_handler != 0,
DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
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 (i<this->dof_handler->get_fe().dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
Assert (static_cast<unsigned int>(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 +
+ this->dof_handler->get_fe().dofs_per_vertex +
i);
return this->dof_handler->vertex_dofs[dof_number];
}
{
Assert (this->dof_handler != 0,
DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<DoFHandler<2> >::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),
+ 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),
DoFAccessor<DoFHandler<2> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->get_fe().dofs_per_cell ==
- 4*this->get_fe().dofs_per_vertex),
+ (this->dof_handler->get_fe().dofs_per_cell ==
+ 4*this->dof_handler->get_fe().dofs_per_vertex),
DoFAccessor<DoFHandler<2> >::ExcNotActive());
Assert (static_cast<unsigned int>(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;
+ 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<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<4; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_quad,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+ Assert (i<this->dof_handler->get_fe().dofs_per_quad,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_quad));
Assert (static_cast<unsigned int>(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];
+ ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i];
}
{
Assert (this->dof_handler != 0,
DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
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 (i<this->dof_handler->get_fe().dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
Assert (static_cast<unsigned int>(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 +
+ this->dof_handler->get_fe().dofs_per_vertex +
i);
return this->dof_handler->vertex_dofs[dof_number];
}
{
Assert (this->dof_handler != 0,
DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<DoFHandler<3> >::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),
+ 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),
DoFAccessor<DoFHandler<3> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->get_fe().dofs_per_cell ==
- 4*this->get_fe().dofs_per_vertex),
+ (this->dof_handler->get_fe().dofs_per_cell ==
+ 4*this->dof_handler->get_fe().dofs_per_vertex),
DoFAccessor<DoFHandler<3> >::ExcNotActive());
Assert (static_cast<unsigned int>(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;
+ 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<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<4; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_hex,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_hex));
+ Assert (i<this->dof_handler->get_fe().dofs_per_hex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_hex));
Assert (static_cast<unsigned int>(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];
+ ->hex_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_hex+i];
}
{
Assert (this->dof_handler != 0,
DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
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 (i<this->dof_handler->get_fe().dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
Assert (static_cast<unsigned int>(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 +
+ this->dof_handler->get_fe().dofs_per_vertex +
i);
return this->dof_handler->vertex_dofs[dof_number];
}
{
Assert (this->dof_handler != 0,
DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<DoFHandler<3> >::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),
+ 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),
DoFAccessor<DoFHandler<3> >::ExcVectorDoesNotMatch());
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->get_fe().dofs_per_cell ==
- 8*this->get_fe().dofs_per_vertex),
+ (this->dof_handler->get_fe().dofs_per_cell ==
+ 8*this->dof_handler->get_fe().dofs_per_vertex),
DoFAccessor<DoFHandler<3> >::ExcNotActive());
Assert (static_cast<unsigned int>(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;
+ 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<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<8; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
ExcMessage ("hp::DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
- Assert (i<this->get_fe().dofs_per_vertex,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_vertex));
const unsigned int dof_number = (this->vertex_index(vertex) *
- this->get_fe().dofs_per_vertex +
+ this->dof_handler->get_fe()[0].dofs_per_vertex +
i);
return this->dof_handler->vertex_dofs[dof_number];
}
ExcMessage ("hp::DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
- Assert (i<this->get_fe().dofs_per_vertex,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_vertex));
const unsigned int dof_number = (this->vertex_index(vertex) *
- this->get_fe().dofs_per_vertex +
+ this->dof_handler->get_fe()[0].dofs_per_vertex +
i);
return this->dof_handler->vertex_dofs[dof_number];
}
ExcMessage ("hp::DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
- Assert (i<this->get_fe().dofs_per_vertex,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_vertex));
const unsigned int dof_number = (this->vertex_index(vertex) *
- this->get_fe().dofs_per_vertex +
+ this->dof_handler->get_fe()[0].dofs_per_vertex +
i);
return this->dof_handler->vertex_dofs[dof_number];
}
{
Assert (this->dof_handler != 0,
DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
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 (i<this->dof_handler->get_fe()[0].dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_vertex));
Assert (static_cast<unsigned int>(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 +
+ this->dof_handler->get_fe()[0].dofs_per_vertex +
i);
return this->dof_handler->vertex_dofs[dof_number];
}
{
Assert (this->dof_handler != 0,
DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
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 (i<this->dof_handler->get_fe()[0].dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_vertex));
Assert (static_cast<unsigned int>(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 +
+ this->dof_handler->get_fe()[0].dofs_per_vertex +
i);
return this->dof_handler->vertex_dofs[dof_number];
}
{
Assert (this->dof_handler != 0,
DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
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 (i<this->dof_handler->get_fe()[0].dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_vertex));
Assert (static_cast<unsigned int>(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 +
+ this->dof_handler->get_fe()[0].dofs_per_vertex +
i);
return this->dof_handler->vertex_dofs[dof_number];
}
ExcMessage ("DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0, BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_line,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+ Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_line,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_line));
// for lines in 1d, we only have to
// take care of the offset, no
ExcMessage ("DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
- Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex +
- this->get_fe().dofs_per_line),
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<1> >::ExcInvalidObject());
+ Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[0].dofs_per_vertex +
+ this->dof_handler->get_fe()[0].dofs_per_line),
DoFAccessor<hp::DoFHandler<1> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->get_fe().dofs_per_cell ==
- 2*this->get_fe().dofs_per_vertex),
+ (this->dof_handler->get_fe()[0].dofs_per_cell ==
+ 2*this->dof_handler->get_fe()[0].dofs_per_vertex),
DoFAccessor<hp::DoFHandler<1> >::ExcNotActive());
- const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
- dofs_per_line = this->get_fe().dofs_per_line;
+ const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
+ dofs_per_line = this->dof_handler->get_fe()[0].dofs_per_line;
std::vector<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
ExcMessage ("DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0, BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_line,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+ Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_line,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_line));
const unsigned int offset = this->dof_handler->levels[this->present_level]
->dof_line_index_offset[this->present_index];
ExcMessage ("DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
- Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex +
- this->get_fe().dofs_per_line),
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
+ Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[0].dofs_per_vertex +
+ this->dof_handler->get_fe()[0].dofs_per_line),
DoFAccessor<hp::DoFHandler<2> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->get_fe().dofs_per_cell ==
- 2*this->get_fe().dofs_per_vertex),
+ (this->dof_handler->get_fe()[0].dofs_per_cell ==
+ 2*this->dof_handler->get_fe()[0].dofs_per_vertex),
DoFAccessor<hp::DoFHandler<2> >::ExcNotActive());
- const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
- dofs_per_line = this->get_fe().dofs_per_line;
+ const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
+ dofs_per_line = this->dof_handler->get_fe()[0].dofs_per_line;
std::vector<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
ExcMessage ("DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0, BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_line,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+ Assert (&this->dof_handler->get_fe() != 0, BaseClass::ExcInvalidObject());
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_line,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_line));
const unsigned int offset = this->dof_handler->levels[this->present_level]
->dof_line_index_offset[this->present_index];
ExcMessage ("DoFHandler not initialized"));
Assert (this->dof_handler != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
- Assert (dof_indices.size() == (2*this->get_fe().dofs_per_vertex +
- this->get_fe().dofs_per_line),
+ Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
+ Assert (dof_indices.size() == (2*this->dof_handler->get_fe()[0].dofs_per_vertex +
+ this->dof_handler->get_fe()[0].dofs_per_line),
DoFAccessor<hp::DoFHandler<3> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->get_fe().dofs_per_cell ==
- 2*this->get_fe().dofs_per_vertex),
+ (this->dof_handler->get_fe()[0].dofs_per_cell ==
+ 2*this->dof_handler->get_fe()[0].dofs_per_vertex),
DoFAccessor<hp::DoFHandler<3> >::ExcNotActive());
- const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
- dofs_per_line = this->get_fe().dofs_per_line;
+ const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
+ dofs_per_line = this->dof_handler->get_fe()[0].dofs_per_line;
std::vector<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
ExcMessage ("DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_line,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_line,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_line));
// for lines in 1d, we only have to
// take care of the offset, no
ExcMessage ("DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_line,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_line,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_line));
//TODO:[?] In two dimension it could happen that we have different active_fe_indices
// on a line between to cells. Hence we have to differentiate between these two cases.
ExcMessage ("DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_line,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_line,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_line));
const unsigned int offset = this->dof_handler->levels[this->present_level]
->dof_line_index_offset[this->present_index];
-template <>
-inline
-const FiniteElement<1> &
-DoFObjectAccessor<1,hp::DoFHandler<1> >::get_fe () const
-{
- return (*dof_handler->finite_elements)[active_fe_index ()];
-}
-
-
-
-template <>
-inline
-const FiniteElement<2> &
-DoFObjectAccessor<1,hp::DoFHandler<2> >::get_fe () const
-{
- 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
-const FiniteElement<3> &
-DoFObjectAccessor<1,hp::DoFHandler<3> >::get_fe () const
-{
- 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
-DoFObjectAccessor<1,hp::DoFHandler<1> >::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];
-}
-
-
-
-template <>
-inline
-unsigned int
-DoFObjectAccessor<1,hp::DoFHandler<2> >::active_fe_index () const
-{
- Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
- "associated with active_fe_indices and corresponding "
- "finite element objects"));
- return 0;
-}
-
-
-
-template <>
-inline
-unsigned int
-DoFObjectAccessor<1,hp::DoFHandler<3> >::active_fe_index () const
-{
- 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<1> >::set_active_fe_index (const unsigned int i)
-{
- 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;
-}
-
-
-
-template <>
-inline
-void
-DoFObjectAccessor<1,hp::DoFHandler<2> >::set_active_fe_index (const unsigned int)
-{
- 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)
-{
- Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
- "associated with active_fe_indices and corresponding "
- "finite element objects"));
-}
-
-
/*------------- Functions: DoFObjectAccessor<2,hp::DoFHandler> -------------*/
template <>
ExcMessage ("DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_quad,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_quad,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_quad));
// for quads in 2d, we only have to
// take care of the offset, no
ExcMessage ("DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_quad,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_quad,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_quad));
const unsigned int offset = this->dof_handler->levels[this->present_level]
->dof_quad_index_offset[this->present_index];
ExcMessage ("DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_quad,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_quad,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_quad));
// for quads in 2d, we only have to
// take care of the offset, no
ExcMessage ("DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_quad,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_quad,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_quad));
const unsigned int offset = this->dof_handler->levels[this->present_level]
->dof_quad_index_offset[this->present_index];
{
Assert (this->dof_handler != 0,
DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<hp::DoFHandler<2> >::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),
+ Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[0].dofs_per_vertex +
+ 4*this->dof_handler->get_fe()[0].dofs_per_line +
+ this->dof_handler->get_fe()[0].dofs_per_quad),
DoFAccessor<hp::DoFHandler<2> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->get_fe().dofs_per_cell ==
- 4*this->get_fe().dofs_per_vertex),
+ (this->dof_handler->get_fe()[0].dofs_per_cell ==
+ 4*this->dof_handler->get_fe()[0].dofs_per_vertex),
DoFAccessor<hp::DoFHandler<2> >::ExcNotActive());
Assert (static_cast<unsigned int>(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;
+ const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
+ dofs_per_line = this->dof_handler->get_fe()[0].dofs_per_line,
+ dofs_per_quad = this->dof_handler->get_fe()[0].dofs_per_quad;
std::vector<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<4; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
{
Assert (this->dof_handler != 0,
DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<hp::DoFHandler<3> >::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),
+ Assert (dof_indices.size() == (4*this->dof_handler->get_fe()[0].dofs_per_vertex +
+ 4*this->dof_handler->get_fe()[0].dofs_per_line +
+ this->dof_handler->get_fe()[0].dofs_per_quad),
DoFAccessor<hp::DoFHandler<3> >::ExcVectorDoesNotMatch());
// this function really only makes
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->get_fe().dofs_per_cell ==
- 4*this->get_fe().dofs_per_vertex),
+ (this->dof_handler->get_fe()[0].dofs_per_cell ==
+ 4*this->dof_handler->get_fe()[0].dofs_per_vertex),
DoFAccessor<hp::DoFHandler<3> >::ExcNotActive());
Assert (static_cast<unsigned int>(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;
+ const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
+ dofs_per_line = this->dof_handler->get_fe()[0].dofs_per_line,
+ dofs_per_quad = this->dof_handler->get_fe()[0].dofs_per_quad;
std::vector<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<4; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
-template <>
-inline
-const FiniteElement<2> &
-DoFObjectAccessor<2,hp::DoFHandler<2> >::get_fe () const
-{
- return (*dof_handler->finite_elements)[active_fe_index ()];
-}
-
-
-
-template <>
-inline
-const FiniteElement<3> &
-DoFObjectAccessor<2,hp::DoFHandler<3> >::get_fe () const
-{
- 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
-DoFObjectAccessor<2,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];
-}
-
-
-
-
-template <>
-inline
-unsigned int
-DoFObjectAccessor<2,hp::DoFHandler<3> >::active_fe_index () const
-{
- 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<2,hp::DoFHandler<2> >::set_active_fe_index (const unsigned int i)
-{
- 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<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;
-}
-
-
-
-template <>
-inline
-void
-DoFObjectAccessor<2,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int)
-{
- Assert (false, ExcMessage ("Only cells, not lower-dimensional objects, are "
- "associated with active_fe_indices and corresponding "
- "finite element objects"));
-}
/*------------- Functions: DoFObjectAccessor<3,hp::DoFHandler> -------------*/
ExcMessage ("DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_hex,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_hex));
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_hex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_hex));
// for hexes in 3d, we only have to
// take care of the offset, no
ExcMessage ("DoFHandler not initialized"));
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_hex,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_hex));
+ Assert (i<this->dof_handler->get_fe()[0].dofs_per_hex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe()[0].dofs_per_hex));
// for hexes in 3d, we only have to
// take care of the offset, no
{
Assert (this->dof_handler != 0,
DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
DoFAccessor<hp::DoFHandler<3> >::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),
+ Assert (dof_indices.size() == (8*this->dof_handler->get_fe()[0].dofs_per_vertex +
+ 12*this->dof_handler->get_fe()[0].dofs_per_line +
+ 6*this->dof_handler->get_fe()[0].dofs_per_quad +
+ this->dof_handler->get_fe()[0].dofs_per_hex),
DoFAccessor<hp::DoFHandler<3> >::ExcVectorDoesNotMatch());
Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
ExcMessage ("DoFHandler not initialized"));
// not allocated for this
// non-active thing
Assert (!this->has_children() ||
- (this->get_fe().dofs_per_cell ==
- 8*this->get_fe().dofs_per_vertex),
+ (this->dof_handler->get_fe()[0].dofs_per_cell ==
+ 8*this->dof_handler->get_fe()[0].dofs_per_vertex),
DoFAccessor<hp::DoFHandler<3> >::ExcNotActive());
Assert (static_cast<unsigned int>(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;
+ const unsigned int dofs_per_vertex = this->dof_handler->get_fe()[0].dofs_per_vertex,
+ dofs_per_line = this->dof_handler->get_fe()[0].dofs_per_line,
+ dofs_per_quad = this->dof_handler->get_fe()[0].dofs_per_quad,
+ dofs_per_hex = this->dof_handler->get_fe()[0].dofs_per_hex;
std::vector<unsigned int>::iterator next = dof_indices.begin();
for (unsigned int vertex=0; vertex<8; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
-template <>
-inline
-const FiniteElement<3> &
-DoFObjectAccessor<3,hp::DoFHandler<3> >::get_fe () const
-{
- return (*dof_handler->finite_elements)[active_fe_index ()];
-}
-
-
-
-template <>
-inline
-unsigned int
-DoFObjectAccessor<3,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];
-}
-
-
-
-template <>
-inline
-void
-DoFObjectAccessor<3,hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i)
-{
- 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;
-}
-
-
/*------------------------- Functions: DoFCellAccessor -----------------------*/
+template <class DH>
+inline
+const FiniteElement<DH::dimension> &
+DoFCellAccessor<DH>::get_fe () const
+{
+ return this->dof_handler->get_fe();
+}
+
+
+
+template <class DH>
+inline
+unsigned int
+DoFCellAccessor<DH>::active_fe_index () const
+{
+ return 0;
+}
+
+
+
+template <class DH>
+inline
+void
+DoFCellAccessor<DH>::set_active_fe_index (const unsigned int i)
+{
+ Assert (i == 0, typename DoFAccessor<DH>::ExcInvalidObject());
+}
+
+
+
+
+
+template <>
+inline
+const FiniteElement<1> &
+DoFCellAccessor<hp::DoFHandler<1> >::get_fe () const
+{
+ return this->dof_handler->get_fe()[active_fe_index ()];
+}
+
+
+
+template <>
+inline
+const FiniteElement<2> &
+DoFCellAccessor<hp::DoFHandler<2> >::get_fe () const
+{
+ return this->dof_handler->get_fe()[active_fe_index ()];
+}
+
+
+
+template <>
+inline
+const FiniteElement<3> &
+DoFCellAccessor<hp::DoFHandler<3> >::get_fe () const
+{
+ return this->dof_handler->get_fe()[active_fe_index ()];
+}
+
+
+
+template <>
+inline
+unsigned int
+DoFCellAccessor<hp::DoFHandler<1> >::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];
+}
+
+
+
+template <>
+inline
+unsigned int
+DoFCellAccessor<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];
+}
+
+
+
+template <>
+inline
+unsigned int
+DoFCellAccessor<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];
+}
+
+
+
+template <>
+inline
+void
+DoFCellAccessor<hp::DoFHandler<1> >::set_active_fe_index (const unsigned int i)
+{
+ Assert (this->dof_handler != 0,
+ DoFAccessor<hp::DoFHandler<1> >::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->get_fe().size (),
+ ExcIndexRange(i, 0, this->dof_handler->get_fe().size ()));
+ this->dof_handler->levels[this->present_level]
+ ->active_fe_indices[this->present_index] = i;
+}
+
+
+
+template <>
+inline
+void
+DoFCellAccessor<hp::DoFHandler<2> >::set_active_fe_index (const unsigned int i)
+{
+ Assert (this->dof_handler != 0,
+ DoFAccessor<hp::DoFHandler<2> >::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->get_fe().size (),
+ ExcIndexRange(i, 0, this->dof_handler->get_fe().size ()));
+ this->dof_handler->levels[this->present_level]
+ ->active_fe_indices[this->present_index] = i;
+}
+
+
+
+template <>
+inline
+void
+DoFCellAccessor<hp::DoFHandler<3> >::set_active_fe_index (const unsigned int i)
+{
+ Assert (this->dof_handler != 0,
+ DoFAccessor<hp::DoFHandler<3> >::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->get_fe().size (),
+ ExcIndexRange(i, 0, this->dof_handler->get_fe().size ()));
+ this->dof_handler->levels[this->present_level]
+ ->active_fe_indices[this->present_index] = i;
+}
+
+
+
template <>
inline
void
typename BaseClass::ExcInvalidObject());
Assert (&this->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
- Assert (local_source.size() == (2*this->get_fe().dofs_per_vertex +
- this->get_fe().dofs_per_line),
+ Assert (local_source.size() == this->get_fe().dofs_per_cell,
typename BaseClass::ExcVectorDoesNotMatch());
Assert (this->dof_handler->n_dofs() == global_destination.size(),
typename BaseClass::ExcVectorDoesNotMatch());
typename BaseClass::ExcInvalidObject());
Assert (&this->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
- Assert (local_source.m() == (2*this->get_fe().dofs_per_vertex +
- this->get_fe().dofs_per_line),
+ Assert (local_source.m() == this->get_fe().dofs_per_cell,
typename BaseClass::ExcVectorDoesNotMatch());
Assert (local_source.m() == local_source.n(),
typename BaseClass::ExcMatrixDoesNotMatch());
template <class DH>
void DoFObjectAccessor<1, DH>::set_dof_index (const unsigned int i,
- const unsigned int index) const
+ const unsigned int index) const
{
typedef DoFAccessor<DH> BaseClass;
typename BaseClass::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_line,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_line));
+ Assert (i<this->dof_handler->get_fe().dofs_per_line,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line));
this->dof_handler->levels[this->present_level]
- ->line_dofs[this->present_index*this->get_fe().dofs_per_line+i] = index;
+ ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i]
+ = index;
}
+
+
template <class DH>
void DoFObjectAccessor<1, DH>::set_vertex_dof_index (const unsigned int vertex,
- const unsigned int i,
- const unsigned int index) const
+ const unsigned int i,
+ const unsigned int index) const
{
// since the exception classes are
Assert (this->dof_handler != 0,
typename BaseClass::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
Assert (vertex<2, ExcIndexRange (i,0,2));
- Assert (i<this->get_fe().dofs_per_vertex,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_vertex));
+ Assert (i<this->dof_handler->get_fe().dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
const unsigned int dof_number = (this->vertex_index(vertex) *
- this->get_fe().dofs_per_vertex +
+ this->dof_handler->get_fe().dofs_per_vertex +
i);
this->dof_handler->vertex_dofs[dof_number] = index;
}
template <class InputVector, typename number>
void
DoFObjectAccessor<1,DH>::get_dof_values (const InputVector &values,
- Vector<number> &local_values) const
+ Vector<number> &local_values) const
{
typedef DoFAccessor<DH> BaseClass;
Assert (dim==1, ExcInternalError());
Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
- Assert (local_values.size() == this->get_fe().dofs_per_cell,
+ Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
typename BaseClass::ExcVectorDoesNotMatch());
Assert (values.size() == this->dof_handler->n_dofs(),
typename BaseClass::ExcVectorDoesNotMatch());
Assert (this->has_children() == false,
typename BaseClass::ExcNotActive());
- const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
- dofs_per_line = this->get_fe().dofs_per_line;
+ 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;
typename Vector<number>::iterator next_local_value=local_values.begin();
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
template <class OutputVector, typename number>
void
DoFObjectAccessor<1,DH>::set_dof_values (const Vector<number> &local_values,
- OutputVector &values) const
+ OutputVector &values) const
{
typedef DoFAccessor<DH> BaseClass;
Assert (dim==1, ExcInternalError());
Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
- Assert (local_values.size() == this->get_fe().dofs_per_cell,
+ Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
typename BaseClass::ExcVectorDoesNotMatch());
Assert (values.size() == this->dof_handler->n_dofs(),
typename BaseClass::ExcVectorDoesNotMatch());
Assert (this->has_children() == false,
typename BaseClass::ExcNotActive());
- const unsigned int dofs_per_vertex = this->get_fe().dofs_per_vertex,
- dofs_per_line = this->get_fe().dofs_per_line;
+ 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;
typename Vector<number>::const_iterator next_local_value=local_values.begin();
for (unsigned int vertex=0; vertex<2; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
}
+
/*------------------------- Functions: DoFObjectAccessor<2,dim> -----------------------*/
template <class DH>
void DoFObjectAccessor<2, DH>::set_dof_index (const unsigned int i,
- const unsigned int index) const
+ const unsigned int index) const
{
typedef DoFAccessor<DH> BaseClass;
typename BaseClass::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_quad,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_quad));
+ Assert (i<this->dof_handler->get_fe().dofs_per_quad,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_quad));
this->dof_handler->levels[this->present_level]
- ->quad_dofs[this->present_index*this->get_fe().dofs_per_quad+i] = index;
+ ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i] = index;
}
template <class DH>
void
DoFObjectAccessor<2, DH>::set_vertex_dof_index (const unsigned int vertex,
- const unsigned int i,
- const unsigned int index) const
+ const unsigned int i,
+ const unsigned int index) const
{
typedef DoFAccessor<DH> BaseClass;
Assert (this->dof_handler != 0,
typename BaseClass::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
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 (i<this->dof_handler->get_fe().dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
const unsigned int dof_number = (this->vertex_index(vertex) *
- this->get_fe().dofs_per_vertex +
+ this->dof_handler->get_fe().dofs_per_vertex +
i);
this->dof_handler->vertex_dofs[dof_number] = index;
}
template <class InputVector, typename number>
void
DoFObjectAccessor<2,DH>::get_dof_values (const InputVector &values,
- Vector<number> &local_values) const
+ Vector<number> &local_values) const
{
typedef DoFAccessor<DH> BaseClass;
Assert (this->dof_handler != 0,
typename BaseClass::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
- Assert (local_values.size() == this->get_fe().dofs_per_cell,
+ Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
typename BaseClass::ExcVectorDoesNotMatch());
Assert (values.size() == this->dof_handler->n_dofs(),
typename BaseClass::ExcVectorDoesNotMatch());
Assert (this->has_children() == false,
typename BaseClass::ExcNotActive());
- 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;
+ 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;
typename Vector<number>::iterator next_local_value=local_values.begin();
for (unsigned int vertex=0; vertex<4; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
template <class OutputVector, typename number>
void
DoFObjectAccessor<2,DH>::set_dof_values (const Vector<number> &local_values,
- OutputVector &values) const
+ OutputVector &values) const
{
typedef DoFAccessor<DH> BaseClass;
Assert (this->dof_handler != 0,
typename BaseClass::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
- Assert (local_values.size() == this->get_fe().dofs_per_cell,
+ Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
typename BaseClass::ExcVectorDoesNotMatch());
Assert (values.size() == this->dof_handler->n_dofs(),
typename BaseClass::ExcVectorDoesNotMatch());
Assert (this->has_children() == false,
typename BaseClass::ExcNotActive());
- 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;
+ 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;
typename Vector<number>::const_iterator next_local_value=local_values.begin();
for (unsigned int vertex=0; vertex<4; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
template <class DH>
void DoFObjectAccessor<3, DH>::set_dof_index (const unsigned int i,
- const unsigned int index) const
+ const unsigned int index) const
{
typedef DoFAccessor<DH> BaseClass;
typename BaseClass::ExcInvalidObject());
// make sure a FE has been selected
// and enough room was reserved
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
- Assert (i<this->get_fe().dofs_per_hex,
- ExcIndexRange (i, 0, this->get_fe().dofs_per_hex));
+ Assert (i<this->dof_handler->get_fe().dofs_per_hex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_hex));
this->dof_handler->levels[this->present_level]
- ->hex_dofs[this->present_index*this->get_fe().dofs_per_hex+i] = index;
+ ->hex_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_hex+i] = index;
}
template <class DH>
void DoFObjectAccessor<3, DH>::set_vertex_dof_index (const unsigned int vertex,
- const unsigned int i,
- const unsigned int index) const
+ const unsigned int i,
+ const unsigned int index) const
{
typedef DoFAccessor<DH> BaseClass;
Assert (this->dof_handler != 0,
typename BaseClass::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
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 (i<this->dof_handler->get_fe().dofs_per_vertex,
+ ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex));
const unsigned int dof_number = (this->vertex_index(vertex) *
- this->get_fe().dofs_per_vertex +
+ this->dof_handler->get_fe().dofs_per_vertex +
i);
this->dof_handler->vertex_dofs[dof_number] = index;
}
template <class InputVector, typename number>
void
DoFObjectAccessor<3,DH>::get_dof_values (const InputVector &values,
- Vector<number> &local_values) const
+ Vector<number> &local_values) const
{
typedef DoFAccessor<DH> BaseClass;
Assert (this->dof_handler != 0,
typename BaseClass::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
- Assert (local_values.size() == this->get_fe().dofs_per_cell,
+ Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
typename BaseClass::ExcVectorDoesNotMatch());
Assert (values.size() == this->dof_handler->n_dofs(),
typename BaseClass::ExcVectorDoesNotMatch());
Assert (this->has_children() == false,
typename BaseClass::ExcNotActive());
- 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;
+ 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;
typename Vector<number>::iterator next_local_value = local_values.begin();
for (unsigned int vertex=0; vertex<GeometryInfo<3>::vertices_per_cell; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
template <class OutputVector, typename number>
void
DoFObjectAccessor<3,DH>::set_dof_values (const Vector<number> &local_values,
- OutputVector &values) const
+ OutputVector &values) const
{
typedef DoFAccessor<DH> BaseClass;
Assert (this->dof_handler != 0,
typename BaseClass::ExcInvalidObject());
- Assert (&this->get_fe() != 0,
+ Assert (&this->dof_handler->get_fe() != 0,
typename BaseClass::ExcInvalidObject());
- Assert (local_values.size() == this->get_fe().dofs_per_cell,
+ Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell,
typename BaseClass::ExcVectorDoesNotMatch());
Assert (values.size() == this->dof_handler->n_dofs(),
typename BaseClass::ExcVectorDoesNotMatch());
Assert (this->has_children() == false,
typename BaseClass::ExcNotActive());
- 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;
+ 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;
typename Vector<number>::const_iterator next_local_value=local_values.begin();
for (unsigned int vertex=0; vertex<GeometryInfo<dim>::vertices_per_cell; ++vertex)
for (unsigned int d=0; d<dofs_per_vertex; ++d)
}
+
+// --------------- hp::DoFHandler specializations for 1d objects -----------
+
+
+template <>
+void DoFObjectAccessor<1, hp::DoFHandler<1> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+ const unsigned int /*i*/,
+ const unsigned int /*index*/) const
+{
+ Assert (false, ExcInternalError());
+}
+
+template <>
+void DoFObjectAccessor<1, hp::DoFHandler<2> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+ const unsigned int /*i*/,
+ const unsigned int /*index*/) const
+{
+ Assert (false, ExcInternalError());
+}
+
+template <>
+void DoFObjectAccessor<1, hp::DoFHandler<3> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+ const unsigned int /*i*/,
+ const unsigned int /*index*/) const
+{
+ Assert (false, ExcInternalError());
+}
+
+
+template <>
+template <class InputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_values (const InputVector &/*values*/,
+ Vector<number> &/*local_values*/) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class InputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_values (const InputVector &/*values*/,
+ Vector<number> &/*local_values*/) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class InputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*values*/,
+ Vector<number> &/*local_values*/) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
+
+template <>
+template <class OutputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<1> >::set_dof_values (const Vector<number> &/*local_values*/,
+ OutputVector &/*values*/) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class OutputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<2> >::set_dof_values (const Vector<number> &/*local_values*/,
+ OutputVector &/*values*/) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class OutputVector, typename number>
+void
+DoFObjectAccessor<1,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/*local_values*/,
+ OutputVector &/*values*/) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
+
+
+
+// --------------- hp::DoFHandler specializations for 2d objects -----------
+
+
+template <>
+void DoFObjectAccessor<2, hp::DoFHandler<2> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+ const unsigned int /*i*/,
+ const unsigned int /*index*/) const
+{
+ Assert (false, ExcInternalError());
+}
+
+template <>
+void DoFObjectAccessor<2, hp::DoFHandler<3> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+ const unsigned int /*i*/,
+ const unsigned int /*index*/) const
+{
+ Assert (false, ExcInternalError());
+}
+
+
+template <>
+template <class InputVector, typename number>
+void
+DoFObjectAccessor<2,hp::DoFHandler<2> >::get_dof_values (const InputVector &/*values*/,
+ Vector<number> &/*local_values*/) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class InputVector, typename number>
+void
+DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*values*/,
+ Vector<number> &/*local_values*/) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
+
+template <>
+template <class OutputVector, typename number>
+void
+DoFObjectAccessor<2,hp::DoFHandler<2> >::set_dof_values (const Vector<number> &/*local_values*/,
+ OutputVector &/*values*/) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class OutputVector, typename number>
+void
+DoFObjectAccessor<2,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/*local_values*/,
+ OutputVector &/*values*/) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
+
+
+
+// --------------- hp::DoFHandler specializations for 3d objects -----------
+
+
+template <>
+void DoFObjectAccessor<3, hp::DoFHandler<3> >::set_vertex_dof_index (const unsigned int /*vertex*/,
+ const unsigned int /*i*/,
+ const unsigned int /*index*/) const
+{
+ Assert (false, ExcInternalError());
+}
+
+template <>
+template <class InputVector, typename number>
+void
+DoFObjectAccessor<3,hp::DoFHandler<3> >::get_dof_values (const InputVector &/*values*/,
+ Vector<number> &/*local_values*/) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
+template <>
+template <class OutputVector, typename number>
+void
+DoFObjectAccessor<3,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/*local_values*/,
+ OutputVector &/*values*/) const
+{
+ Assert (false, ExcNotImplemented());
+}
+
+
+
/*------------------------- Functions: DoFCellAccessor -----------------------*/
else
if (tmp2(i) != 0)
interpolated_values(i) = tmp2(i);
- };
- };
+ }
+ }
}
this->get_fe().get_prolongation_matrix(child)
.vmult (tmp, local_values);
this->child(child)->set_dof_values_by_interpolation (tmp, values);
- };
- };
+ }
+ }
}