1#ifndef included_TpetraVectorData_H_
2#define included_TpetraVectorData_H_
4#include "AMP/discretization/DOF_Manager.h"
5#include "AMP/vectors/data/GhostDataHelper.hpp"
6#include "AMP/vectors/data/VectorData.h"
8#include <Teuchos_Comm.hpp>
9#include <Teuchos_OrdinalTraits.hpp>
10#include <Tpetra_Core.hpp>
11#include <Tpetra_Vector.hpp>
12#include <Tpetra_Version.hpp>
18template<
typename ST = double,
19 typename LO = int32_t,
20 typename GO = int64_t,
21 typename NT = Tpetra::Vector<>::node_type>
26 std::shared_ptr<AMP::Discretization::DOFManager> dofManager );
44 std::shared_ptr<VectorData>
cloneData(
const std::string &name =
"" )
const override;
size_t numberOfDataBlocks() const override
Number of blocks of contiguous data in the Vector.
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.
std::shared_ptr< VectorData > cloneData(const std::string &name="") const override
Clone the data.
void swapData(VectorData &) override
Swap the data with another VectorData object.
std::shared_ptr< AMP::Discretization::DOFManager > d_pDOFManager
void addValuesByLocalID(size_t, const size_t *, const void *, const typeID &) override
Add values to vector entities by their local offset.
typeID getType(size_t) const override
Return the typeid of the given block.
Teuchos::RCP< Tpetra::Vector< ST, LO, GO, NT > > getTpetraVector()
void putRawData(const void *in, const typeID &id) override
Copy data into this vector.
Teuchos::RCP< Tpetra::Vector< ST, LO, GO, NT > > d_pTpetraVector
void getValuesByLocalID(size_t, const size_t *, void *, const typeID &) const override
Get local values in the vector by their global offset.
size_t sizeOfDataBlock(size_t i) const override
Number of elements in a data block.
uint64_t getDataID() const override
A unique id for the underlying data allocation.
TpetraVectorData(std::shared_ptr< CommunicationList > commList, std::shared_ptr< AMP::Discretization::DOFManager > dofManager)
void getRawData(void *out, const typeID &id) const override
Copy data out of this vector.
size_t sizeofDataBlockType(size_t) const override
Return the result of sizeof(TYPE) for the given data block.
std::string VectorDataName() const override
Get the type name.
Teuchos::RCP< const Tpetra::Vector< ST, LO, GO, NT > > getTpetraVector() const
void setValuesByLocalID(size_t, const size_t *, const void *, const typeID &) override
Set values in the vector by their local offset.
A class used to hold vector data.
Class to store type info.