Class GhostedParallelSTLVector
Defined in File ghosted_parallel_stl_vector.h
Inheritance Relationships
Base Type
public opensn::ParallelSTLVector
(Class ParallelSTLVector)
Class Documentation
-
class GhostedParallelSTLVector : public opensn::ParallelSTLVector
Public Functions
-
inline GhostedParallelSTLVector(uint64_t local_size, uint64_t global_size, const std::vector<int64_t> &ghost_ids, const mpi::Communicator &communicator = MPI_COMM_WORLD)
Initialize the ghosted parallel vector with the given local and global sizes, with the specified global ghost indices.
-
inline explicit GhostedParallelSTLVector(const VectorGhostCommunicator &ghost_comm)
Initialize a ghosted parallel vector from a ghost communicator.
-
GhostedParallelSTLVector(const GhostedParallelSTLVector &other) = default
Copy constructor.
-
GhostedParallelSTLVector(GhostedParallelSTLVector &&other) noexcept = default
Move constructor.
-
virtual std::unique_ptr<ParallelVector> MakeCopy() const override
Creates a copy of the vector datastructures AND values. This routine requires no communication.
-
virtual std::unique_ptr<ParallelVector> MakeClone() const override
Creates a copy of the vector datastructures but NOT the values. The values are defaulted to zero. This routine requires no communication.
-
inline uint64_t GetNumGhosts() const
Return the number of ghosts associated with the local vector.
-
inline uint64_t GetLocalSizeWithGhosts() const
Return the total size of the local vector, including ghosts.
-
inline const std::vector<int64_t> &GetGhostIndices() const
Return the ghost indices associated with the local vector.
-
inline int64_t MapGhostToLocal(const int64_t ghost_id) const
Map a global ghost id to its respective local id.
-
inline std::vector<double> MakeGhostedLocalVector() const
Return a vector containing the locally owned data and ghost data.
-
double GetGlobalValue(int64_t global_id) const
Return the value of the parallel vector for the specified global index.
An error is thrown if the global index does not belong to a locally owned, or ghost entry.
-
inline virtual void CommunicateGhostEntries() override
Communicate the current ghost entries to all other processes to update the locally stored ghost data.
-
inline GhostedParallelSTLVector(uint64_t local_size, uint64_t global_size, const std::vector<int64_t> &ghost_ids, const mpi::Communicator &communicator = MPI_COMM_WORLD)