A class used to hold vector data. More...
#include <VectorData.h>

Public Member Functions | |
| template<class TYPE > | |
| void | addGhostValuesByGlobalID (size_t num, const size_t *indices, const TYPE *vals) |
| Add shared values using global identifier. | |
| virtual void | addGhostValuesByGlobalID (size_t num, const size_t *indices, const void *vals, const typeID &id)=0 |
| Add shared values using global identifier. | |
| template<class TYPE > | |
| void | addValuesByGlobalID (size_t num, const size_t *indices, const TYPE *vals) |
| Add owned or shared values using global identifier. | |
| template<class TYPE > | |
| void | addValuesByLocalID (size_t num, const size_t *indices, const TYPE *vals) |
| Add values to vector entities by their local offset. | |
| virtual void | addValuesByLocalID (size_t num, const size_t *indices, const void *vals, const typeID &id)=0 |
| Add values to vector entities by their local offset. | |
| virtual void | assemble () |
| This method is used to implement the assemble interface of PETSc. | |
| template<class TYPE = double> | |
| VectorDataIterator< TYPE > | begin () |
| Return an iterator to the beginning of the data. | |
| template<class TYPE = double> | |
| VectorDataIterator< const TYPE > | begin () const |
| Return an iterator to the beginning of the data. | |
| virtual std::shared_ptr< VectorData > | cloneData (const std::string &name="") const =0 |
| Clone the data. | |
| template<class TYPE = double> | |
| VectorDataIterator< const TYPE > | constBegin () const |
| Return an iterator to the beginning of the data. | |
| template<class TYPE = double> | |
| VectorDataIterator< const TYPE > | constEnd () const |
| Return an iterator to the end of the data. | |
| virtual bool | containsGlobalElement (size_t GID) const =0 |
| virtual void | copyGhostValues (const VectorData &rhs)=0 |
| Copy ghosted vlues to a vector. | |
| virtual void | dataChanged ()=0 |
| Notify listeners that data has changed in this vector. | |
| virtual void | deregisterListener (DataChangeListener *listener) |
| Deregister a listener with this DataChangeFirer. | |
| virtual void | dumpGhostedData (std::ostream &out, size_t offset=0) const =0 |
| Write data owned by other processors to an std::ostream. | |
| virtual void | dumpOwnedData (std::ostream &out, size_t GIDoffset=0, size_t LIDoffset=0) const |
| Write owned data to an std::ostream. | |
| template<class TYPE = double> | |
| VectorDataIterator< TYPE > | end () |
| Return an iterator to the end of the data. | |
| template<class TYPE = double> | |
| VectorDataIterator< const TYPE > | end () const |
| Return an iterator to the end of the data. | |
| virtual void | fillGhosts (const Scalar &x)=0 |
| Zero all ghost data (does not modify consistent status) | |
| virtual void | fireDataChange () |
| Notify all listeners of a data change event. | |
| template<class TYPE > | |
| size_t | getAllGhostValues (TYPE *vals) const |
| Get all ghost values. | |
| virtual size_t | getAllGhostValues (void *vals, const typeID &id) const =0 |
| Get all ghost values in the vector. | |
| virtual const AMP_MPI & | getComm () const =0 |
| Get the communicator. | |
| virtual std::shared_ptr< CommunicationList > | getCommunicationList () const =0 |
| Get the CommunicationList for this Vector. | |
| virtual std::shared_ptr< VectorData > | getComponent (size_t i=0) |
| Number of elements in the ith component. | |
| virtual std::shared_ptr< const VectorData > | getComponent (size_t i=0) const |
| Number of elements in the ith component. | |
| virtual uint64_t | getDataID () const =0 |
| A unique id for the underlying data allocation. | |
| template<class TYPE > | |
| void | getGhostAddValuesByGlobalID (size_t num, const size_t *indices, TYPE *vals) const |
| get ghosted values to add to off-proc elements | |
| virtual void | getGhostAddValuesByGlobalID (size_t num, const size_t *indices, void *vals, const typeID &id) const =0 |
| get ghosted values to add to off-proc elements | |
| virtual size_t | getGhostSize () const =0 |
| Number of entries "owned" by other cores stored on this core. | |
| template<class TYPE > | |
| void | getGhostValuesByGlobalID (size_t num, const size_t *indices, TYPE *vals) const |
| Get ghost values in the vector by their global offset. | |
| virtual void | getGhostValuesByGlobalID (size_t num, const size_t *indices, void *vals, const typeID &id) const =0 |
| Get ghost values in the vector by their global offset. | |
| size_t | getGlobalSize () const |
| Number of total entries in this vector across all cores. | |
| UpdateState | getGlobalUpdateStatus () const |
| Return the current update state of the Vector. | |
| uint64_t | getID () const |
| Get a unique id hash for the vector. | |
| size_t | getLocalSize () const |
| Number of elements "owned" by this core. | |
| virtual std::vector< size_t > | getLocalSizes () const |
| The local sizes on each rank. | |
| size_t | getLocalStartID () const |
| get local start id core. | |
| virtual UpdateState | getLocalUpdateStatus () const =0 |
| Return the current update state of the Vector. | |
| virtual AMP::Utilities::MemoryType | getMemoryLocation () const |
| returns the memory location for data | |
| virtual size_t | getNumberOfComponents () const |
| Return integer number of data components. | |
| template<class TYPE > | |
| void | getRawData (TYPE *buf) const |
| Copy data out of this vector. | |
| virtual void | getRawData (void *buf, const typeID &id) const =0 |
| Copy data out of this vector. | |
| template<typename RETURN_TYPE > | |
| RETURN_TYPE * | getRawDataBlock (size_t i=0) |
| Obtain a particular contiguous block of data cast to RETURN_TYPE. | |
| template<typename RETURN_TYPE > | |
| const RETURN_TYPE * | getRawDataBlock (size_t i=0) const |
| Obtain a particular contiguous block of data cast to RETURN_TYPE. | |
| virtual const void * | getRawDataBlockAsVoid (size_t i) const =0 |
| Return a pointer to a particular block of memory in the vector. | |
| virtual void * | getRawDataBlockAsVoid (size_t i)=0 |
| Return a pointer to a particular block of memory in the vector. | |
| virtual typeID | getType (size_t block) const =0 |
| Return the typeid of the given block. | |
| virtual std::shared_ptr< UpdateState > | getUpdateStatusPtr () const =0 |
| Return the current update state of this Vector. | |
| template<class TYPE > | |
| void | getValuesByGlobalID (size_t num, const size_t *indices, TYPE *vals) const |
| get values in the vector by their local offset | |
| template<class TYPE > | |
| void | getValuesByLocalID (size_t num, const size_t *indices, TYPE *vals) const |
| Get local values in the vector by their global offset. | |
| virtual void | getValuesByLocalID (size_t num, const size_t *indices, void *vals, const typeID &id) const =0 |
| Get local values in the vector by their global offset. | |
| virtual bool | hasContiguousData () const |
| returns whether all data for the vector on a single process is contiguous | |
| virtual bool | hasGhosts () const =0 |
| Check if any entries "owned" by other cores are stored on this core. | |
| virtual bool | isAnAliasOf (const VectorData &rhs) const |
| Check if the two VectorData objects are alias of each other. | |
| template<typename TYPE > | |
| bool | isBlockType (size_t i=0) const |
| Check if the data is of the given type. | |
| template<typename TYPE > | |
| bool | isType () const |
| Check if the data is of the given type. | |
| bool | isType (const typeID &id, size_t block) const |
| Is the data of the given type. | |
| virtual void | makeConsistent () |
| Update shared values on entire communicator. | |
| virtual void | makeConsistent (ScatterType t)=0 |
| Update shared values on entire communicator. | |
| virtual size_t | numberOfDataBlocks () const =0 |
| Number of blocks of contiguous data in the Vector. | |
| virtual void | print (std::ostream &os, const std::string &name="A", const std::string &prefix="") const |
| template<class TYPE > | |
| void | putRawData (const TYPE *buf) |
| Copy data into this vector. | |
| virtual void | putRawData (const void *buf, const typeID &id)=0 |
| Copy data into this vector. | |
| virtual void | registerChildObjects (AMP::IO::RestartManager *manager) const |
| Register any child objects. | |
| virtual void | registerListener (DataChangeListener *listener) |
| Register a listener with this DataChangeFirer. | |
| virtual void | registerListener (std::shared_ptr< DataChangeListener > listener) |
| Register a listener with this DataChangeFirer. | |
| virtual void | reset () |
| reset the vector data object | |
| virtual void | setCommunicationList (std::shared_ptr< CommunicationList > comm)=0 |
| Set the CommunicationList for this Vector. | |
| template<class TYPE > | |
| void | setGhostValuesByGlobalID (size_t num, const size_t *indices, const TYPE *vals) |
| Set ghost values using global identifier. | |
| virtual void | setGhostValuesByGlobalID (size_t num, const size_t *indices, const void *vals, const typeID &id)=0 |
| Set ghost values using global identifier. | |
| virtual void | setNoGhosts () |
| Ensure this vector has no ghosts. | |
| virtual void | setUpdateStatus (UpdateState state)=0 |
| Sets the current update state of the Vector. | |
| virtual void | setUpdateStatusPtr (std::shared_ptr< UpdateState > rhs)=0 |
| Tie the current update state to another. | |
| template<class TYPE > | |
| void | setValuesByGlobalID (size_t num, const size_t *indices, const TYPE *vals) |
| Set owned or shared values using global identifier. | |
| template<class TYPE > | |
| void | setValuesByLocalID (size_t num, const size_t *indices, const TYPE *vals) |
| Set values in the vector by their local offset. | |
| virtual void | setValuesByLocalID (size_t num, const size_t *indices, const void *vals, const typeID &id)=0 |
| Set values in the vector by their local offset. | |
| std::shared_ptr< VectorData > | shared_from_this () |
| std::shared_ptr< const VectorData > | shared_from_this () const |
| virtual size_t | sizeOfDataBlock (size_t i=0) const =0 |
| Number of elements in a data block. | |
| virtual size_t | sizeofDataBlockType (size_t i) const =0 |
| Return the result of sizeof(TYPE) for the given data block. | |
| virtual void | swapData (VectorData &rhs)=0 |
| Swap the data with another VectorData object. | |
| VectorData ()=default | |
| Default constructors. | |
| VectorData (const VectorData &)=delete | |
| VectorData (int64_t fid, AMP::IO::RestartManager *manager) | |
| virtual std::string | VectorDataName () const =0 |
| Get the type name. | |
| virtual void | writeRestart (int64_t fid) const |
| Write restart data to file. | |
| virtual | ~VectorData () |
| Virtual destructor. | |
Protected Attributes | |
| size_t | d_globalSize = 0 |
| Number of local values. | |
| size_t | d_localSize = 0 |
| size_t | d_localStart = 0 |
| Number of global values. | |
| std::weak_ptr< VectorData > | weak_ptr_ |
Private Attributes | |
| std::vector< DataChangeListener * > | d_listeners |
Friends | |
| class | VectorOperations |
| Index of first local value. | |
A class used to hold vector data.
VectorData is a class to helping disassociate data storage and vector operations such as dot product, norms, etc. When indexing VectorData (and Vector) the local index runs from [0,getLocalSize()) and the global indexing (for the local elements) runs from [getLocalStartID(),getLocalStartID+getLocalSize())
Definition at line 37 of file VectorData.h.
|
inlinevirtual |
Virtual destructor.
Definition at line 41 of file VectorData.h.
| AMP::LinearAlgebra::VectorData::VectorData | ( | int64_t | fid, |
| AMP::IO::RestartManager * | manager | ||
| ) |
|
default |
Default constructors.
|
delete |
| void AMP::LinearAlgebra::VectorData::addGhostValuesByGlobalID | ( | size_t | num, |
| const size_t * | indices, | ||
| const TYPE * | vals | ||
| ) |
Add shared values using global identifier.
| [in] | num | number of values to add |
| [in] | indices | the indices of the values to add |
| [in] | vals | the values to place in the vector |
|
pure virtual |
Add shared values using global identifier.
| [in] | num | number of values to add |
| [in] | indices | the indices of the values to add |
| [in] | vals | the values to place in the vector |
| [in] | id | typeID of raw data |
Implemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
| void AMP::LinearAlgebra::VectorData::addValuesByGlobalID | ( | size_t | num, |
| const size_t * | indices, | ||
| const TYPE * | vals | ||
| ) |
Add owned or shared values using global identifier.
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [in] | vals | the values to place in the vector |
Since the shared buffer and owned buffer are separate, this function must sort the data by buffer before setting values.
| void AMP::LinearAlgebra::VectorData::addValuesByLocalID | ( | size_t | num, |
| const size_t * | indices, | ||
| const TYPE * | vals | ||
| ) |
Add values to vector entities by their local offset.
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [in] | vals | the values to place in the vector |
This will set the owned values for this core. All indices are from 0. \( \mathit{this}_{\mathit{indices}_i} = \mathit{this}_{\mathit{indices}_i} + \mathit{vals}_i \)
|
pure virtual |
Add values to vector entities by their local offset.
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [in] | vals | the values to place in the vector |
| [in] | id | typeID of raw data |
This will set the owned values for this core. All indices are from 0. \( \mathit{this}_{\mathit{indices}_i} = \mathit{this}_{\mathit{indices}_i} + \mathit{vals}_i \)
Implemented in AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::EpetraVectorData, AMP::LinearAlgebra::NativeThyraVectorData, and AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >.
|
inlinevirtual |
This method is used to implement the assemble interface of PETSc.
This method is empty except for instantiations of NativePetscVectorData
Reimplemented in AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, and AMP::LinearAlgebra::NativePetscVectorData.
Definition at line 631 of file VectorData.h.
|
inline |
Return an iterator to the beginning of the data.
Since the Vector presents an interface to a contiguous block of data, it is natural for it to provide a random access iterator.
|
inline |
Return an iterator to the beginning of the data.
Since the Vector presents an interface to a contiguous block of data, it is natural for it to provide a random access iterator.
|
pure virtual |
Clone the data.
Implemented in AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::EpetraVectorData, AMP::LinearAlgebra::NativeThyraVectorData, and AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >.
|
inline |
Return an iterator to the beginning of the data.
Since the Vector presents an interface to a contiguous block of data, it is natural for it to provide a random access iterator.
|
inline |
Return an iterator to the end of the data.
Since the Vector presents an interface to a contiguous block of data, it is natural for it to provide a random access iterator.
|
pure virtual |
Implemented in AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
|
pure virtual |
Copy ghosted vlues to a vector.
| [in] | rhs | Vector to copy ghost values from |
This ensures that ghosted values on this and rhs are the same without a call to makeConsistent.
Implemented in AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, and AMP::LinearAlgebra::MultiVectorData.
|
pure virtual |
Notify listeners that data has changed in this vector.
Implemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
|
virtualinherited |
Deregister a listener with this DataChangeFirer.
| [in] | listener | The listener to remove from the list |
Removes a listener from itself.
|
pure virtual |
Write data owned by other processors to an std::ostream.
| [in] | out | The output stream to write to. |
| [in] | offset | A number to add to the global ID when writing information |
Implemented in AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, and AMP::LinearAlgebra::MultiVectorData.
|
virtual |
Write owned data to an std::ostream.
| [in] | out | The output stream to write to. |
| [in] | GIDoffset | A number to add to the global ID when writing information |
| [in] | LIDoffset | A number to add to the local ID when writing information |
Reimplemented in AMP::LinearAlgebra::MultiVectorData.
|
inline |
Return an iterator to the end of the data.
Since the Vector presents an interface to a contiguous block of data, it is natural for it to provide a random access iterator.
|
inline |
Return an iterator to the end of the data.
Since the Vector presents an interface to a contiguous block of data, it is natural for it to provide a random access iterator.
|
pure virtual |
Zero all ghost data (does not modify consistent status)
Implemented in AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
|
virtualinherited |
Notify all listeners of a data change event.
Iterates through the list of DataChangeListeners and invokes the receiveDataChanged() method.
Referenced by AMP::LinearAlgebra::ManagedVectorData::receiveDataChanged(), and AMP::LinearAlgebra::MultiVectorData::receiveDataChanged().
| size_t AMP::LinearAlgebra::VectorData::getAllGhostValues | ( | TYPE * | vals | ) | const |
Get all ghost values.
| [out] | vals | the values to place in the vector |
This will get any value owned by this core.
|
pure virtual |
Get all ghost values in the vector.
| [out] | vals | the values to place in the vector |
| [in] | id | typeID of raw data |
This will get any value owned by this core.
Implemented in AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, and AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >.
|
pure virtual |
Get the communicator.
Implemented in AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, and AMP::LinearAlgebra::VectorDataNull.
|
pure virtual |
Get the CommunicationList for this Vector.
Implemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
|
virtual |
Number of elements in the ith component.
| [in] | i | particular data block |
Reimplemented in AMP::LinearAlgebra::MultiVectorData.
|
virtual |
Number of elements in the ith component.
| [in] | i | particular data block |
Reimplemented in AMP::LinearAlgebra::MultiVectorData.
|
pure virtual |
A unique id for the underlying data allocation.
This is a unique id that is associated with the data data allocation. Views of a vector should preserve the id of the original vector. Vectors that are not allocated, or contain multiple vectors (such as Multivector) should return 0. Note: this id is not consistent across multiple processors.
Implemented in AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::EpetraVectorData, AMP::LinearAlgebra::NativeThyraVectorData, and AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >.
| void AMP::LinearAlgebra::VectorData::getGhostAddValuesByGlobalID | ( | size_t | num, |
| const size_t * | indices, | ||
| TYPE * | vals | ||
| ) | const |
get ghosted values to add to off-proc elements
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [in] | vals | the values to place in the vector |
This will get the ghosted updates this processor has made. All indices are from global 0.
|
pure virtual |
get ghosted values to add to off-proc elements
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [in] | vals | the values to place in the vector |
| [in] | id | typeID of raw data |
This will get the ghosted updates this processor has made. All indices are from global 0.
Implemented in AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
|
pure virtual |
Number of entries "owned" by other cores stored on this core.
Implemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
| void AMP::LinearAlgebra::VectorData::getGhostValuesByGlobalID | ( | size_t | num, |
| const size_t * | indices, | ||
| TYPE * | vals | ||
| ) | const |
Get ghost values in the vector by their global offset.
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [out] | vals | the values to place in the vector |
This will get any value owned by this core.
|
pure virtual |
Get ghost values in the vector by their global offset.
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [out] | vals | the values to place in the vector |
| [in] | id | typeID of raw data |
This will get any value owned by this core.
Implemented in AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
|
inline |
Number of total entries in this vector across all cores.
Definition at line 71 of file VectorData.h.
References d_globalSize.
| UpdateState AMP::LinearAlgebra::VectorData::getGlobalUpdateStatus | ( | ) | const |
Return the current update state of the Vector.
This returns the effective update state of the vector, including any vectors it contains. The effective state is defined as: UNCHANGED - All data and sub vectors are unchanged LOCAL_CHANGED - Local data may be modified, sub vectors must either be UNCHANGED or LOCAL_CHANGED. ADDING - Local and ghost data may be modified through add operations, sub vectors must be UNCHANGED, LOCAL_CHANGED, or ADDING SETTING - Local and ghost data may be modified through set operations, sub vectors must be UNCHANGED, LOCAL_CHANGED, or SETTING If different subvectors have incompatible states ADDING and SETTING, this function will return MIXED This version returns the global state and requires a collective communication
| uint64_t AMP::LinearAlgebra::VectorData::getID | ( | ) | const |
Get a unique id hash for the vector.
|
inline |
Number of elements "owned" by this core.
This function returns the number of locally stored values under contiguous indexing.
Definition at line 66 of file VectorData.h.
|
virtual |
The local sizes on each rank.
Reimplemented in AMP::LinearAlgebra::MultiVectorData.
|
inline |
get local start id core.
Definition at line 76 of file VectorData.h.
References d_localStart.
|
pure virtual |
Return the current update state of the Vector.
This returns the effective update state of the vector, including any vectors it contains. The effective state is defined as: UNCHANGED - All data and sub vectors are unchanged LOCAL_CHANGED - Local data may be modified, sub vectors must either be UNCHANGED or LOCAL_CHANGED. ADDING - Local and ghost data may be modified through add operations, sub vectors must be UNCHANGED, LOCAL_CHANGED, or ADDING SETTING - Local and ghost data may be modified through set operations, sub vectors must be UNCHANGED, LOCAL_CHANGED, or SETTING If different subvectors have incompatible states ADDING and SETTING, this function will return MIXED This version returns the local state only and does not involve communication
Implemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
|
inlinevirtual |
returns the memory location for data
Reimplemented in AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, and AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >.
Definition at line 528 of file VectorData.h.
References AMP::Utilities::host.
|
virtual |
Return integer number of data components.
Reimplemented in AMP::LinearAlgebra::MultiVectorData.
| void AMP::LinearAlgebra::VectorData::getRawData | ( | TYPE * | buf | ) | const |
Copy data out of this vector.
| [out] | buf | Buffer to copy to |
The Vector should be pre-allocated to the correct size (getLocalSize())
|
pure virtual |
Copy data out of this vector.
| [out] | buf | Buffer to copy to |
| [in] | id | typeID of raw data |
The Vector should be pre-allocated to the correct size (getLocalSize())
Implemented in AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::NativeThyraVectorData, AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::EpetraVectorData, and AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >.
| RETURN_TYPE * AMP::LinearAlgebra::VectorData::getRawDataBlock | ( | size_t | i = 0 | ) |
Obtain a particular contiguous block of data cast to RETURN_TYPE.
| RETURN_TYPE | The pointer type of the return |
| [in] | i | Which block |
| const RETURN_TYPE * AMP::LinearAlgebra::VectorData::getRawDataBlock | ( | size_t | i = 0 | ) | const |
Obtain a particular contiguous block of data cast to RETURN_TYPE.
| RETURN_TYPE | The pointer type of the return |
| [in] | i | Which block |
|
pure virtual |
Return a pointer to a particular block of memory in the vector.
| i | The block to return |
Implemented in AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::EpetraVectorData, AMP::LinearAlgebra::NativeThyraVectorData, AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >, and AMP::LinearAlgebra::VectorDataNull.
|
pure virtual |
Return a pointer to a particular block of memory in the vector.
| i | The block to return |
Implemented in AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::EpetraVectorData, AMP::LinearAlgebra::NativeThyraVectorData, AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >, and AMP::LinearAlgebra::VectorDataNull.
|
pure virtual |
Return the typeid of the given block.
| block | The block id to check |
Implemented in AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::EpetraVectorData, AMP::LinearAlgebra::NativeThyraVectorData, and AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >.
|
pure virtual |
Return the current update state of this Vector.
This returns the pointer to the update state of the current vector only (not vectors it contains). It should NOT be used by users.
Implemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
| void AMP::LinearAlgebra::VectorData::getValuesByGlobalID | ( | size_t | num, |
| const size_t * | indices, | ||
| TYPE * | vals | ||
| ) | const |
get values in the vector by their local offset
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [out] | vals | the values to place in the vector |
This will get the owned values for this core. All indices are from 0.
| void AMP::LinearAlgebra::VectorData::getValuesByLocalID | ( | size_t | num, |
| const size_t * | indices, | ||
| TYPE * | vals | ||
| ) | const |
Get local values in the vector by their global offset.
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [out] | vals | the values to place in the vector |
This will get any value used by this core.
|
pure virtual |
Get local values in the vector by their global offset.
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [out] | vals | the values to place in the vector |
| [in] | id | typeID of raw data |
This will get any value used by this core.
Implemented in AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::EpetraVectorData, AMP::LinearAlgebra::NativeThyraVectorData, and AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >.
|
inlinevirtual |
returns whether all data for the vector on a single process is contiguous
Reimplemented in AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::SubsetVectorData.
Definition at line 113 of file VectorData.h.
|
pure virtual |
Check if any entries "owned" by other cores are stored on this core.
Implemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
|
virtual |
Check if the two VectorData objects are alias of each other.
This function checks if two VectorData objects are alias of each other. Two VectorData objects are alias if their data blocks are the same size and point to the same memory blocks.
| [in] | rhs | VectorData to compare |
Reimplemented in AMP::LinearAlgebra::ManagedVectorData.
| bool AMP::LinearAlgebra::VectorData::isBlockType | ( | size_t | i = 0 | ) | const |
Check if the data is of the given type.
| bool AMP::LinearAlgebra::VectorData::isType | ( | ) | const |
Check if the data is of the given type.
|
inline |
Is the data of the given type.
| id | The typeid |
| block | The block id to check |
|
virtual |
Update shared values on entire communicator.
This version will check the state of the vector and then call the appropriate version of makeConsistent
Reimplemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::NativePetscVectorData.
|
pure virtual |
Update shared values on entire communicator.
| t | The type of scatter used to compute values |
There are two algorithms used by makeConsistent
Generally, when adding to a vector, the GATHER_SCATTER should be used to make consistent. When setting entries in a vector the BROADCAST should be used.
Implemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
|
pure virtual |
Number of blocks of contiguous data in the Vector.
A vector is not necessarily contiguous in memory. This method returns the number of contiguous blocks in memory used by this vector
Implemented in AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::EpetraVectorData, AMP::LinearAlgebra::NativeThyraVectorData, and AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >.
|
virtual |
| void AMP::LinearAlgebra::VectorData::putRawData | ( | const TYPE * | buf | ) |
Copy data into this vector.
| [in] | buf | Buffer to copy from |
|
pure virtual |
Copy data into this vector.
| [in] | buf | Buffer to copy from |
| [in] | id | typeID of raw data |
Implemented in AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::NativeThyraVectorData, AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::EpetraVectorData, and AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >.
|
virtual |
Register any child objects.
This function will register child objects with the manager
| manager | Restart manager |
Reimplemented in AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, and AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >.
|
virtualinherited |
Register a listener with this DataChangeFirer.
| [in] | listener | The listener to be alerted to data change events |
Adds a listener to itself.
|
virtualinherited |
Register a listener with this DataChangeFirer.
| [in] | listener | The listener to be alerted to data change events |
Adds a listener to itself.
|
virtual |
reset the vector data object
At present this interface is primarily meant for vector data over AMR hierarchies, where the number of AMR levels and vector data has to be reallocated
|
pure virtual |
Set the CommunicationList for this Vector.
Setting the CommunicationList for a Vector may involve reallocating ghost storage.
Implemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
| void AMP::LinearAlgebra::VectorData::setGhostValuesByGlobalID | ( | size_t | num, |
| const size_t * | indices, | ||
| const TYPE * | vals | ||
| ) |
Set ghost values using global identifier.
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [in] | vals | the values to place in the vector |
\( \mathit{this}_{\mathit{indices}_i} = \mathit{vals}_i \)
|
pure virtual |
Set ghost values using global identifier.
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [in] | vals | the values to place in the vector |
| [in] | id | typeID of raw data |
\( \mathit{this}_{\mathit{indices}_i} = \mathit{vals}_i \)
Implemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
|
virtual |
Ensure this vector has no ghosts.
Calls clearBuffer for the communication list and removes any storage for ghosts
Reimplemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, and AMP::LinearAlgebra::MultiVectorData.
|
pure virtual |
Sets the current update state of the Vector.
This sets the update status of the vector. This function should only be called by advanced users
| [in] | state | State of the vector to set |
Implemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
|
pure virtual |
Tie the current update state to another.
This sets the pointer to the update state of the current vector only (not vectors it contains). It should NOT be used by users.
| rhs | Pointer to share update state with |
Implemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, and AMP::LinearAlgebra::VectorDataNull.
| void AMP::LinearAlgebra::VectorData::setValuesByGlobalID | ( | size_t | num, |
| const size_t * | indices, | ||
| const TYPE * | vals | ||
| ) |
Set owned or shared values using global identifier.
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [in] | vals | the values to place in the vector |
Since the shared buffer and owned buffer are separate, this function must sort the data by buffer before setting values.
| void AMP::LinearAlgebra::VectorData::setValuesByLocalID | ( | size_t | num, |
| const size_t * | indices, | ||
| const TYPE * | vals | ||
| ) |
Set values in the vector by their local offset.
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [in] | vals | the values to place in the vector |
This will set the owned values for this core. All indices are from 0. \( \mathit{this}_{\mathit{indices}_i} = \mathit{vals}_i \)
|
pure virtual |
Set values in the vector by their local offset.
| [in] | num | number of values to set |
| [in] | indices | the indices of the values to set |
| [in] | vals | the values to place in the vector |
| [in] | id | typeID of raw data |
This will set the owned values for this core. All indices are from 0. \( \mathit{this}_{\mathit{indices}_i} = \mathit{vals}_i \)
Implemented in AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::EpetraVectorData, AMP::LinearAlgebra::NativeThyraVectorData, and AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >.
|
inlineinherited |
Definition at line 28 of file enable_shared_from_this.h.
|
inlineinherited |
Definition at line 46 of file enable_shared_from_this.h.
|
pure virtual |
Number of elements in a data block.
| [in] | i | particular data block |
Implemented in AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::EpetraVectorData, AMP::LinearAlgebra::NativeThyraVectorData, AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >, AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::ManagedVectorData, and AMP::LinearAlgebra::VectorDataNull.
|
pure virtual |
Return the result of sizeof(TYPE) for the given data block.
| i | The block to return |
Implemented in AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::EpetraVectorData, AMP::LinearAlgebra::NativeThyraVectorData, and AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >.
|
pure virtual |
Swap the data with another VectorData object.
| rhs | The VectorData to swap with |
Implemented in AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::EpetraVectorData, AMP::LinearAlgebra::NativeThyraVectorData, AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, and AMP::LinearAlgebra::NativePetscVectorData.
|
pure virtual |
Get the type name.
Implemented in AMP::LinearAlgebra::ArrayVectorData< T, FUN, Allocator >, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::ManagedVectorData, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::SubsetCommSelfVectorData, AMP::LinearAlgebra::SubsetVectorData, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::VectorDataNull, AMP::LinearAlgebra::NativePetscVectorData, AMP::LinearAlgebra::EpetraVectorData, AMP::LinearAlgebra::NativeThyraVectorData, and AMP::LinearAlgebra::TpetraVectorData< ST, LO, GO, NT >.
|
virtual |
Write restart data to file.
This function will write the mesh to an HDF5 file
| fid | File identifier to write |
Reimplemented in AMP::LinearAlgebra::GhostDataHelper< TYPE, Allocator >, AMP::LinearAlgebra::GhostDataHelper< double >, AMP::LinearAlgebra::GhostDataHelper< double, AMP::HostAllocator< void > >, AMP::LinearAlgebra::GhostDataHelper< PetscScalar >, AMP::LinearAlgebra::GhostDataHelper< T, AMP::HostAllocator< void > >, AMP::LinearAlgebra::MultiVectorData, AMP::LinearAlgebra::VectorDataDevice< TYPE, Allocator >, AMP::LinearAlgebra::VectorDataDefault< TYPE, Allocator >, and AMP::LinearAlgebra::VectorDataDefault< double, AMP::HostAllocator< void > >.
|
friend |
Index of first local value.
Definition at line 679 of file VectorData.h.
|
protected |
|
privateinherited |
Definition at line 89 of file DataChangeFirer.h.
|
protected |
|
protected |
Number of global values.
Definition at line 676 of file VectorData.h.
Referenced by getLocalStartID().
|
mutableprotectedinherited |
Definition at line 69 of file enable_shared_from_this.h.
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:43. Comments on this page |