std::vector<unsigned int> sub(dim, 1);
sub[dim-1] = 2;
- GridGenerator::subdivided_hyper_rectangle (triangulation, sub, Point<dim>(), Point<dim>());
+ Point<2> p1;
+ Point<2> p2(1.0, 2.0);
+ GridGenerator::subdivided_hyper_rectangle (triangulation, sub, p1, p2);
triangulation.begin_active()->set_refine_flag();
triangulation.execute_coarsening_and_refinement();
std::vector<unsigned int> sub(dim, 1);
sub[dim-1] = 2;
- GridGenerator::subdivided_hyper_rectangle (triangulation, sub, Point<dim>(), Point<dim>());
+ Point<2> p1;
+ Point<2> p2(1.0, 2.0);
+ GridGenerator::subdivided_hyper_rectangle (triangulation, sub, p1, p2);
triangulation.begin_active()->set_refine_flag();
triangulation.execute_coarsening_and_refinement();
std::vector<unsigned int> sub(dim, 1);
sub[dim-1] = 2;
- GridGenerator::subdivided_hyper_rectangle (triangulation, sub, Point<dim>(), Point<dim>());
+ Point<2> p1;
+ Point<2> p2(1.0, 2.0);
+ GridGenerator::subdivided_hyper_rectangle (triangulation, sub, p1, p2);
triangulation.begin_active()->set_refine_flag();
triangulation.execute_coarsening_and_refinement();
PETScWrappers::SparseMatrix A2;
A.reinit(sparsity_pattern);
A2.reinit(sparsity_pattern);
- for (auto it : A_tmp)
+
+ SparseMatrix<double>::iterator it = A_tmp.begin(), endit = A_tmp.end();
+ for (; it!=endit; ++it)
{
- const auto row = it.row();
- const auto column = it.column();
- A.set(row, column, it.value());
- A2.set(row, column, 1000. * it.value()); // scale A2 by 1000.
+ const auto row = it->row();
+ const auto column = it->column();
+ A.set(row, column, it->value());
+ A2.set(row, column, 1000. * it->value()); // scale A2 by 1000.
}
A.compress(VectorOperation::insert);
A2.compress(VectorOperation::insert);