stokes_constraints.clear();
DoFTools::make_hanging_node_constraints(stokes_dof_handler,
stokes_constraints);
- std::set<types::boundary_id> no_normal_flux_boundaries;
- no_normal_flux_boundaries.insert(0);
+ const std::set<types::boundary_id> no_normal_flux_boundaries = {0};
VectorTools::compute_no_normal_flux_constraints(stokes_dof_handler,
0,
no_normal_flux_boundaries,
const unsigned int nlevels = triangulation.n_global_levels();
mg_matrices.resize(0, nlevels - 1);
- std::set<types::boundary_id> dirichlet_boundary;
- dirichlet_boundary.insert(0);
+ const std::set<types::boundary_id> dirichlet_boundary = {0};
mg_constrained_dofs.initialize(dof_handler);
mg_constrained_dofs.make_zero_boundary_constraints(dof_handler,
dirichlet_boundary);
volume_mesh.refine_global(4);
- std::set<types::boundary_id> boundary_ids;
- boundary_ids.insert(0);
+ const std::set<types::boundary_id> boundary_ids = {0};
GridGenerator::extract_boundary_mesh(volume_mesh, triangulation,
boundary_ids);
Triangulation<spacedim> volume_mesh;
GridGenerator::half_hyper_ball(volume_mesh);
- std::set<types::boundary_id> boundary_ids;
- boundary_ids.insert(0);
+ const std::set<types::boundary_id> boundary_ids = {0};
GridGenerator::extract_boundary_mesh(volume_mesh,
triangulation,
// sparsity patterns and matrices for each level. The resize()
// function of MGLevelObject<T> will destroy all existing contained
// objects.
- std::set<types::boundary_id> zero_boundary_ids;
- zero_boundary_ids.insert(0);
+ const std::set<types::boundary_id> zero_boundary_ids = {0};
mg_constrained_dofs.clear();
mg_constrained_dofs.initialize(velocity_dof_handler);
stokes_sub_blocks[dim] = 1;
DoFRenumbering::component_wise(dof_handler, stokes_sub_blocks);
- std::set<types::boundary_id> no_normal_flux_boundaries;
- no_normal_flux_boundaries.insert(1);
+ std::set<types::boundary_id> no_normal_flux_boundaries = {1};
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
VectorTools::compute_no_normal_flux_constraints(
dof_handler, 0, no_normal_flux_boundaries, constraints, mapping);
stokes_sub_blocks[dim] = 1;
DoFRenumbering::component_wise(dof_handler, stokes_sub_blocks);
- std::set<types::boundary_id> no_normal_flux_boundaries;
- no_normal_flux_boundaries.insert(0);
- no_normal_flux_boundaries.insert(1);
+ const std::set<types::boundary_id> no_normal_flux_boundaries = {0, 1};
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
VectorTools::compute_normal_flux_constraints(dof_handler,
0,
stokes_sub_blocks[dim] = 1;
DoFRenumbering::component_wise(dof_handler, stokes_sub_blocks);
- std::set<types::boundary_id> no_normal_flux_boundaries;
- no_normal_flux_boundaries.insert(0);
- no_normal_flux_boundaries.insert(1);
+ const std::set<types::boundary_id> no_normal_flux_boundaries = {0, 1};
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
VectorTools::compute_no_normal_flux_constraints(
dof_handler, 0, no_normal_flux_boundaries, constraints, mapping);
stokes_sub_blocks[dim] = 1;
DoFRenumbering::component_wise(dof_handler, stokes_sub_blocks);
- std::set<types::boundary_id> no_normal_flux_boundaries;
- no_normal_flux_boundaries.insert(0);
- no_normal_flux_boundaries.insert(1);
+ const std::set<types::boundary_id> no_normal_flux_boundaries = {0, 1};
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
VectorTools::compute_no_normal_flux_constraints(
dof_handler, 0, no_normal_flux_boundaries, constraints, mapping);
stokes_sub_blocks[dim] = 1;
DoFRenumbering::component_wise(dof_handler, stokes_sub_blocks);
- std::set<types::boundary_id> no_normal_flux_boundaries;
- no_normal_flux_boundaries.insert(0);
- no_normal_flux_boundaries.insert(1);
+ const std::set<types::boundary_id> no_normal_flux_boundaries = {0, 1};
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
VectorTools::compute_no_normal_flux_constraints(
dof_handler, 0, no_normal_flux_boundaries, constraints, mapping);
dof_handler.distribute_dofs(fe);
- std::set<types::boundary_id> no_normal_flux_boundaries;
- no_normal_flux_boundaries.insert(0);
- no_normal_flux_boundaries.insert(1);
+ const std::set<types::boundary_id> no_normal_flux_boundaries = {0, 1};
DoFTools::make_hanging_node_constraints(dof_handler, constraints);
if (fe.dofs_per_vertex > 0)
VectorTools::compute_no_normal_flux_constraints(
MappingQ<dim> mapping(fe_degree + 1);
LaplaceOperator<dim, fe_degree, n_q_points_1d, number> fine_matrix;
- std::set<types::boundary_id> dirichlet_boundaries;
- dirichlet_boundaries.insert(0);
+ const std::set<types::boundary_id> dirichlet_boundaries = {0};
fine_matrix.initialize(mapping, dof, dirichlet_boundaries);
LinearAlgebra::distributed::Vector<number> in, sol;
MappingQ<dim> mapping(fe_degree + 1);
LaplaceOperator<dim, fe_degree, n_q_points_1d, double> fine_matrix;
- std::set<types::boundary_id> dirichlet_boundaries;
- dirichlet_boundaries.insert(0);
+ const std::set<types::boundary_id> dirichlet_boundaries = {0};
fine_matrix.initialize(mapping, dof, dirichlet_boundaries);
LinearAlgebra::distributed::Vector<double> in, sol;
deallog << std::endl;
deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
- const unsigned int fe_degree = dof.get_fe().degree;
- MappingQ<dim> mapping(fe_degree + 1);
- LaplaceOperator<dim, double> fine_matrix;
- std::set<types::boundary_id> dirichlet_boundaries;
- dirichlet_boundaries.insert(0);
+ const unsigned int fe_degree = dof.get_fe().degree;
+ MappingQ<dim> mapping(fe_degree + 1);
+ LaplaceOperator<dim, double> fine_matrix;
+ const std::set<types::boundary_id> dirichlet_boundaries = {0};
fine_matrix.initialize(mapping, dof, dirichlet_boundaries);
LinearAlgebra::distributed::Vector<double> in, sol;
deallog << std::endl;
deallog << "Number of degrees of freedom: " << dof.n_dofs() << std::endl;
- const unsigned int fe_degree = dof.get_fe().degree;
- MappingQ<dim> mapping(fe_degree + 1);
- LaplaceOperator<dim, double> fine_matrix;
- std::set<types::boundary_id> dirichlet_boundaries;
- dirichlet_boundaries.insert(0);
+ const unsigned int fe_degree = dof.get_fe().degree;
+ MappingQ<dim> mapping(fe_degree + 1);
+ LaplaceOperator<dim, double> fine_matrix;
+ const std::set<types::boundary_id> dirichlet_boundaries = {0};
fine_matrix.initialize(mapping, dof, dirichlet_boundaries);
LinearAlgebra::distributed::Vector<double> in, sol;
MappingQ<dim> mapping(fe_degree + 1);
LaplaceOperator<dim, fe_degree, n_q_points_1d, double> fine_matrix;
- std::set<types::boundary_id> dirichlet_boundaries;
- dirichlet_boundaries.insert(0);
+ const std::set<types::boundary_id> dirichlet_boundaries = {0};
fine_matrix.initialize(mapping, dof, dirichlet_boundaries);
LinearAlgebra::distributed::Vector<double> in, sol;
const unsigned int nlevels = triangulation.n_global_levels();
mg_matrices.resize(0, nlevels - 1);
- std::set<types::boundary_id> dirichlet_boundary;
- dirichlet_boundary.insert(0);
+ const std::set<types::boundary_id> dirichlet_boundary = {0};
mg_constrained_dofs.initialize(dof_handler);
mg_constrained_dofs.make_zero_boundary_constraints(dof_handler,
dirichlet_boundary);
mg_matrices.resize(0, n_levels - 1);
mg_constrained_dofs.clear();
- std::set<types::boundary_id> dirichlet_boundary;
- dirichlet_boundary.insert(0);
+ const std::set<types::boundary_id> dirichlet_boundary = {0};
mg_constrained_dofs.initialize(dof_handler_u);
mg_constrained_dofs.make_zero_boundary_constraints(dof_handler_u,
dirichlet_boundary);
additional_data.tasks_parallel_scheme =
MatrixFree<dim, float>::AdditionalData::none;
- std::set<types::boundary_id> dirichlet_boundary;
- dirichlet_boundary.insert(0);
+ const std::set<types::boundary_id> dirichlet_boundary = {0};
mg_constrained_dofs.initialize(dof_handler);
mg_constrained_dofs.make_zero_boundary_constraints(dof_handler,
dirichlet_boundary);
const unsigned int nlevels = triangulation.n_global_levels();
mg_matrices.resize(0, nlevels - 1);
- std::set<types::boundary_id> dirichlet_boundary;
- dirichlet_boundary.insert(0);
+ const std::set<types::boundary_id> dirichlet_boundary = {0};
mg_constrained_dofs.initialize(dof_handler);
mg_constrained_dofs.make_zero_boundary_constraints(dof_handler,
dirichlet_boundary);