bool
exists(const size_type i, const size_type j) const;
+ /**
+ * Return whether a given @p row is stored in the current object
+ * on this process.
+ */
+ bool
+ row_is_stored_locally(const size_type i) const;
+
/**
* Determine an estimate for the memory consumption (in bytes) of this
* object. Currently not implemented for this class.
*/
std::unique_ptr<Epetra_CrsGraph> nonlocal_graph;
- /**
- * The set of locally owned rows.
- */
- IndexSet locally_owned_rows;
-
friend class TrilinosWrappers::SparseMatrix;
friend class SparsityPatternIterators::Accessor;
friend class SparsityPatternIterators::Iterator;
const auto row_length =
accessor.sparsity_pattern->row_length(accessor.a_row);
if (row_length == 0 ||
- !accessor.sparsity_pattern->locally_owned_rows.is_element(
+ !accessor.sparsity_pattern->row_is_stored_locally(
accessor.a_row))
++accessor.a_row;
else
const int n_cols = static_cast<int>(end - begin);
int ierr;
- if (locally_owned_rows.is_element(row))
+ if (row_is_stored_locally(row))
ierr = graph->InsertGlobalIndices(row, n_cols, col_index_ptr);
else if (nonlocal_graph.get() != nullptr)
{
, column_space_map(std::move(other.column_space_map))
, graph(std::move(other.graph))
, nonlocal_graph(std::move(other.nonlocal_graph))
- , locally_owned_rows(std::move(other.locally_owned_rows))
{}
column_space_map,
graph,
nonlocal_graph);
- locally_owned_rows.clear();
- const auto range = this->local_range();
- locally_owned_rows.add_range(range.first, range.second);
}
column_space_map,
graph,
nonlocal_graph);
- const auto range = this->local_range();
- locally_owned_rows.add_range(range.first, range.second);
}
column_space_map,
graph,
nonlocal_graph);
- const auto range = this->local_range();
- locally_owned_rows.add_range(range.first, range.second);
}
column_space_map,
graph,
nonlocal_graph);
- const auto range = this->local_range();
- locally_owned_rows.add_range(range.first, range.second);
}
parallel_partitioning.make_trilinos_map(communicator, false);
reinit_sp(
map, map, n_entries_per_row, column_space_map, graph, nonlocal_graph);
- locally_owned_rows = parallel_partitioning;
}
parallel_partitioning.make_trilinos_map(communicator, false);
reinit_sp(
map, map, n_entries_per_row, column_space_map, graph, nonlocal_graph);
- locally_owned_rows = parallel_partitioning;
}
column_space_map,
graph,
nonlocal_graph);
- locally_owned_rows = row_parallel_partitioning;
}
column_space_map,
graph,
nonlocal_graph);
- locally_owned_rows = row_parallel_partitioning;
}
column_space_map,
graph,
nonlocal_graph);
- locally_owned_rows = row_parallel_partitioning;
IndexSet nonlocal_partitioner = writable_rows;
AssertDimension(nonlocal_partitioner.size(),
column_space_map,
graph,
nonlocal_graph);
- locally_owned_rows = row_parallel_partitioning;
}
column_space_map,
graph,
nonlocal_graph);
- locally_owned_rows = parallel_partitioning;
}
column_space_map,
graph,
nonlocal_graph);
- const auto range = this->local_range();
- locally_owned_rows.add_range(range.first, range.second);
}
column_space_map,
graph,
nonlocal_graph);
- const auto range = this->local_range();
- locally_owned_rows.add_range(range.first, range.second);
compress();
}
{
column_space_map = std_cxx14::make_unique<Epetra_Map>(*sp.column_space_map);
graph = std_cxx14::make_unique<Epetra_FECrsGraph>(*sp.graph);
- locally_owned_rows = sp.locally_owned_rows;
if (sp.nonlocal_graph.get() != nullptr)
nonlocal_graph =
reinit_sp(
rows, columns, sp, false, column_space_map, graph, nonlocal_graph);
- locally_owned_rows = complete_index_set(sp.n_rows());
}
+ bool
+ SparsityPattern::row_is_stored_locally(const size_type i) const
+ {
+ return graph->RowMap().LID(
+ static_cast<TrilinosWrappers::types::int_type>(i)) != -1;
+ }
+
+
+
bool
SparsityPattern::exists(const size_type i, const size_type j) const
{
- if (!locally_owned_rows.is_element(i))
+ if (!row_is_stored_locally(i))
{
return false;
}