types::global_dof_index next_free_dof = 0;
types::global_dof_index cache_size = 0;
- for (typename HpDoFHandler<dim,spacedim>::active_cell_iterator
- cell=dof_handler.begin_active(level);
- cell!=dof_handler.end_active(level); ++cell)
+ typename HpDoFHandler<dim,spacedim>::active_cell_iterator
+ cell=dof_handler.begin_active(level),
+ endc=dof_handler.end_active(level);
+ for (; cell!=endc; ++cell)
if (!cell->has_children())
{
dof_handler.levels[level]->dof_offsets[cell->index()] = next_free_dof;
for (unsigned int level=0; level<dof_handler.tria->n_levels(); ++level)
{
types::global_dof_index counter = 0;
- for (typename HpDoFHandler<dim,spacedim>::cell_iterator
- cell=dof_handler.begin_active(level);
- cell!=dof_handler.end_active(level); ++cell)
+ typename HpDoFHandler<dim,spacedim>::active_cell_iterator
+ cell=dof_handler.begin_active(level),
+ endc=dof_handler.end_active(level);
+ for (; cell!=endc; ++cell)
if (!cell->has_children())
counter += cell->get_fe().dofs_per_line;
dof_handler.faces = new internal::hp::DoFIndicesOnFaces<2>;
}
-
// QUAD (CELL) DOFs
// count how much space we need
types::global_dof_index next_free_dof = 0;
types::global_dof_index cache_size = 0;
- for (typename HpDoFHandler<dim, spacedim>::active_cell_iterator
- cell=dof_handler.begin_active(level);
- cell!=dof_handler.end_active(level); ++cell)
+ typename HpDoFHandler<dim,spacedim>::active_cell_iterator
+ cell=dof_handler.begin_active(level),
+ endc=dof_handler.end_active(level);
+ for (; cell!=endc; ++cell)
if (!cell->has_children())
{
dof_handler.levels[level]->dof_offsets[cell->index()] = next_free_dof;
for (unsigned int level=0; level<dof_handler.tria->n_levels(); ++level)
{
types::global_dof_index counter = 0;
- for (typename HpDoFHandler<dim,spacedim>::cell_iterator
- cell=dof_handler.begin_active(level);
- cell!=dof_handler.end_active(level); ++cell)
+ typename HpDoFHandler<dim,spacedim>::active_cell_iterator
+ cell=dof_handler.begin_active(level),
+ endc=dof_handler.end_active(level);
+ for (; cell!=endc; ++cell)
if (!cell->has_children())
counter += cell->get_fe().dofs_per_quad;
dof_handler.faces = new internal::hp::DoFIndicesOnFaces<3>;
}
-
// HEX (CELL) DOFs
// count how much space we need
types::global_dof_index next_free_dof = 0;
types::global_dof_index cache_size = 0;
- for (typename HpDoFHandler<dim,spacedim>::active_cell_iterator
- cell=dof_handler.begin_active(level);
- cell!=dof_handler.end_active(level); ++cell)
+ typename HpDoFHandler<dim,spacedim>::active_cell_iterator
+ cell=dof_handler.begin_active(level),
+ endc=dof_handler.end_active(level);
+ for (; cell!=endc; ++cell)
if (!cell->has_children())
{
dof_handler.levels[level]->dof_offsets[cell->index()] = next_free_dof;
for (unsigned int level=0; level<dof_handler.tria->n_levels(); ++level)
{
types::global_dof_index counter = 0;
- for (typename HpDoFHandler<dim,spacedim>::cell_iterator
- cell=dof_handler.begin_active(level);
- cell!=dof_handler.end_active(level); ++cell)
+ typename HpDoFHandler<dim,spacedim>::active_cell_iterator
+ cell=dof_handler.begin_active(level),
+ endc=dof_handler.end_active(level);
+ for (; cell!=endc; ++cell)
if (!cell->has_children())
counter += cell->get_fe().dofs_per_hex;