Patterns::Bool(),
"Generate graphical output: true|false");
- if (prm_filename.size() == 0)
+ if (prm_filename.empty())
{
prm.print_parameters(std::cout, ParameterHandler::Text);
AssertThrow(
CompareDownstream<typename DoFHandler<dim>::level_cell_iterator, dim>
comparator(direction);
- typename DoFHandler<dim>::level_cell_iterator cell = dof.begin(level);
- typename DoFHandler<dim>::level_cell_iterator endc = dof.end(level);
- for (; cell != endc; ++cell)
+ for (const auto &cell : dof.cell_iterators_on_level(level))
ordered_cells.push_back(cell);
std::sort(ordered_cells.begin(), ordered_cells.end(), comparator);
std::vector<unsigned> ordered_indices;
ordered_indices.reserve(dof.get_triangulation().n_cells(level));
- for (unsigned int i = 0; i < ordered_cells.size(); ++i)
- ordered_indices.push_back(ordered_cells[i]->index());
+ for (const auto &cell : ordered_cells)
+ ordered_indices.push_back(cell->index());
return ordered_indices;
}
CompareDownstream<typename DoFHandler<dim>::active_cell_iterator, dim>
comparator(direction);
- typename DoFHandler<dim>::active_cell_iterator cell = dof.begin_active();
- typename DoFHandler<dim>::active_cell_iterator endc = dof.end();
- for (; cell != endc; ++cell)
+ for (const auto &cell : dof.active_cell_iterators())
ordered_cells.push_back(cell);
std::sort(ordered_cells.begin(), ordered_cells.end(), comparator);
std::vector<unsigned int> ordered_indices;
ordered_indices.reserve(dof.get_triangulation().n_active_cells());
- for (unsigned int i = 0; i < ordered_cells.size(); ++i)
- ordered_indices.push_back(ordered_cells[i]->index());
+ for (const auto &cell : ordered_cells)
+ ordered_indices.push_back(cell->index());
return ordered_indices;
}
std::vector<unsigned int> ordered_cells;
ordered_cells.reserve(n_cells);
- typename DoFHandler<dim>::cell_iterator cell = dof.begin(level);
- typename DoFHandler<dim>::cell_iterator endc = dof.end(level);
- for (; cell != endc; ++cell)
+ for (const auto &cell : dof.cell_iterators_on_level(level))
ordered_cells.push_back(cell->index());
// shuffle the elements
std::vector<unsigned int> ordered_cells;
ordered_cells.reserve(n_cells);
- typename DoFHandler<dim>::active_cell_iterator cell = dof.begin_active();
- typename DoFHandler<dim>::active_cell_iterator endc = dof.end();
- for (; cell != endc; ++cell)
+ for (const auto &cell : dof.active_cell_iterators())
ordered_cells.push_back(cell->index());
// shuffle the elements
};
template <int dim>
- double RightHandSide<dim>::value(const Point<dim> & p,
+ double RightHandSide<dim>::value(const Point<dim> &,
const unsigned int component) const
{
Assert(component == 0, ExcIndexRange(component, 0, 1));
(void)component;
- (void)p;
return 0.0;
}