PArpackSolver<VectorType>::internal_reinit(const IndexSet &locally_owned_dofs)
{
// store local indices to write to vectors
- locally_owned_dofs.fill_index_vector(local_indices);
+ local_indices = locally_owned_dofs.get_index_vector();
// scalars
nloc = locally_owned_dofs.n_elements();
}
// setup edge_constrained indices
- std::vector<types::global_dof_index> interface_indices;
- mg_constrained_dofs[j]
- .get_refinement_edge_indices(level)
- .fill_index_vector(interface_indices);
+ const std::vector<types::global_dof_index> interface_indices =
+ mg_constrained_dofs[j]
+ .get_refinement_edge_indices(level)
+ .get_index_vector();
edge_constrained_indices[j].clear();
edge_constrained_indices[j].reserve(interface_indices.size());
edge_constrained_values[j].resize(interface_indices.size());
-std::vector<size_type>
+std::vector<IndexSet::size_type>
IndexSet::get_index_vector() const
{
compress();
);
else
{
- std::vector<size_type> indices;
- fill_index_vector(indices);
+ const std::vector<size_type> indices = get_index_vector();
std::vector<types::global_dof_index> int_indices(indices.size());
std::copy(indices.begin(), indices.end(), int_indices.begin());
const Teuchos::ArrayView<types::global_dof_index> arr_view(int_indices);
);
else
{
- std::vector<size_type> indices;
- fill_index_vector(indices);
+ const std::vector<size_type> indices = get_index_vector();
return Epetra_Map(
TrilinosWrappers::types::int_type(-1),
TrilinosWrappers::types::int_type(n_elements()),
(n_elements() > 0 ?
- reinterpret_cast<TrilinosWrappers::types::int_type *>(
+ reinterpret_cast<const TrilinosWrappers::types::int_type *>(
indices.data()) :
nullptr),
0,
// exchange step and see whether the ghost indices sent to us by other
// processes (ghost_indices) are the same as we hold locally
// (ghost_indices_ref).
- std::vector<types::global_dof_index> ghost_indices_ref;
- ghost_indices_data.fill_index_vector(ghost_indices_ref);
+ const std::vector<types::global_dof_index> ghost_indices_ref =
+ ghost_indices_data.get_index_vector();
AssertDimension(ghost_indices_ref.size(), n_ghost_indices());
std::vector<types::global_dof_index> indices_to_send(n_import_indices());
std::vector<types::global_dof_index> ghost_indices(n_ghost_indices());
- std::vector<types::global_dof_index> my_indices;
- locally_owned_range_data.fill_index_vector(my_indices);
+
+ const std::vector<types::global_dof_index> my_indices =
+ locally_owned_range_data.get_index_vector();
std::vector<MPI_Request> requests;
n_ghost_indices_in_larger_set = n_ghost_indices_data;
export_to_ghosted_array_start(127,
ghosted = true;
ghost_indices = ghostnodes;
- std::vector<size_type> ghostindices;
- ghostnodes.fill_index_vector(ghostindices);
+ const std::vector<size_type> ghostindices = ghostnodes.get_index_vector();
const PetscInt *ptr =
(ghostindices.size() > 0 ?
// the owned rows. In that case, do not create the nonlocal graph and
// fill the columns by demand
const bool have_ghost_rows = [&]() {
- std::vector<dealii::types::global_dof_index> indices;
- relevant_rows.fill_index_vector(indices);
+ const std::vector<dealii::types::global_dof_index> indices =
+ relevant_rows.get_index_vector();
Epetra_Map relevant_map(
TrilinosWrappers::types::int_type(-1),
TrilinosWrappers::types::int_type(relevant_rows.n_elements()),
(indices.empty() ?
nullptr :
- reinterpret_cast<TrilinosWrappers::types::int_type *>(
+ reinterpret_cast<const TrilinosWrappers::types::int_type *>(
indices.data())),
0,
row_space_map.Comm());