42 #ifndef EPETRAEXT_HDF5_HANDLE_H
43 #define EPETRAEXT_HDF5_HANDLE_H
45 #ifdef HAVE_EPETRAEXT_HDF5
61 virtual std::string
Type()
const = 0;
63 virtual bool HasInt()
const = 0;
68 virtual int IntSize(
const int EID)
const = 0;
71 virtual int DoubleSize(
const int EID)
const = 0;
74 virtual int GetLabels(std::vector<std::string>& IntLabels,
75 std::vector<std::string>& DoubleLabels)
const = 0;
78 virtual int GetLabels(std::vector<std::string>& IntLabels, std::vector<int>& IntLabelsData,
79 std::vector<std::string>& DoubleLabels, std::vector<double>& DoubleLabelsData)
const = 0;
82 virtual int SetLabels(
const std::vector<int>& IntLabelsData,
83 const std::vector<double>& DoubleLabelsData) = 0;
86 virtual int Pack(
const int EID,
int* IntData,
double* DoubleData)
const = 0;
99 #include "Epetra_Vector.h"
111 return(obj_->Map().NumMyElements());
117 return(obj_->Map().NumGlobalElements());
123 return(
"Handle<Epetra_Vector>");
150 std::vector<std::string>& DoubleLabels)
const
153 DoubleLabels.resize(0);
159 int GetLabels(std::vector<std::string>& IntLabels, std::vector<int>& IntLabelsData,
160 std::vector<std::string>& DoubleLabels, std::vector<double>& DoubleLabelsData)
const
167 const std::vector<double>& DoubleLabelsData)
173 int Pack(
const int EID,
int* IntData,
double* DoubleData)
const
175 DoubleData[0] = (*obj_)[EID];
184 (*obj_)[EID] = DoubleData[0];
std::string Type() const
Returns the identifier of the distributed object.
virtual int GetLabels(std::vector< std::string > &IntLabels, std::vector< std::string > &DoubleLabels) const =0
Packs all global information.
int Initialize()
Performs any initialization procedure before unpacking.
int Pack(const int EID, int *IntData, double *DoubleData) const
Packs all data for local element EID in the specified arrays.
virtual int NumMyElements() const =0
Returns the local number of elements.
int UnPack(const int EID, int IntSize, int *IntData, int DoubleSize, double *DoubleData)
Unpacks all data for local element EID in the specified arrays.
int GetLabels(std::vector< std::string > &IntLabels, std::vector< std::string > &DoubleLabels) const
Packs all global information.
int NumMyElements() const
Returns the local number of elements.
virtual int Finalize()=0
Performs any finalization procedure after unpacking.
int DoubleSize(const int EID) const
Returns the size of double data for local element EID.
virtual int UnPack(const int EID, int IntSize, int *IntData, int DoubleSize, double *DoubleData)=0
Unpacks all data for local element EID in the specified arrays.
virtual bool HasDouble() const =0
virtual int IntSize(const int EID) const =0
Returns the size of integer data for local element EID.
virtual int DoubleSize(const int EID) const =0
Returns the size of double data for local element EID.
virtual int Initialize()=0
Performs any initialization procedure before unpacking.
int Finalize()
Performs any finalization procedure after unpacking.
virtual int SetLabels(const std::vector< int > &IntLabelsData, const std::vector< double > &DoubleLabelsData)=0
Sets global information.
Epetra_Vector_Handle(Epetra_Vector &obj)
int NumGlobalElements() const
Returns the global number of elements.
int GetLabels(std::vector< std::string > &IntLabels, std::vector< int > &IntLabelsData, std::vector< std::string > &DoubleLabels, std::vector< double > &DoubleLabelsData) const
Packs all global information.
int IntSize(const int EID) const
Returns the size of integer data for local element EID.
virtual int NumGlobalElements() const =0
Returns the global number of elements.
virtual int Pack(const int EID, int *IntData, double *DoubleData) const =0
Packs all data for local element EID in the specified arrays.
int SetLabels(const std::vector< int > &IntLabelsData, const std::vector< double > &DoubleLabelsData)
Sets global information.
virtual std::string Type() const =0
Returns the identifier of the distributed object.
virtual bool HasInt() const =0