Reference documentation for deal.II version 9.5.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 [179]
Definition at line 220 of file petsc_communication_pattern.h.
PETScWrappers::Partitioner::Partitioner | ( | ) |
Default constructor.
Definition at line 340 of file petsc_communication_pattern.cc.
|
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.
Definition at line 349 of file petsc_communication_pattern.cc.
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
.
Definition at line 365 of file petsc_communication_pattern.cc.
|
inline |
Return the actual number of ghost indices.
Definition at line 260 of file petsc_communication_pattern.h.
|
inline |
Return an IndexSet representation of the actual ghost indices.
Definition at line 269 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
.
Definition at line 433 of file petsc_communication_pattern.cc.
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.
Definition at line 402 of file petsc_communication_pattern.cc.
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.
Definition at line 417 of file petsc_communication_pattern.cc.
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
.
Definition at line 476 of file petsc_communication_pattern.cc.
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.
Definition at line 442 of file petsc_communication_pattern.cc.
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.
Definition at line 459 of file petsc_communication_pattern.cc.
|
overridevirtual |
Return the underlying MPI communicator.
Implements Utilities::MPI::CommunicationPatternBase.
Definition at line 395 of file petsc_communication_pattern.cc.
|
protected |
Definition at line 361 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.
|
protected |
Definition at line 364 of file petsc_communication_pattern.h.