* the BlockSparsityPattern of the Simple type can efficiently store
* large sparsity patterns in parallel, so this is the only supported
* argument. The IndexSets describe the locally owned range of DoFs for
- * each block. Note that each IndexSet needs to be contiguous. For a
- * symmetric structure hand in the same vector for the first two
+ * each block. Note that the IndexSets needs to be ascending and 1:1.
+ * For a symmetric structure hand in the same vector for the first two
* arguments.
*/
void reinit(const std::vector<IndexSet> &rows,
* Create a matrix where the size() of the IndexSets determine the
* global number of rows and columns and the entries of the IndexSet
* give the rows and columns for the calling processor. Note that only
- * contiguous IndexSets are supported.
+ * ascending, 1:1 IndexSets are supported.
*/
template <typename SparsityPatternType>
void reinit (const IndexSet &local_rows,
const size_type local_size);
/**
- * Construct a new parallel ghosted PETSc vector from an IndexSet. Note
- * that @p local must be contiguous and the global size of the vector is
- * determined by local.size(). The global indices in @p ghost are
- * supplied as ghost indices that can also be read locally.
+ * Construct a new parallel ghosted PETSc vector from an IndexSet.
+ * Note that @p local must be ascending and 1:1.
+ * The global size of the vector is determined by local.size().
+ * The global indices in @p ghost are supplied as ghost indices
+ * that can also be read locally.
*
* Note that the @p ghost IndexSet may be empty and that any indices
* already contained in @p local are ignored during construction. That
ExcMessage("SparsityPattern and IndexSet have different number of columns"));
Assert(local_rows.is_contiguous() && local_columns.is_contiguous(),
ExcMessage("PETSc only supports contiguous row/column ranges"));
+ Assert(local_rows.is_ascending_and_one_to_one(communicator), ExcNotImplemented());
#ifdef DEBUG
{
:
communicator (communicator)
{
- Assert(local.is_contiguous(), ExcNotImplemented());
+ Assert(local.is_ascending_and_one_to_one(communicator), ExcNotImplemented());
IndexSet ghost_set = ghost;
ghost_set.subtract_set(local);
:
communicator (communicator)
{
- Assert(local.is_contiguous(), ExcNotImplemented());
+ Assert(local.is_ascending_and_one_to_one(communicator), ExcNotImplemented());
Vector::create_vector(local.size(), local.n_elements());
}
communicator = comm;
- Assert(local.is_contiguous(), ExcNotImplemented());
+ Assert(local.is_ascending_and_one_to_one(comm), ExcNotImplemented());
IndexSet ghost_set = ghost;
ghost_set.subtract_set(local);
communicator = comm;
- Assert(local.is_contiguous(), ExcNotImplemented());
+ Assert(local.is_ascending_and_one_to_one(comm), ExcNotImplemented());
Assert(local.size()>0, ExcMessage("can not create vector of size 0."));
create_vector(local.size(), local.n_elements());
}