1#ifndef included_AMP_EpetraVectorData
2#define included_AMP_EpetraVectorData
4#include "AMP/vectors/data/GhostDataHelper.hpp"
5#include "AMP/vectors/data/VectorData.h"
9#include <Epetra_Vector.h>
28 std::shared_ptr<CommunicationList> commList );
60 std::shared_ptr<Epetra_Map>
d_emap =
nullptr;
75 static std::shared_ptr<EpetraVectorData>
76 create( std::shared_ptr<EpetraVectorEngineParameters> alias, std::shared_ptr<VectorData> buf );
95 std::shared_ptr<VectorData>
cloneData(
const std::string &name =
"" )
const override;
109 const Epetra_BlockMap &,
110 std::shared_ptr<VectorData>,
Provides C++ wrapper around MPI routines.
A linear algebra engine that uses Epetra.
virtual ~EpetraVectorData()
Virtual destructor.
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 numberOfDataBlocks() const override
Number of blocks of contiguous data in the Vector.
Epetra_Vector d_epetraVector
The Epetra_Vector to perform work on.
std::string VectorDataName() const override
Get the type name.
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.
void getValuesByLocalID(size_t, const size_t *, void *, const typeID &) const override
Get local values in the vector by their global offset.
std::shared_ptr< VectorData > d_buf_scope
A shared ptr to the buffer (to prevent it from leaving scope)
typeID getType(size_t) const override
Return the typeid of the given block.
Epetra_Vector & getEpetra_Vector()
Get the raw Epetra_Vector.
static std::shared_ptr< EpetraVectorData > create(std::shared_ptr< EpetraVectorEngineParameters > alias, std::shared_ptr< VectorData > buf)
EpetraVectorData(std::shared_ptr< EpetraVectorEngineParameters > alias, Epetra_DataAccess, const Epetra_BlockMap &, std::shared_ptr< VectorData >, int, int, int)
void putRawData(const void *in, const typeID &id) override
Copy data into 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.
void getRawData(void *out, const typeID &id) const override
Copy data out of this vector.
const Epetra_Vector & getEpetra_Vector() const
Get the raw Epetra_Vector.
void addValuesByLocalID(size_t, const size_t *, const void *, const typeID &) override
Add values to vector entities by their local offset.
uint64_t getDataID() const override
A unique id for the underlying data allocation.
std::shared_ptr< VectorData > cloneData(const std::string &name="") const override
Clone the data.
Class that details how to construct an EpetraVectorEngine.
std::shared_ptr< CommunicationList > d_CommList
The CommunicationList for a vector.
EpetraVectorEngineParameters(size_t N_local, const AMP_MPI &comm, std::shared_ptr< CommunicationList > commList)
Constructor.
size_t getLocalSize() const
Return the local size.
size_t beginDOF() const
Return the first DOF on this core.
Epetra_Map & getEpetraMap()
Return the Epetra_Map for this engine.
AMP_MPI getComm() const
Return the Epetra_MpiComm for this engine.
std::shared_ptr< Epetra_Map > d_emap
size_t getGlobalSize() const
Return the local size.
virtual ~EpetraVectorEngineParameters()
Destructor.
A class used to hold vector data.
#define DISABLE_WARNINGS
Re-enable warnings.
#define ENABLE_WARNINGS
Suppress all warnings.
Class to store type info.