const size_type local_size);
/**
- * 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.
+ * Construct a new parallel ghosted PETSc vector from IndexSets.
+ *
+ * Note that @p local must be ascending and 1:1, see
+ * IndexSet::is_ascending_and_one_to_one(). In particular, the DoFs in
+ * @p local need to be contiguous, meaning you can only create vectors
+ * from a DoFHandler with several finite element components if they are
+ * not reordered by component (use a PETScWrappers::BlockVector
+ * otherwise). 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
const MPI_Comm &communicator);
/**
- * Construct a new parallel PETSc vector from an IndexSet. This creates
- * a non ghosted vector.
+ * Construct a new parallel PETSc vector without ghost elements from an
+ * IndexSet.
+ *
+ * Note that @p local must be ascending and 1:1, see
+ * IndexSet::is_ascending_and_one_to_one(). In particular, the DoFs in
+ * @p local need to be contiguous, meaning you can only create vectors
+ * from a DoFHandler with several finite element components if they are
+ * not reordered by component (use a PETScWrappers::BlockVector
+ * otherwise).
*/
explicit Vector (const IndexSet &local,
const MPI_Comm &communicator);