GridGenerator::hyper_cube(tr);
tr.refine_global(1);
- (++tr.begin_active())->set_refine_flag();
+ (std::next(tr.begin_active()))->set_refine_flag();
tr.execute_coarsening_and_refinement();
tr.begin_active()->set_refine_flag();
else
GridGenerator::hyper_cube(triangulation_2, -1, 1);
triangulation_2.refine_global(1);
- (++triangulation_2.begin_active())->set_refine_flag();
+ (std::next(triangulation_2.begin_active()))->set_refine_flag();
triangulation_2.execute_coarsening_and_refinement();
(++triangulation_2.begin_active(2))->set_refine_flag();
triangulation_2.execute_coarsening_and_refinement();
else
GridGenerator::hyper_cube(triangulation_2, -1, 1);
triangulation_2.refine_global(1);
- (++triangulation_2.begin_active())->set_refine_flag();
+ (std::next(triangulation_2.begin_active()))->set_refine_flag();
triangulation_2.execute_coarsening_and_refinement();
(++triangulation_2.begin_active(2))->set_refine_flag();
triangulation_2.execute_coarsening_and_refinement();
else
GridGenerator::hyper_cube(triangulation_2, -1, 1);
triangulation_2.refine_global(1);
- (++triangulation_2.begin_active())->set_refine_flag();
+ (std::next(triangulation_2.begin_active()))->set_refine_flag();
triangulation_2.execute_coarsening_and_refinement();
(++triangulation_2.begin_active(2))->set_refine_flag();
triangulation_2.execute_coarsening_and_refinement();
Point<dim>(),
(dim == 3 ? Point<dim>(2, 1, 1) :
Point<dim>(2, 1)));
- (++triangulation.begin_active())->set_refine_flag();
+ (std::next(triangulation.begin_active()))->set_refine_flag();
triangulation.execute_coarsening_and_refinement();
hp::FECollection<dim> fe;
Point<dim>(),
(dim == 3 ? Point<dim>(2, 1, 1) :
Point<dim>(2, 1)));
- (++triangulation.begin_active())->set_refine_flag();
+ (std::next(triangulation.begin_active()))->set_refine_flag();
triangulation.execute_coarsening_and_refinement();
hp::FECollection<dim> fe;
// makes a bunch of vertices unused
std::set<typename Triangulation<dim>::active_cell_iterator> cells_to_remove;
for (typename Triangulation<dim>::active_cell_iterator cell =
- ++triangulation.begin_active();
+ std::next(triangulation.begin_active());
cell != triangulation.end();
++cell)
cells_to_remove.insert(cell);
void
check(Triangulation<3> &tria)
{
- (++tria.begin_active())->set_refine_flag();
+ (std::next(tria.begin_active()))->set_refine_flag();
tria.execute_coarsening_and_refinement();
deallog << "Initial check" << std::endl;
void
check(Triangulation<3> &tria)
{
- (++tria.begin_active())->set_refine_flag();
+ (std::next(tria.begin_active()))->set_refine_flag();
tria.execute_coarsening_and_refinement();
deallog << "Initial check" << std::endl;
void
check(Triangulation<3> &tria)
{
- (++tria.begin_active())->set_refine_flag();
+ (std::next(tria.begin_active()))->set_refine_flag();
tria.execute_coarsening_and_refinement();
deallog << "Initial check" << std::endl;
void
check(Triangulation<3> &tria)
{
- (++tria.begin_active())->set_refine_flag();
+ (std::next(tria.begin_active()))->set_refine_flag();
tria.execute_coarsening_and_refinement();
deallog << "Initial check" << std::endl;
deallog << "Coarse cell 1 vertices:" << std::endl;
for (unsigned int i = 0; i < 8; ++i)
- deallog << ' ' << (++tria.begin_active())->vertex_index(i);
+ deallog << ' ' << (std::next(tria.begin_active()))->vertex_index(i);
deallog << std::endl;
// we know that from the second
// cell, the common face must have
// wrong orientation. check this
- Assert((++coarse_grid.begin_active())->face_orientation(5) == false,
+ Assert((std::next(coarse_grid.begin_active()))->face_orientation(5) == false,
ExcInternalError());
}
void
check(Triangulation<3> &tria)
{
- (++tria.begin_active())->set_refine_flag();
+ (std::next(tria.begin_active()))->set_refine_flag();
tria.execute_coarsening_and_refinement();
deallog << "Initial check" << std::endl;
create_two_cubes(coarse_grid);
const Triangulation<3>::active_cell_iterator cells[2] = {
- coarse_grid.begin_active(), ++coarse_grid.begin_active()};
+ coarse_grid.begin_active(), std::next(coarse_grid.begin_active())};
// output all vertices
for (unsigned int c = 0; c < 2; ++c)
GridGenerator::hyper_cube(tria);
tria.refine_global(2);
tria.begin_active()->set_coarsen_flag();
- (++(tria.begin_active()))->set_coarsen_flag();
+ (std::next((tria.begin_active())))->set_coarsen_flag();
tria.execute_coarsening_and_refinement();
std::map<typename Triangulation<dim, spacedim>::face_iterator, unsigned int>
// similar for second grid, but
// different cell
tria_2.refine_global(1);
- (++tria_2.begin_active())->set_refine_flag();
+ (std::next(tria_2.begin_active()))->set_refine_flag();
tria_2.execute_coarsening_and_refinement();
GridGenerator::create_union_triangulation(tria_1, tria_2, tria_3);
cell != dof_handler.end();
++cell, ++cell_no)
cell->set_active_fe_index(0);
- (++dof_handler.begin_active())->set_active_fe_index(1);
+ (std::next(dof_handler.begin_active()))->set_active_fe_index(1);
dof_handler.distribute_dofs(fe);
deallog << "n_dofs=" << dof_handler.n_dofs() << std::endl;
Point<dim>(),
(dim == 3 ? Point<dim>(2, 1, 1) :
Point<dim>(2, 1)));
- (++triangulation.begin_active())->set_refine_flag();
+ (std::next(triangulation.begin_active()))->set_refine_flag();
triangulation.execute_coarsening_and_refinement();
hp::FECollection<dim> fe;
TestGrids::hyper_line(tria, 4);
tria.begin_active()->set_refine_flag();
- (++tria.begin_active())->set_refine_flag();
+ (std::next(tria.begin_active()))->set_refine_flag();
tria.execute_coarsening_and_refinement();
hp::FECollection<dim> fes;
dof_handler.distribute_dofs(fe_collection);
print_dofs(dof_handler.begin_active());
- print_dofs(++dof_handler.begin_active());
+ print_dofs(std::next(dof_handler.begin_active()));
AffineConstraints<double> constraints;
constraints.clear();
dof_handler.distribute_dofs(fe_collection);
print_dofs(dof_handler.begin_active());
- print_dofs(++dof_handler.begin_active());
+ print_dofs(std::next(dof_handler.begin_active()));
AffineConstraints<double> constraints;
constraints.clear();
deallog << "RTNodal of degree " << i << std::endl;
print_dofs(dof_handler.begin_active());
- print_dofs(++dof_handler.begin_active());
+ print_dofs(std::next(dof_handler.begin_active()));
AffineConstraints<double> constraints;
constraints.clear();
TestGrids::hyper_line(tria, 2);
DoFHandler<dim> dofh(tria);
- (++(dofh.begin_active()))->set_active_fe_index(1);
+ (std::next((dofh.begin_active())))->set_active_fe_index(1);
dofh.distribute_dofs(fe_collection);
// make constraints
triangulation.begin_active()->set_refine_flag();
break;
case 1:
- (++(triangulation.begin_active()))->set_refine_flag();
+ (std::next((triangulation.begin_active())))->set_refine_flag();
break;
case 2:
- (++(++(triangulation.begin_active())))->set_refine_flag();
+ (std::next((++(triangulation.begin_active()))))->set_refine_flag();
break;
default:
Assert(false, ExcNotImplemented());
if (do_refine)
{
- (++triangulation.begin_active())->set_refine_flag();
+ (std::next(triangulation.begin_active()))->set_refine_flag();
triangulation.execute_coarsening_and_refinement();
}
triangulation.begin_active()->set_refine_flag();
break;
case 1:
- (++(triangulation.begin_active()))->set_refine_flag();
+ (std::next((triangulation.begin_active())))->set_refine_flag();
break;
case 2:
- (++(++(triangulation.begin_active())))->set_refine_flag();
+ (std::next((++(triangulation.begin_active()))))->set_refine_flag();
break;
default:
Assert(false, ExcNotImplemented());
if (do_refine)
{
- (++triangulation.begin_active())->set_refine_flag();
+ (std::next(triangulation.begin_active()))->set_refine_flag();
triangulation.execute_coarsening_and_refinement();
}
hp_fe_values1.reinit(cell1);
// Now make a copy of the object and initialize it for the second cell
- const auto cell2 = ++dof_handler.begin_active();
+ const auto cell2 = std::next(dof_handler.begin_active());
hp::FEValues<dim> hp_fe_values2(hp_fe_values1);
hp_fe_values2.reinit(cell2);
std::vector<types::global_dof_index> indices2(fe.dofs_per_cell);
typename DoFHandler<dim>::active_cell_iterator cell1 = dof.begin_active();
- typename DoFHandler<dim>::active_cell_iterator cell2 = ++dof.begin_active();
+ typename DoFHandler<dim>::active_cell_iterator cell2 =
+ std::next(dof.begin_active());
cell1->get_dof_indices(indices1);
cell2->get_dof_indices(indices2);
case 7:
tria.begin_active()->set_refine_flag();
- (++tria.begin_active())->set_refine_flag();
+ (std::next(tria.begin_active()))->set_refine_flag();
break;
case 8:
tria.begin_active()->set_refine_flag();
- (++(++(++tria.begin_active())))->set_refine_flag();
+ (std::next((++(++tria.begin_active()))))->set_refine_flag();
break;
};
{
triangulation.set_all_manifold_ids(3);
- const auto center_cell = ++triangulation.begin_active();
+ const auto center_cell = std::next(triangulation.begin_active());
const auto lower_radial = center_cell->face(2);
const auto upper_radial = center_cell->face(3);
lower_radial->set_manifold_id(1);
tr.refine_global();
tr.begin_active()->set_refine_flag();
- (++(tr.begin_active()))->set_refine_flag();
+ (std::next((tr.begin_active())))->set_refine_flag();
tr.execute_coarsening_and_refinement();
DoFHandler<dim> dof_handler(triangulation);
if (dof_handler.begin_active()->is_locally_owned())
dof_handler.begin_active()->set_active_fe_index(0);
- if ((++dof_handler.begin_active())->is_locally_owned())
- (++dof_handler.begin_active())->set_active_fe_index(1);
+ if ((std::next(dof_handler.begin_active()))->is_locally_owned())
+ (std::next(dof_handler.begin_active()))->set_active_fe_index(1);
dof_handler.distribute_dofs(fe);
log_dof_diagnostics(dof_handler);
DoFHandler<dim> dof_handler(triangulation);
if (dof_handler.begin_active()->is_locally_owned())
dof_handler.begin_active()->set_active_fe_index(0);
- if ((++dof_handler.begin_active())->is_locally_owned())
- (++dof_handler.begin_active())->set_active_fe_index(1);
+ if ((std::next(dof_handler.begin_active()))->is_locally_owned())
+ (std::next(dof_handler.begin_active()))->set_active_fe_index(1);
dof_handler.distribute_dofs(fe);
AffineConstraints<double> constraints;
triangulation.begin_active()->set_refine_flag();
break;
case 1:
- (++(triangulation.begin_active()))->set_refine_flag();
+ (std::next((triangulation.begin_active())))->set_refine_flag();
break;
case 2:
- (++(++(triangulation.begin_active())))->set_refine_flag();
+ (std::next((++(triangulation.begin_active()))))->set_refine_flag();
break;
default:
Assert(false, ExcNotImplemented());
triangulation.begin_active()->set_refine_flag();
break;
case 1:
- (++(triangulation.begin_active()))->set_refine_flag();
+ (std::next((triangulation.begin_active())))->set_refine_flag();
break;
case 2:
- (++(++(triangulation.begin_active())))->set_refine_flag();
+ (std::next((++(triangulation.begin_active()))))->set_refine_flag();
break;
default:
Assert(false, ExcNotImplemented());
dof_1.begin_active()->set_future_fe_index(0);
dof_2.begin_active()->set_future_fe_index(0);
- (++dof_1.begin_active())->set_future_fe_index(1);
- (++dof_2.begin_active())->set_future_fe_index(1);
+ (std::next(dof_1.begin_active()))->set_future_fe_index(1);
+ (std::next(dof_2.begin_active()))->set_future_fe_index(1);
// right now, both hp::DoFHandlers are the same. Renumber one of them
DoFRenumbering::random(dof_1);