Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PETScWrappers deprecations #9937

Merged
merged 4 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/news/changes/incompatibilities/20200421DanielArndt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Removed: Deprecated constructors for PETScWrappers::MPI::SparseMatrix,
a deprecated overload for PETScWrappers::MatrixBase::add and a deprecated
constructor for PETScWrappers::MPI::Vector have been removed.
<br>
(Daniel Arndt, 2020/04/21)
18 changes: 0 additions & 18 deletions include/deal.II/lac/petsc_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,24 +202,6 @@ namespace PETScWrappers
const dealii::Vector<Number> &v,
const size_type locally_owned_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.
*
Expand Down
1 change: 1 addition & 0 deletions source/lac/petsc_matrix_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ namespace PETScWrappers
}



MatrixBase &
MatrixBase::add(const PetscScalar factor, const MatrixBase &other)
{
Expand Down
2 changes: 2 additions & 0 deletions source/lac/petsc_parallel_sparse_matrix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ namespace PETScWrappers
preset_nonzero_locations);
}



template <typename SparsityPatternType>
void
SparseMatrix::reinit(const IndexSet & local_rows,
Expand Down
20 changes: 0 additions & 20 deletions source/lac/petsc_parallel_vector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,6 @@ namespace PETScWrappers



Vector::Vector(const MPI_Comm & communicator,
const VectorBase &v,
const size_type locally_owned_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 locally_owned_size is ultimately unused.
(void)locally_owned_size;
}



Vector::Vector(const IndexSet &local,
const IndexSet &ghost,
const MPI_Comm &communicator)
Expand Down