const dealii::Vector<Number> &v,
const size_type local_size);
-
- /**
- * Copy-constructor the values from a PETSc wrapper vector class.
- *
- * @arg local_size denotes the size of the chunk that shall be stored on
- * the present process.
- *
- * @arg communicator denotes the MPI communicator over which the
- * different parts of the vector shall communicate
- *
- * @deprecated The use of objects that are explicitly of type VectorBase
- * is deprecated: use PETScWrappers::MPI::Vector instead.
- */
- DEAL_II_DEPRECATED
- explicit Vector(const MPI_Comm & communicator,
- const VectorBase &v,
- const size_type local_size);
-
/**
* Construct a new parallel ghosted PETSc vector from IndexSets.
*
- Vector::Vector(const MPI_Comm & communicator,
- const VectorBase &v,
- const size_type local_size)
- : VectorBase(v)
- , communicator(communicator)
- {
- // In the past (before it was deprecated) this constructor did a
- // byte-for-byte copy of v. This choice resulted in two problems:
- // 1. The created vector will have the same size as v, not local size.
- // 2. Since both the created vector and v maintain ownership of the same
- // PETSc Vec, both will try to destroy it: this does not make sense.
- //
- // For the sake of backwards compatibility, preserve the behavior of the
- // copy, but correct the ownership bug. Note that in both this (and the
- // original) implementation local_size is ultimately unused.
- (void)local_size;
- }
-
-
-
Vector::Vector(const IndexSet &local,
const IndexSet &ghost,
const MPI_Comm &communicator)
IndexSet locally_owned_dofs(n_dofs);
locally_owned_dofs.add_range(my_id * n_dofs / n_mpi_processes,
(my_id + 1) * n_dofs / n_mpi_processes);
- locally_relevant_dofs.add_index(0);
DynamicSparsityPattern dsp(n_dofs);
dsp.add(0, 0);
PETScWrappers::MPI::SparseMatrix v2;