A class used to hold vector data. More...
#include <MultiVectorData.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. | |
| void | addGhostValuesByGlobalID (size_t, const size_t *, const void *, const typeID &) override |
| 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. | |
| void | addValuesByLocalID (size_t, const size_t *, const void *, const typeID &) override |
| Add values to vector entities by their local offset. | |
| void | assemble () override |
| 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. | |
| std::shared_ptr< VectorData > | cloneData (const std::string &name="") const override |
| 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. | |
| bool | containsGlobalElement (size_t) const override |
| void | copyGhostValues (const VectorData &rhs) override |
| Copy ghosted vlues to a vector. | |
| void | dataChanged () override |
| Notify listeners that data has changed in this vector. | |
| virtual void | deregisterListener (DataChangeListener *listener) |
| Deregister a listener with this DataChangeFirer. | |
| void | dumpGhostedData (std::ostream &out, size_t offset=0) const override |
| Write data owned by other processors to an std::ostream. | |
| void | dumpOwnedData (std::ostream &out, size_t GIDoffset=0, size_t LIDoffset=0) const override |
| 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. | |
| void | fillGhosts (const Scalar &) override |
| Zero all ghost data (does not modify consistent status) | |
| virtual void | fireDataChange () |
| Notify all listeners of a data change event. | |
| size_t | getAllGhostValues (void *, const typeID &) const override |
| Get all ghost values in the vector. | |
| const AMP_MPI & | getComm () const override |
| Get the communicator. | |
| std::shared_ptr< CommunicationList > | getCommunicationList () const override |
| Get the CommunicationList for this Vector. | |
| std::shared_ptr< const VectorData > | getComponent (size_t i=0) const override |
| Number of elements in the ith component. | |
| std::shared_ptr< VectorData > | getComponent (size_t i=0) override |
| Number of elements in the ith component. | |
| uint64_t | getDataID () const override |
| 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 | |
| void | getGhostAddValuesByGlobalID (size_t, const size_t *, void *, const typeID &) const override |
| get ghosted values to add to off-proc elements | |
| size_t | getGhostSize () const override |
| 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. | |
| void | getGhostValuesByGlobalID (size_t, const size_t *, void *, const typeID &) const override |
| 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. | |
| std::vector< size_t > | getLocalSizes () const override |
| The local sizes on each rank. | |
| size_t | getLocalStartID () const |
| get local start id core. | |
| UpdateState | getLocalUpdateStatus () const override |
| Return the current update state of the Vector. | |
| AMP::Utilities::MemoryType | getMemoryLocation () const override |
| returns the memory location for data | |
| size_t | getNumberOfComponents () const override |
| Return integer number of data components. | |
| template<class TYPE > | |
| void | getRawData (TYPE *buf) const |
| Copy data out of this vector. | |
| void | getRawData (void *buf, const typeID &id) const override |
| 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. | |
| const void * | getRawDataBlockAsVoid (size_t i) const override |
| Return a pointer to a particular block of memory in the vector. | |
| void * | getRawDataBlockAsVoid (size_t i) override |
| Return a pointer to a particular block of memory in the vector. | |
| typeID | getType (size_t block) const override |
| Return the typeid of the given block. | |
| std::shared_ptr< UpdateState > | getUpdateStatusPtr () const override |
| 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. | |
| void | getValuesByLocalID (size_t, const size_t *, void *, const typeID &) const override |
| Get local values in the vector by their global offset. | |
| VectorData * | getVectorData (size_t i) |
| const VectorData * | getVectorData (size_t i) const |
| size_t | getVectorDataSize () const |
| bool | hasContiguousData () const override |
| returns whether all data for the vector on a single process is contiguous | |
| bool | hasGhosts () const override |
| 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. | |
| void | makeConsistent () override |
| Update shared values on entire communicator. | |
| void | makeConsistent (ScatterType t) override |
| Update shared values on entire communicator. | |
| MultiVectorData (const AMP::AMP_MPI &comm) | |
| MultiVectorData (int64_t fid, AMP::IO::RestartManager *manager) | |
| Write restart data to file. | |
| MultiVectorData (VectorData *data, const AMP::Discretization::DOFManager *manager=nullptr) | |
| size_t | numberOfDataBlocks () const override |
| 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. | |
| void | putRawData (const void *buf, const typeID &id) override |
| Copy data into this vector. | |
| void | receiveDataChanged () override |
| The method called when a data change event occurs. | |
| void | registerChildObjects (AMP::IO::RestartManager *manager) const override |
| 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 | |
| void | resetMultiVectorData (const AMP::Discretization::DOFManager *manager, const std::vector< VectorData * > &data) |
| void | setCommunicationList (std::shared_ptr< CommunicationList > comm) override |
| 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. | |
| void | setGhostValuesByGlobalID (size_t, const size_t *, const void *, const typeID &) override |
| Set ghost values using global identifier. | |
| void | setNoGhosts () override |
| Ensure this vector has no ghosts. | |
| void | setUpdateStatus (UpdateState state) override |
| Sets the current update state of the Vector. | |
| void | setUpdateStatusPtr (std::shared_ptr< UpdateState > rhs) override |
| 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. | |
| 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 > | shared_from_this () |
| std::shared_ptr< const VectorData > | shared_from_this () const |
| size_t | sizeOfDataBlock (size_t i=0) const override |
| Number of elements in a data block. | |
| size_t | sizeofDataBlockType (size_t i) const override |
| Return the result of sizeof(TYPE) for the given data block. | |
| void | swapData (VectorData &rhs) override |
| Swap the data with another VectorData object. | |
| std::string | VectorDataName () const override |
| Get the type name. | |
| void | writeRestart (int64_t fid) const override |
| Write restart data to file. | |
| virtual | ~MultiVectorData () |
| Virtual destructor. | |
Protected Member Functions | |
| template<class TYPE > | |
| size_t | getAllGhostValues (TYPE *) const |
| void | partitionGlobalValues (const int num, const size_t *indices, const void *vals, const size_t bytes, std::vector< std::vector< size_t > > &out_indices, std::vector< std::vector< std::byte > > &out_vals, std::vector< std::vector< int > > *remap=nullptr) const |
| void | partitionLocalValues (const int num, const size_t *indices, const void *vals, const size_t bytes, std::vector< std::vector< size_t > > &out_indices, std::vector< std::vector< std::byte > > &out_vals, std::vector< std::vector< int > > *remap=nullptr) const |
Protected Attributes | |
| AMP::AMP_MPI | d_comm |
| std::vector< VectorData * > | d_data |
| AMP::Discretization::multiDOFHelper | d_dofMap |
| size_t | d_globalSize = 0 |
| Number of local values. | |
| size_t | d_localSize = 0 |
| size_t | d_localStart = 0 |
| Number of global values. | |
| std::shared_ptr< UpdateState > | d_UpdateState |
| std::weak_ptr< VectorData > | weak_ptr_ |
Private Member Functions | |
| void | deregisterFromFirer (DataChangeFirer *firer) |
| Deregister this DataChangeListener with a DataChangeFirer. | |
| void | registerWithFirer (DataChangeFirer *firer) |
| Register this DataChangeListener with a DataChangeFirer. | |
Private Attributes | |
| std::vector< DataChangeFirer * > | d_firers |
| std::vector< DataChangeListener * > | d_listeners |
A class used to hold vector data.
MultiVectorData is a default implementation of VectorData that stores the local values as a single block of data on the CPU.
Definition at line 29 of file MultiVectorData.h.
|
inlinevirtual |
Virtual destructor.
Definition at line 34 of file MultiVectorData.h.
|
inlineexplicit |
Definition at line 137 of file MultiVectorData.h.
|
explicit |
| AMP::LinearAlgebra::MultiVectorData::MultiVectorData | ( | int64_t | fid, |
| AMP::IO::RestartManager * | manager | ||
| ) |
Write restart data to file.
This function will write the mesh to an HDF5 file
| fid | File identifier to read |
| manager | Restart manager |
|
inherited |
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 |
|
overridevirtual |
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 |
Implements AMP::LinearAlgebra::VectorData.
|
inherited |
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.
|
inherited |
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 \)
|
overridevirtual |
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 \)
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
This method is used to implement the assemble interface of PETSc.
This method is empty except for instantiations of NativePetscVectorData
Reimplemented from AMP::LinearAlgebra::VectorData.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
overridevirtual |
Clone the data.
Implements AMP::LinearAlgebra::VectorData.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
overridevirtual |
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
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.
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
Notify listeners that data has changed in this vector.
Implements AMP::LinearAlgebra::VectorData.
|
privateinherited |
Deregister this DataChangeListener with a DataChangeFirer.
| firer | the data change firer this object will no longer listen for |
This method will erase firer from the list. This method is only used by the DataChangeFirer
|
virtualinherited |
Deregister a listener with this DataChangeFirer.
| [in] | listener | The listener to remove from the list |
Removes a listener from itself.
|
overridevirtual |
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 |
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
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 from AMP::LinearAlgebra::VectorData.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
overridevirtual |
Zero all ghost data (does not modify consistent status)
Implements AMP::LinearAlgebra::VectorData.
|
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 receiveDataChanged().
|
protected |
|
overridevirtual |
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.
Implements AMP::LinearAlgebra::VectorData.
|
inlineoverridevirtual |
Get the communicator.
Implements AMP::LinearAlgebra::VectorData.
Definition at line 129 of file MultiVectorData.h.
References d_comm.
|
overridevirtual |
Get the CommunicationList for this Vector.
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
Number of elements in the ith component.
| [in] | i | particular data block |
Reimplemented from AMP::LinearAlgebra::VectorData.
|
overridevirtual |
Number of elements in the ith component.
| [in] | i | particular data block |
Reimplemented from AMP::LinearAlgebra::VectorData.
|
overridevirtual |
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.
Implements AMP::LinearAlgebra::VectorData.
|
inherited |
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.
|
overridevirtual |
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.
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
Number of entries "owned" by other cores stored on this core.
Implements AMP::LinearAlgebra::VectorData.
|
inherited |
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.
|
overridevirtual |
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.
Implements AMP::LinearAlgebra::VectorData.
|
inlineinherited |
Number of total entries in this vector across all cores.
Definition at line 71 of file VectorData.h.
References AMP::LinearAlgebra::VectorData::d_globalSize.
|
inherited |
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
|
inherited |
Get a unique id hash for the vector.
|
inlineinherited |
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.
|
overridevirtual |
The local sizes on each rank.
Reimplemented from AMP::LinearAlgebra::VectorData.
|
inlineinherited |
get local start id core.
Definition at line 76 of file VectorData.h.
References AMP::LinearAlgebra::VectorData::d_localStart.
|
overridevirtual |
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
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
returns the memory location for data
Reimplemented from AMP::LinearAlgebra::VectorData.
|
overridevirtual |
Return integer number of data components.
Reimplemented from AMP::LinearAlgebra::VectorData.
|
inherited |
Copy data out of this vector.
| [out] | buf | Buffer to copy to |
The Vector should be pre-allocated to the correct size (getLocalSize())
|
overridevirtual |
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())
Implements AMP::LinearAlgebra::VectorData.
|
inherited |
Obtain a particular contiguous block of data cast to RETURN_TYPE.
| RETURN_TYPE | The pointer type of the return |
| [in] | i | Which block |
|
inherited |
Obtain a particular contiguous block of data cast to RETURN_TYPE.
| RETURN_TYPE | The pointer type of the return |
| [in] | i | Which block |
|
overridevirtual |
Return a pointer to a particular block of memory in the vector.
| i | The block to return |
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
Return a pointer to a particular block of memory in the vector.
| i | The block to return |
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
Return the typeid of the given block.
| block | The block id to check |
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
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.
Implements AMP::LinearAlgebra::VectorData.
|
inherited |
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.
|
inherited |
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.
|
overridevirtual |
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.
Implements AMP::LinearAlgebra::VectorData.
| VectorData * AMP::LinearAlgebra::MultiVectorData::getVectorData | ( | size_t | i | ) |
| const VectorData * AMP::LinearAlgebra::MultiVectorData::getVectorData | ( | size_t | i | ) | const |
|
inline |
Definition at line 127 of file MultiVectorData.h.
References d_data.
|
inlineoverridevirtual |
returns whether all data for the vector on a single process is contiguous
Reimplemented from AMP::LinearAlgebra::VectorData.
Definition at line 64 of file MultiVectorData.h.
References numberOfDataBlocks().
|
overridevirtual |
Check if any entries "owned" by other cores are stored on this core.
Implements AMP::LinearAlgebra::VectorData.
|
virtualinherited |
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.
|
inherited |
Check if the data is of the given type.
|
inherited |
Check if the data is of the given type.
|
inlineinherited |
Is the data of the given type.
| id | The typeid |
| block | The block id to check |
|
overridevirtual |
Update shared values on entire communicator.
This version will check the state of the vector and then call the appropriate version of makeConsistent
Reimplemented from AMP::LinearAlgebra::VectorData.
|
overridevirtual |
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.
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
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
Implements AMP::LinearAlgebra::VectorData.
Referenced by hasContiguousData().
|
protected |
A method that will translate an array of global ids relative to the multivector into an array of arrays of global ids relative to the component vectors
| [in] | num | The number of DOFs that need to be mapped |
| [in] | indices | The indices of the values relative to the multivector |
| [in] | vals | Values associated somehow with the indices |
| [in] | bytes | Size of a value |
| [out] | out_indices | An array of arrays of mapped indices relative to constituent vectors |
| [out] | out_vals | The values partitioned according to out_indices |
| [out] | remap | If not null, this is a list of where in the indices array an entry comes from |
|
protected |
A method that will translate an array of local ids relative to the multivector into an array of arrays of local ids relative to the component vectors
| [in] | num | The number of DOFs that need to be mapped |
| [in] | indices | The indices of the values relative to the multivector |
| [in] | vals | Values associated somehow with the indices |
| [in] | bytes | Size of a value |
| [out] | out_indices | An array of arrays of mapped indices relative to constituent vectors |
| [out] | out_vals | The values partitioned according to out_indices |
| [out] | remap | If not null, this is a list of where in the indices array an entry comes from |
|
virtualinherited |
|
inherited |
Copy data into this vector.
| [in] | buf | Buffer to copy from |
|
overridevirtual |
Copy data into this vector.
| [in] | buf | Buffer to copy from |
| [in] | id | typeID of raw data |
Implements AMP::LinearAlgebra::VectorData.
|
inlineoverridevirtual |
The method called when a data change event occurs.
The method called when a data change event occurs
Implements AMP::LinearAlgebra::DataChangeListener.
Definition at line 135 of file MultiVectorData.h.
References AMP::LinearAlgebra::DataChangeFirer::fireDataChange().
|
overridevirtual |
Register any child objects.
This function will register child objects with the manager
| manager | Restart manager |
Reimplemented from AMP::LinearAlgebra::VectorData.
|
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.
|
privateinherited |
Register this DataChangeListener with a DataChangeFirer.
| firer | the data change firer this object will listen for |
This method will push firer onto the list. This method is only used by the DataChangeFirer
|
virtualinherited |
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
| void AMP::LinearAlgebra::MultiVectorData::resetMultiVectorData | ( | const AMP::Discretization::DOFManager * | manager, |
| const std::vector< VectorData * > & | data | ||
| ) |
|
overridevirtual |
Set the CommunicationList for this Vector.
Setting the CommunicationList for a Vector may involve reallocating ghost storage.
Implements AMP::LinearAlgebra::VectorData.
|
inherited |
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 \)
|
overridevirtual |
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 \)
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
Ensure this vector has no ghosts.
Calls clearBuffer for the communication list and removes any storage for ghosts
Reimplemented from AMP::LinearAlgebra::VectorData.
|
overridevirtual |
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 |
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
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 |
Implements AMP::LinearAlgebra::VectorData.
|
inherited |
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.
|
inherited |
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 \)
|
overridevirtual |
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 \)
Implements AMP::LinearAlgebra::VectorData.
|
inlineinherited |
Definition at line 28 of file enable_shared_from_this.h.
|
inlineinherited |
Definition at line 46 of file enable_shared_from_this.h.
|
overridevirtual |
Number of elements in a data block.
| [in] | i | particular data block |
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
Return the result of sizeof(TYPE) for the given data block.
| i | The block to return |
Implements AMP::LinearAlgebra::VectorData.
|
overridevirtual |
Swap the data with another VectorData object.
| rhs | The VectorData to swap with |
Implements AMP::LinearAlgebra::VectorData.
|
inlineoverridevirtual |
Get the type name.
Implements AMP::LinearAlgebra::VectorData.
Definition at line 38 of file MultiVectorData.h.
|
overridevirtual |
Write restart data to file.
This function will write the mesh to an HDF5 file
| fid | File identifier to write |
Reimplemented from AMP::LinearAlgebra::VectorData.
|
protected |
Definition at line 217 of file MultiVectorData.h.
Referenced by getComm().
|
protected |
Definition at line 218 of file MultiVectorData.h.
Referenced by getVectorDataSize().
|
protected |
Definition at line 219 of file MultiVectorData.h.
|
privateinherited |
Definition at line 80 of file DataChangeListener.h.
|
protectedinherited |
Number of local values.
Definition at line 675 of file VectorData.h.
Referenced by AMP::LinearAlgebra::VectorData::getGlobalSize().
|
privateinherited |
Definition at line 89 of file DataChangeFirer.h.
|
protectedinherited |
|
protectedinherited |
Number of global values.
Definition at line 676 of file VectorData.h.
Referenced by AMP::LinearAlgebra::VectorData::getLocalStartID().
|
protected |
Definition at line 220 of file MultiVectorData.h.
|
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:42. Comments on this page |