deal.II version GIT relicensing-1962-gd05d5f3b38 2024-10-10 14:10:00+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
internal::MatrixFreeFunctions::VectorDataExchange::Full Class Reference

#include <deal.II/matrix_free/vector_data_exchange.h>

Inheritance diagram for internal::MatrixFreeFunctions::VectorDataExchange::Full:
Inheritance graph
[legend]

Public Member Functions

 Full (const std::shared_ptr< const Utilities::MPI::Partitioner > &partitioner, const MPI_Comm communicator_sm)
 
unsigned int locally_owned_size () const override
 
unsigned int n_ghost_indices () const override
 
unsigned int n_import_indices () const override
 
virtual unsigned int n_import_sm_procs () const override
 
virtual types::global_dof_index size () const override
 
MPI_Comm get_sm_mpi_communicator () const
 
void export_to_ghosted_array_start (const unsigned int communication_channel, const ArrayView< const double > &locally_owned_array, const std::vector< ArrayView< const double > > &shared_arrays, const ArrayView< double > &ghost_array, const ArrayView< double > &temporary_storage, std::vector< MPI_Request > &requests) const override
 
void export_to_ghosted_array_finish (const ArrayView< const double > &locally_owned_array, const std::vector< ArrayView< const double > > &shared_arrays, const ArrayView< double > &ghost_array, std::vector< MPI_Request > &requests) const override
 
void import_from_ghosted_array_start (const VectorOperation::values vector_operation, const unsigned int communication_channel, const ArrayView< const double > &locally_owned_array, const std::vector< ArrayView< const double > > &shared_arrays, const ArrayView< double > &ghost_array, const ArrayView< double > &temporary_storage, std::vector< MPI_Request > &requests) const override
 
void import_from_ghosted_array_finish (const VectorOperation::values vector_operation, const ArrayView< double > &locally_owned_storage, const std::vector< ArrayView< const double > > &shared_arrays, const ArrayView< double > &ghost_array, const ArrayView< const double > &temporary_storage, std::vector< MPI_Request > &requests) const override
 
void reset_ghost_values (const ArrayView< double > &ghost_array) const override
 
void export_to_ghosted_array_start (const unsigned int communication_channel, const ArrayView< const float > &locally_owned_array, const std::vector< ArrayView< const float > > &shared_arrays, const ArrayView< float > &ghost_array, const ArrayView< float > &temporary_storage, std::vector< MPI_Request > &requests) const override
 
void export_to_ghosted_array_finish (const ArrayView< const float > &locally_owned_array, const std::vector< ArrayView< const float > > &shared_arrays, const ArrayView< float > &ghost_array, std::vector< MPI_Request > &requests) const override
 
void import_from_ghosted_array_start (const VectorOperation::values vector_operation, const unsigned int communication_channel, const ArrayView< const float > &locally_owned_array, const std::vector< ArrayView< const float > > &shared_arrays, const ArrayView< float > &ghost_array, const ArrayView< float > &temporary_storage, std::vector< MPI_Request > &requests) const override
 
void import_from_ghosted_array_finish (const VectorOperation::values vector_operation, const ArrayView< float > &locally_owned_storage, const std::vector< ArrayView< const float > > &shared_arrays, const ArrayView< float > &ghost_array, const ArrayView< const float > &temporary_storage, std::vector< MPI_Request > &requests) const override
 
void reset_ghost_values (const ArrayView< float > &ghost_array) const override
 

Private Member Functions

template<typename Number >
void export_to_ghosted_array_start_impl (const unsigned int communication_channel, const ArrayView< const Number > &locally_owned_array, const std::vector< ArrayView< const Number > > &shared_arrays, const ArrayView< Number > &ghost_array, const ArrayView< Number > &temporary_storage, std::vector< MPI_Request > &requests) const
 
template<typename Number >
void export_to_ghosted_array_finish_impl (const ArrayView< const Number > &locally_owned_array, const std::vector< ArrayView< const Number > > &shared_arrays, const ArrayView< Number > &ghost_array, std::vector< MPI_Request > &requests) const
 
template<typename Number >
void import_from_ghosted_array_start_impl (const VectorOperation::values vector_operation, const unsigned int communication_channel, const ArrayView< const Number > &locally_owned_array, const std::vector< ArrayView< const Number > > &shared_arrays, const ArrayView< Number > &ghost_array, const ArrayView< Number > &temporary_storage, std::vector< MPI_Request > &requests) const
 
template<typename Number >
void import_from_ghosted_array_finish_impl (const VectorOperation::values vector_operation, const ArrayView< Number > &locally_owned_storage, const std::vector< ArrayView< const Number > > &shared_arrays, const ArrayView< Number > &ghost_array, const ArrayView< const Number > &temporary_storage, std::vector< MPI_Request > &requests) const
 
template<typename Number >
void reset_ghost_values_impl (const ArrayView< Number > &ghost_array) const
 

Private Attributes

const MPI_Comm comm
 
const MPI_Comm comm_sm
 
const unsigned int n_local_elements
 
const unsigned int n_ghost_elements
 
const types::global_dof_index n_global_elements
 
std::vector< unsigned intn_ghost_indices_in_larger_set_by_remote_rank
 
std::pair< std::vector< unsigned int >, std::vector< std::pair< unsigned int, unsigned int > > > ghost_indices_subset_data
 
std::vector< std::array< unsigned int, 3 > > ghost_targets_data
 
std::vector< std::array< unsigned int, 3 > > import_targets_data
 
std::pair< std::vector< unsigned int >, std::vector< std::pair< unsigned int, unsigned int > > > import_indices_data
 
std::vector< unsigned intsm_ghost_ranks
 
std::pair< std::vector< unsigned int >, std::vector< std::pair< unsigned int, unsigned int > > > sm_export_data
 
std::pair< std::vector< unsigned int >, std::vector< std::pair< unsigned int, unsigned int > > > sm_export_data_this
 
std::vector< unsigned intsm_import_ranks
 
std::pair< std::vector< unsigned int >, std::vector< std::pair< unsigned int, unsigned int > > > sm_import_data
 
std::pair< std::vector< unsigned int >, std::vector< std::pair< unsigned int, unsigned int > > > sm_import_data_this
 

Detailed Description

Similar to the above but using the internal data structures in the partitioner in order to identify indices of degrees of freedom that are in the same shared memory region.

Definition at line 261 of file vector_data_exchange.h.

Constructor & Destructor Documentation

◆ Full()

internal::MatrixFreeFunctions::VectorDataExchange::Full::Full ( const std::shared_ptr< const Utilities::MPI::Partitioner > &  partitioner,
const MPI_Comm  communicator_sm 
)

Definition at line 371 of file vector_data_exchange.cc.

Member Function Documentation

◆ locally_owned_size()

unsigned int internal::MatrixFreeFunctions::VectorDataExchange::Full::locally_owned_size ( ) const
overridevirtual

◆ n_ghost_indices()

unsigned int internal::MatrixFreeFunctions::VectorDataExchange::Full::n_ghost_indices ( ) const
overridevirtual

◆ n_import_indices()

unsigned int internal::MatrixFreeFunctions::VectorDataExchange::Full::n_import_indices ( ) const
overridevirtual

◆ n_import_sm_procs()

unsigned int internal::MatrixFreeFunctions::VectorDataExchange::Full::n_import_sm_procs ( ) const
overridevirtual

◆ size()

types::global_dof_index internal::MatrixFreeFunctions::VectorDataExchange::Full::size ( ) const
overridevirtual

◆ get_sm_mpi_communicator()

MPI_Comm internal::MatrixFreeFunctions::VectorDataExchange::Full::get_sm_mpi_communicator ( ) const

Definition at line 1371 of file vector_data_exchange.cc.

◆ export_to_ghosted_array_start() [1/2]

void internal::MatrixFreeFunctions::VectorDataExchange::Full::export_to_ghosted_array_start ( const unsigned int  communication_channel,
const ArrayView< const double > &  locally_owned_array,
const std::vector< ArrayView< const double > > &  shared_arrays,
const ArrayView< double > &  ghost_array,
const ArrayView< double > &  temporary_storage,
std::vector< MPI_Request > &  requests 
) const
overridevirtual

◆ export_to_ghosted_array_finish() [1/2]

void internal::MatrixFreeFunctions::VectorDataExchange::Full::export_to_ghosted_array_finish ( const ArrayView< const double > &  locally_owned_array,
const std::vector< ArrayView< const double > > &  shared_arrays,
const ArrayView< double > &  ghost_array,
std::vector< MPI_Request > &  requests 
) const
overridevirtual

◆ import_from_ghosted_array_start() [1/2]

void internal::MatrixFreeFunctions::VectorDataExchange::Full::import_from_ghosted_array_start ( const VectorOperation::values  vector_operation,
const unsigned int  communication_channel,
const ArrayView< const double > &  locally_owned_array,
const std::vector< ArrayView< const double > > &  shared_arrays,
const ArrayView< double > &  ghost_array,
const ArrayView< double > &  temporary_storage,
std::vector< MPI_Request > &  requests 
) const
overridevirtual

◆ import_from_ghosted_array_finish() [1/2]

void internal::MatrixFreeFunctions::VectorDataExchange::Full::import_from_ghosted_array_finish ( const VectorOperation::values  vector_operation,
const ArrayView< double > &  locally_owned_storage,
const std::vector< ArrayView< const double > > &  shared_arrays,
const ArrayView< double > &  ghost_array,
const ArrayView< const double > &  temporary_storage,
std::vector< MPI_Request > &  requests 
) const
overridevirtual

◆ reset_ghost_values() [1/2]

void internal::MatrixFreeFunctions::VectorDataExchange::Full::reset_ghost_values ( const ArrayView< double > &  ghost_array) const
overridevirtual

◆ export_to_ghosted_array_start() [2/2]

void internal::MatrixFreeFunctions::VectorDataExchange::Full::export_to_ghosted_array_start ( const unsigned int  communication_channel,
const ArrayView< const float > &  locally_owned_array,
const std::vector< ArrayView< const float > > &  shared_arrays,
const ArrayView< float > &  ghost_array,
const ArrayView< float > &  temporary_storage,
std::vector< MPI_Request > &  requests 
) const
overridevirtual

◆ export_to_ghosted_array_finish() [2/2]

void internal::MatrixFreeFunctions::VectorDataExchange::Full::export_to_ghosted_array_finish ( const ArrayView< const float > &  locally_owned_array,
const std::vector< ArrayView< const float > > &  shared_arrays,
const ArrayView< float > &  ghost_array,
std::vector< MPI_Request > &  requests 
) const
overridevirtual

◆ import_from_ghosted_array_start() [2/2]

void internal::MatrixFreeFunctions::VectorDataExchange::Full::import_from_ghosted_array_start ( const VectorOperation::values  vector_operation,
const unsigned int  communication_channel,
const ArrayView< const float > &  locally_owned_array,
const std::vector< ArrayView< const float > > &  shared_arrays,
const ArrayView< float > &  ghost_array,
const ArrayView< float > &  temporary_storage,
std::vector< MPI_Request > &  requests 
) const
overridevirtual

◆ import_from_ghosted_array_finish() [2/2]

void internal::MatrixFreeFunctions::VectorDataExchange::Full::import_from_ghosted_array_finish ( const VectorOperation::values  vector_operation,
const ArrayView< float > &  locally_owned_storage,
const std::vector< ArrayView< const float > > &  shared_arrays,
const ArrayView< float > &  ghost_array,
const ArrayView< const float > &  temporary_storage,
std::vector< MPI_Request > &  requests 
) const
overridevirtual

◆ reset_ghost_values() [2/2]

void internal::MatrixFreeFunctions::VectorDataExchange::Full::reset_ghost_values ( const ArrayView< float > &  ghost_array) const
overridevirtual

◆ export_to_ghosted_array_start_impl()

template<typename Number >
void internal::MatrixFreeFunctions::VectorDataExchange::Full::export_to_ghosted_array_start_impl ( const unsigned int  communication_channel,
const ArrayView< const Number > &  locally_owned_array,
const std::vector< ArrayView< const Number > > &  shared_arrays,
const ArrayView< Number > &  ghost_array,
const ArrayView< Number > &  temporary_storage,
std::vector< MPI_Request > &  requests 
) const
private

Definition at line 837 of file vector_data_exchange.cc.

◆ export_to_ghosted_array_finish_impl()

template<typename Number >
void internal::MatrixFreeFunctions::VectorDataExchange::Full::export_to_ghosted_array_finish_impl ( const ArrayView< const Number > &  locally_owned_array,
const std::vector< ArrayView< const Number > > &  shared_arrays,
const ArrayView< Number > &  ghost_array,
std::vector< MPI_Request > &  requests 
) const
private

Definition at line 937 of file vector_data_exchange.cc.

◆ import_from_ghosted_array_start_impl()

template<typename Number >
void internal::MatrixFreeFunctions::VectorDataExchange::Full::import_from_ghosted_array_start_impl ( const VectorOperation::values  vector_operation,
const unsigned int  communication_channel,
const ArrayView< const Number > &  locally_owned_array,
const std::vector< ArrayView< const Number > > &  shared_arrays,
const ArrayView< Number > &  ghost_array,
const ArrayView< Number > &  temporary_storage,
std::vector< MPI_Request > &  requests 
) const
private

Definition at line 1076 of file vector_data_exchange.cc.

◆ import_from_ghosted_array_finish_impl()

template<typename Number >
void internal::MatrixFreeFunctions::VectorDataExchange::Full::import_from_ghosted_array_finish_impl ( const VectorOperation::values  vector_operation,
const ArrayView< Number > &  locally_owned_storage,
const std::vector< ArrayView< const Number > > &  shared_arrays,
const ArrayView< Number > &  ghost_array,
const ArrayView< const Number > &  temporary_storage,
std::vector< MPI_Request > &  requests 
) const
private

Definition at line 1205 of file vector_data_exchange.cc.

◆ reset_ghost_values_impl()

template<typename Number >
void internal::MatrixFreeFunctions::VectorDataExchange::Full::reset_ghost_values_impl ( const ArrayView< Number > &  ghost_array) const
private

Definition at line 1396 of file vector_data_exchange.cc.

Member Data Documentation

◆ comm

const MPI_Comm internal::MatrixFreeFunctions::VectorDataExchange::Full::comm
private

Global communicator.

Definition at line 410 of file vector_data_exchange.h.

◆ comm_sm

const MPI_Comm internal::MatrixFreeFunctions::VectorDataExchange::Full::comm_sm
private

Shared-memory sub-communicator.

Definition at line 415 of file vector_data_exchange.h.

◆ n_local_elements

const unsigned int internal::MatrixFreeFunctions::VectorDataExchange::Full::n_local_elements
private

Number of locally-owned vector entries.

Definition at line 420 of file vector_data_exchange.h.

◆ n_ghost_elements

const unsigned int internal::MatrixFreeFunctions::VectorDataExchange::Full::n_ghost_elements
private

Number of ghost vector entries.

Definition at line 425 of file vector_data_exchange.h.

◆ n_global_elements

const types::global_dof_index internal::MatrixFreeFunctions::VectorDataExchange::Full::n_global_elements
private

Number of global vector entries.

Definition at line 430 of file vector_data_exchange.h.

◆ n_ghost_indices_in_larger_set_by_remote_rank

std::vector<unsigned int> internal::MatrixFreeFunctions::VectorDataExchange::Full::n_ghost_indices_in_larger_set_by_remote_rank
private

A variable caching the number of ghost indices in a larger set of indices by rank.

Definition at line 436 of file vector_data_exchange.h.

◆ ghost_indices_subset_data

std::pair<std::vector<unsigned int>, std::vector<std::pair<unsigned int, unsigned int> > > internal::MatrixFreeFunctions::VectorDataExchange::Full::ghost_indices_subset_data
private

The set of indices that appear for an IndexSet that is a subset of a larger set for each rank in a compressed manner.

Definition at line 444 of file vector_data_exchange.h.

◆ ghost_targets_data

std::vector<std::array<unsigned int, 3> > internal::MatrixFreeFunctions::VectorDataExchange::Full::ghost_targets_data
private

An array that contains information which processors my ghost indices belong to, at which offset and how many those indices are

Definition at line 450 of file vector_data_exchange.h.

◆ import_targets_data

std::vector<std::array<unsigned int, 3> > internal::MatrixFreeFunctions::VectorDataExchange::Full::import_targets_data
private

The set of processors and length of data field which send us their ghost data.

Note
Structured as ghost_targets_data.

Definition at line 458 of file vector_data_exchange.h.

◆ import_indices_data

std::pair<std::vector<unsigned int>, std::vector<std::pair<unsigned int, unsigned int> > > internal::MatrixFreeFunctions::VectorDataExchange::Full::import_indices_data
private

An array that caches the number of chunks in the import indices per MPI rank. The length is import_indices_data.size()+1.

The set of (local) indices that we are importing during compress() from remote processes, i.e., others' ghosts that belong to the local range.

Definition at line 470 of file vector_data_exchange.h.

◆ sm_ghost_ranks

std::vector<unsigned int> internal::MatrixFreeFunctions::VectorDataExchange::Full::sm_ghost_ranks
private

Shared-memory ranks from which data is copied from during export_to_ghosted_array_finish().

Definition at line 476 of file vector_data_exchange.h.

◆ sm_export_data

std::pair<std::vector<unsigned int>, std::vector<std::pair<unsigned int, unsigned int> > > internal::MatrixFreeFunctions::VectorDataExchange::Full::sm_export_data
private

Indices from where to copy data from during export_to_ghosted_array_finish().

Definition at line 484 of file vector_data_exchange.h.

◆ sm_export_data_this

std::pair<std::vector<unsigned int>, std::vector<std::pair<unsigned int, unsigned int> > > internal::MatrixFreeFunctions::VectorDataExchange::Full::sm_export_data_this
private

Indices where to copy data to during export_to_ghosted_array_finish().

Definition at line 492 of file vector_data_exchange.h.

◆ sm_import_ranks

std::vector<unsigned int> internal::MatrixFreeFunctions::VectorDataExchange::Full::sm_import_ranks
private

Shared-memory ranks from where to copy data from during import_from_ghosted_array_finish().

Definition at line 498 of file vector_data_exchange.h.

◆ sm_import_data

std::pair<std::vector<unsigned int>, std::vector<std::pair<unsigned int, unsigned int> > > internal::MatrixFreeFunctions::VectorDataExchange::Full::sm_import_data
private

Indices from where to copy data from during import_from_ghosted_array_finish().

Definition at line 506 of file vector_data_exchange.h.

◆ sm_import_data_this

std::pair<std::vector<unsigned int>, std::vector<std::pair<unsigned int, unsigned int> > > internal::MatrixFreeFunctions::VectorDataExchange::Full::sm_import_data_this
private

Indices where to copy data to during import_from_ghosted_array_finish().

Definition at line 514 of file vector_data_exchange.h.


The documentation for this class was generated from the following files: