1#ifndef included_AMP_SubsetCommSelfVectorData
2#define included_AMP_SubsetCommSelfVectorData
4#include "AMP/discretization/DOF_Manager.h"
5#include "AMP/discretization/subsetCommSelfDOFManager.h"
6#include "AMP/vectors/Vector.h"
7#include "AMP/vectors/data/SubsetVectorData.h"
8#include "AMP/vectors/data/VectorData.h"
26 return "SubsetCommSelfVectorData of " +
d_parentData->VectorDataName();
40 std::shared_ptr<VectorData>
cloneData(
const std::string &name =
"" )
const override;
Provides C++ wrapper around MPI routines.
This vector is a subset of an AMP Vector.
void setGhostValuesByGlobalID(size_t, const size_t *, const void *, const typeID &) override
Set ghost values using global identifier.
void dataChanged() override
Notify listeners that data has changed in this vector.
size_t numberOfDataBlocks() const override
Number of blocks of contiguous data in the Vector.
void addGhostValuesByGlobalID(size_t, const size_t *, const void *, const typeID &) override
Add shared values using global identifier.
bool containsGlobalElement(size_t) const override
void getRawData(void *out, const typeID &id) const override
Copy data out of this vector.
size_t sizeOfDataBlock(size_t i) const override
Number of elements in a data block.
void swapData(VectorData &) override
Swap the data with another VectorData object.
size_t sizeofDataBlockType(size_t) const override
Return the result of sizeof(TYPE) for the given data block.
const void * getRawDataBlockAsVoid(size_t i) const override
Return a pointer to a particular block of memory in the vector.
size_t getGhostSize() const override
Number of entries "owned" by other cores stored on this core.
void getGhostAddValuesByGlobalID(size_t, const size_t *, void *, const typeID &) const override
get ghosted values to add to off-proc elements
void makeConsistent() override
Update shared values on entire communicator.
SubsetCommSelfVectorData()
void putRawData(const void *in, const typeID &id) override
Copy data into this vector.
bool hasContiguousData() const override
returns whether all data for the vector on a single process is contiguous
void setCommunicationList(std::shared_ptr< CommunicationList >) override
Set the CommunicationList for this Vector.
const AMP_MPI & getComm() const override
Get the communicator.
std::vector< size_t > d_SubsetLocalIDToViewGlobalID
bool hasGhosts() const override
Check if any entries "owned" by other cores are stored on this core.
void fillGhosts(const Scalar &) override
Zero all ghost data (does not modify consistent status)
void makeConsistent(ScatterType) override
Update shared values on entire communicator.
uint64_t getDataID() const override
A unique id for the underlying data allocation.
typeID getType(size_t block) const override
Return the typeid of the given block.
void dumpGhostedData(std::ostream &, size_t) const override
Write data owned by other processors to an std::ostream.
void copyGhostValues(const VectorData &) override
Copy ghosted vlues to a vector.
std::string VectorDataName() const override
Get the type name.
void getGhostValuesByGlobalID(size_t, const size_t *, void *, const typeID &) const override
Get ghost values in the vector by their global offset.
std::shared_ptr< UpdateState > getUpdateStatusPtr() const override
Return the current update state of this Vector.
void addValuesByLocalID(size_t, const size_t *, const void *, const typeID &) override
Add values to vector entities by their local offset.
void setUpdateStatus(UpdateState state) override
Sets the current update state of the Vector.
std::shared_ptr< CommunicationList > getCommunicationList() const override
Get the CommunicationList for this Vector.
UpdateState getLocalUpdateStatus() const override
Return the current update state of the Vector.
std::shared_ptr< UpdateState > d_UpdateState
void setUpdateStatusPtr(std::shared_ptr< UpdateState > rhs) override
Tie the current update state to another.
std::shared_ptr< VectorData > cloneData(const std::string &name="") const override
Clone the data.
SubsetCommSelfVectorData(std::shared_ptr< VectorData > data)
void * getRawDataBlockAsVoid(size_t i) override
Return a pointer to a particular block of memory in the vector.
void setValuesByLocalID(size_t, const size_t *, const void *, const typeID &) override
Set values in the vector by their local offset.
std::shared_ptr< VectorData > d_parentData
size_t getAllGhostValues(void *, const typeID &) const override
Get all ghost values in the vector.
void getValuesByLocalID(size_t, const size_t *, void *, const typeID &) const override
Get local values in the vector by their global offset.
A class used to hold vector data.
void getGhostAddValuesByGlobalID(size_t num, const size_t *indices, TYPE *vals) const
get ghosted values to add to off-proc elements
void addGhostValuesByGlobalID(size_t num, const size_t *indices, const TYPE *vals)
Add shared values using global identifier.
void setGhostValuesByGlobalID(size_t num, const size_t *indices, const TYPE *vals)
Set ghost values using global identifier.
void getGhostValuesByGlobalID(size_t num, const size_t *indices, TYPE *vals) const
Get ghost values in the vector by their global offset.
Scalar is a class used to store a scalar variable that may be different types/precision.
UpdateState
The four states a Vector can be in.
ScatterType
Flag to choose algorithm for makeConsistent.
Class to store type info.