Reference documentation for deal.II version 9.6.0
|
#include <deal.II/lac/petsc_communication_pattern.h>
Public Member Functions | |
Partitioner () | |
virtual | ~Partitioner () override=default |
virtual void | reinit (const IndexSet &locally_owned_indices, const IndexSet &ghost_indices, const MPI_Comm communicator) override |
void | reinit (const IndexSet &locally_owned_indices, const IndexSet &ghost_indices, const IndexSet &larger_ghost_indices, const MPI_Comm communicator) |
unsigned int | n_ghost_indices () const |
const IndexSet & | ghost_indices () const |
template<typename Number > | |
void | export_to_ghosted_array (const ArrayView< const Number > &locally_owned_array, const ArrayView< Number > &ghost_array) const |
template<typename Number > | |
void | export_to_ghosted_array_start (const ArrayView< const Number > &locally_owned_array, const ArrayView< Number > &ghost_array) const |
template<typename Number > | |
void | export_to_ghosted_array_finish (const ArrayView< const Number > &locally_owned_array, const ArrayView< Number > &ghost_array) const |
template<typename Number > | |
void | import_from_ghosted_array (const VectorOperation::values op, const ArrayView< const Number > &ghost_array, const ArrayView< Number > &locally_owned_array) const |
template<typename Number > | |
void | import_from_ghosted_array_start (const VectorOperation::values op, const ArrayView< const Number > &ghost_array, const ArrayView< Number > &locally_owned_array) const |
template<typename Number > | |
void | import_from_ghosted_array_finish (const VectorOperation::values op, const ArrayView< const Number > &ghost_array, const ArrayView< Number > &locally_owned_array) const |
MPI_Comm | get_mpi_communicator () const override |
Partitioner implementation based on the PetscSF object. This class implements the same communication patterns of Utilities::MPI::Partitioner, internally using PetscSF API calls. Differently from the Utilities::MPI::Partitioner implementation, here we don't need to specify the communication channel, the temporary storage, and the MPI requests within export and import functions. Moreover, the import API does not zero the input ghost array.
For additional information, see the paper [214]
Definition at line 219 of file petsc_communication_pattern.h.
PETScWrappers::Partitioner::Partitioner | ( | ) |
Default constructor.
|
overridevirtualdefault |
Destructor.
|
overridevirtual |
Reinitialize the partitioner. As for the Utilities::MPI::Partitioner, any entry of ghost_indices
that is also present in locally_owned_indices
is discarded.
Implements Utilities::MPI::CommunicationPatternBase.
void PETScWrappers::Partitioner::reinit | ( | const IndexSet & | locally_owned_indices, |
const IndexSet & | ghost_indices, | ||
const IndexSet & | larger_ghost_indices, | ||
const MPI_Comm | communicator ) |
Reinitialize the partitioner. As for the Utilities::MPI::Partitioner, any entry of ghost_indices
that is also present in locally_owned_indices
is discarded. This reinitialization will allow to perform communications either using a ghost data array of the size of ghost_indices
or of larger_ghost_indices
.
|
inline |
Return the actual number of ghost indices.
Definition at line 259 of file petsc_communication_pattern.h.
|
inline |
Return an IndexSet representation of the actual ghost indices.
Definition at line 268 of file petsc_communication_pattern.h.
void PETScWrappers::Partitioner::export_to_ghosted_array | ( | const ArrayView< const Number > & | locally_owned_array, |
const ArrayView< Number > & | ghost_array ) const |
Fill the vector ghost_array
according to the precomputed communication pattern with values from locally_owned_array
.
void PETScWrappers::Partitioner::export_to_ghosted_array_start | ( | const ArrayView< const Number > & | locally_owned_array, |
const ArrayView< Number > & | ghost_array ) const |
Start the communication round to fill the vector ghost_array
according to the precomputed communication pattern with values from locally_owned_array
. It can be overlapped with other communications. Differently from the Utilities::MPI::Partitioner implementation, here we don't need to specify the communication channel, the temporary storage, and the MPI requests.
void PETScWrappers::Partitioner::export_to_ghosted_array_finish | ( | const ArrayView< const Number > & | locally_owned_array, |
const ArrayView< Number > & | ghost_array ) const |
Finish the communication round to fill the vector ghost_array
according to the precomputed communication pattern with values from locally_owned_array
. It can be overlapped with other communications. Differently from the Utilities::MPI::Partitioner implementation, here we don't need to specify the communication channel, the temporary storage, and the MPI requests.
void PETScWrappers::Partitioner::import_from_ghosted_array | ( | const VectorOperation::values | op, |
const ArrayView< const Number > & | ghost_array, | ||
const ArrayView< Number > & | locally_owned_array ) const |
Modify the vector locally_owned_array
according to the precomputed communication pattern and the operation op
with values from ghost_array
.
void PETScWrappers::Partitioner::import_from_ghosted_array_start | ( | const VectorOperation::values | op, |
const ArrayView< const Number > & | ghost_array, | ||
const ArrayView< Number > & | locally_owned_array ) const |
Start the communication round to modify the vector locally_owned_array
according to the precomputed communication pattern and the operation op
with values from ghost_array
. It can be overlapped with other communications. Differently from the Utilities::MPI::Partitioner implementation, here we don't need to specify the communication channel, the temporary storage, and the MPI requests.
void PETScWrappers::Partitioner::import_from_ghosted_array_finish | ( | const VectorOperation::values | op, |
const ArrayView< const Number > & | ghost_array, | ||
const ArrayView< Number > & | locally_owned_array ) const |
Finish the communication round to modify the vector locally_owned_array
according to the precomputed communication pattern and the operation op
with values from ghost_array
. It can be overlapped with other communications. Differently from the Utilities::MPI::Partitioner implementation, here we don't need to specify the communication channel, the temporary storage, and the MPI requests.
|
overridevirtual |
Return the underlying MPI communicator.
Implements Utilities::MPI::CommunicationPatternBase.
|
protected |
Definition at line 360 of file petsc_communication_pattern.h.
|
protected |
Definition at line 360 of file petsc_communication_pattern.h.
|
protected |
Definition at line 361 of file petsc_communication_pattern.h.
|
protected |
Definition at line 362 of file petsc_communication_pattern.h.
|
protected |
Definition at line 363 of file petsc_communication_pattern.h.