Chi-Tech
chi_math::VectorGhostCommunicator Class Reference

#include <vector_ghost_communicator.h>

Data Structures

struct  CachedParallelData
 

Public Member Functions

 VectorGhostCommunicator (uint64_t local_size, uint64_t global_size, const std::vector< int64_t > &ghost_ids, MPI_Comm communicator)
 
 VectorGhostCommunicator (const VectorGhostCommunicator &other)
 
 VectorGhostCommunicator (VectorGhostCommunicator &&other) noexcept
 
uint64_t LocalSize () const
 
uint64_t GlobalSize () const
 
uint64_t NumGhosts () const
 
const std::vector< int64_t > & GhostIndices () const
 
MPI_Comm Communicator () const
 
int64_t MapGhostToLocal (int64_t ghost_id) const
 
void CommunicateGhostEntries (std::vector< double > &ghosted_vector) const
 
std::vector< double > MakeGhostedVector () const
 
std::vector< double > MakeGhostedVector (const std::vector< double > &local_vector) const
 

Protected Attributes

const uint64_t local_size_
 
const uint64_t global_size_
 
const std::vector< int64_t > ghost_ids_
 
const MPI_Comm comm_
 
const int location_id_
 
const int process_count_
 
const std::vector< uint64_t > extents_
 
const CachedParallelData cached_parallel_data_
 

Private Member Functions

int FindOwnerPID (int64_t global_id) const
 
CachedParallelData MakeCachedParallelData ()
 

Detailed Description

Vector with allocation space for ghosts.

Definition at line 14 of file vector_ghost_communicator.h.

Constructor & Destructor Documentation

◆ VectorGhostCommunicator() [1/3]

chi_math::VectorGhostCommunicator::VectorGhostCommunicator ( uint64_t  local_size,
uint64_t  global_size,
const std::vector< int64_t > &  ghost_ids,
MPI_Comm  communicator 
)

Definition at line 17 of file vector_ghost_communicator.cc.

◆ VectorGhostCommunicator() [2/3]

chi_math::VectorGhostCommunicator::VectorGhostCommunicator ( const VectorGhostCommunicator other)

Copy constructor.

Definition at line 125 of file vector_ghost_communicator.cc.

◆ VectorGhostCommunicator() [3/3]

chi_math::VectorGhostCommunicator::VectorGhostCommunicator ( VectorGhostCommunicator &&  other)
noexcept

Move constructor.

Definition at line 138 of file vector_ghost_communicator.cc.

Member Function Documentation

◆ CommunicateGhostEntries()

void chi_math::VectorGhostCommunicator::CommunicateGhostEntries ( std::vector< double > &  ghosted_vector) const

Definition at line 167 of file vector_ghost_communicator.cc.

◆ Communicator()

MPI_Comm chi_math::VectorGhostCommunicator::Communicator ( ) const
inline

Definition at line 35 of file vector_ghost_communicator.h.

◆ FindOwnerPID()

int chi_math::VectorGhostCommunicator::FindOwnerPID ( int64_t  global_id) const
private

Definition at line 233 of file vector_ghost_communicator.cc.

◆ GhostIndices()

const std::vector< int64_t > & chi_math::VectorGhostCommunicator::GhostIndices ( ) const
inline

Definition at line 33 of file vector_ghost_communicator.h.

◆ GlobalSize()

uint64_t chi_math::VectorGhostCommunicator::GlobalSize ( ) const
inline

Definition at line 30 of file vector_ghost_communicator.h.

◆ LocalSize()

uint64_t chi_math::VectorGhostCommunicator::LocalSize ( ) const
inline

Definition at line 29 of file vector_ghost_communicator.h.

◆ MakeCachedParallelData()

VectorGhostCommunicator::CachedParallelData chi_math::VectorGhostCommunicator::MakeCachedParallelData ( )
private

Definition at line 34 of file vector_ghost_communicator.cc.

◆ MakeGhostedVector() [1/2]

std::vector< double > chi_math::VectorGhostCommunicator::MakeGhostedVector ( ) const

Definition at line 210 of file vector_ghost_communicator.cc.

◆ MakeGhostedVector() [2/2]

std::vector< double > chi_math::VectorGhostCommunicator::MakeGhostedVector ( const std::vector< double > &  local_vector) const

Definition at line 217 of file vector_ghost_communicator.cc.

◆ MapGhostToLocal()

int64_t chi_math::VectorGhostCommunicator::MapGhostToLocal ( int64_t  ghost_id) const

Definition at line 152 of file vector_ghost_communicator.cc.

◆ NumGhosts()

uint64_t chi_math::VectorGhostCommunicator::NumGhosts ( ) const
inline

Definition at line 32 of file vector_ghost_communicator.h.

Field Documentation

◆ cached_parallel_data_

const CachedParallelData chi_math::VectorGhostCommunicator::cached_parallel_data_
protected

Definition at line 66 of file vector_ghost_communicator.h.

◆ comm_

const MPI_Comm chi_math::VectorGhostCommunicator::comm_
protected

Definition at line 49 of file vector_ghost_communicator.h.

◆ extents_

const std::vector<uint64_t> chi_math::VectorGhostCommunicator::extents_
protected

Definition at line 53 of file vector_ghost_communicator.h.

◆ ghost_ids_

const std::vector<int64_t> chi_math::VectorGhostCommunicator::ghost_ids_
protected

Definition at line 48 of file vector_ghost_communicator.h.

◆ global_size_

const uint64_t chi_math::VectorGhostCommunicator::global_size_
protected

Definition at line 47 of file vector_ghost_communicator.h.

◆ local_size_

const uint64_t chi_math::VectorGhostCommunicator::local_size_
protected

Definition at line 46 of file vector_ghost_communicator.h.

◆ location_id_

const int chi_math::VectorGhostCommunicator::location_id_
protected

Definition at line 51 of file vector_ghost_communicator.h.

◆ process_count_

const int chi_math::VectorGhostCommunicator::process_count_
protected

Definition at line 52 of file vector_ghost_communicator.h.


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