// ---------------------------------------------------------------------
-// test IndexSet::fill_index_vector
+// test IndexSet::get_index_vector()
#include <deal.II/base/index_set.h>
for (unsigned int i = 0; i < 9 * is1.size() / 10; ++i)
is1.add_index(Testing::rand() % is1.size());
- std::vector<types::global_dof_index> indices;
- is1.fill_index_vector(indices);
+ const std::vector<types::global_dof_index> indices = is1.get_index_vector();
deallog << "Original index set: " << std::endl;
is1.print(deallog);
constraints.reinit(relevant_dofs);
constraints.add_lines(mg_constrained_dofs.get_boundary_indices(level));
- std::vector<types::global_dof_index> interface_indices;
- mg_constrained_dofs.get_refinement_edge_indices(level)
- .fill_index_vector(interface_indices);
+ const std::vector<types::global_dof_index> interface_indices =
+ mg_constrained_dofs.get_refinement_edge_indices(level)
+ .get_index_vector();
edge_constrained_indices.clear();
edge_constrained_indices.reserve(interface_indices.size());
edge_constrained_values.resize(interface_indices.size());
constraints.reinit(relevant_dofs);
constraints.add_lines(mg_constrained_dofs.get_boundary_indices(level));
- std::vector<types::global_dof_index> interface_indices;
- mg_constrained_dofs.get_refinement_edge_indices(level)
- .fill_index_vector(interface_indices);
+ const std::vector<types::global_dof_index> interface_indices =
+ mg_constrained_dofs.get_refinement_edge_indices(level)
+ .get_index_vector();
edge_constrained_indices.clear();
edge_constrained_indices.reserve(interface_indices.size());
edge_constrained_values.resize(interface_indices.size());
constraints.reinit(relevant_dofs);
constraints.add_lines(mg_constrained_dofs.get_boundary_indices(level));
- std::vector<types::global_dof_index> interface_indices;
- mg_constrained_dofs.get_refinement_edge_indices(level)
- .fill_index_vector(interface_indices);
+ const std::vector<types::global_dof_index> interface_indices =
+ mg_constrained_dofs.get_refinement_edge_indices(level)
+ .get_index_vector();
edge_constrained_indices.clear();
edge_constrained_indices.reserve(interface_indices.size());
edge_constrained_values.resize(interface_indices.size());
level,
std::vector<unsigned int>({0}));
- std::vector<types::global_dof_index> interface_indices;
- mg_constrained_dofs.get_refinement_edge_indices(level).fill_index_vector(
- interface_indices);
+ const std::vector<types::global_dof_index> interface_indices =
+ mg_constrained_dofs.get_refinement_edge_indices(level).get_index_vector();
vmult_edge_constrained_indices.clear();
vmult_edge_constrained_indices.reserve(interface_indices.size());
vmult_edge_constrained_values.resize(interface_indices.size());