PlasCom2  1.0
XPACC Multi-physics simluation application
databuffer Class Reference

Detailed Description

Definition at line 18 of file PCPPFieldData.H.

#include <PCPPFieldData.H>

Public Types

enum  DataType {
  DTCHAR, DTBYTE, DTINT, DTFLOAT,
  DTDOUBLE
}
 

Public Member Functions

 databuffer ()
 
 databuffer (const databuffer &inBuffer)
 
 databuffer (void *buf, size_t number, size_t type)
 
 databuffer (size_t number, size_t type)
 
 ~databuffer ()
 
bool Empty ()
 
databufferoperator= (const databuffer &inBuffer)
 
void Copy (const databuffer &inBuffer)
 
void Destroy ()
 
template<class T >
T * Data ()
 
template<class T >
const T * Data () const
 
size_t ItemSize () const
 
size_t NItems () const
 
size_t & ItemSize ()
 
size_t & NItems ()
 
void CopyData (const void *buf, size_t start=0, size_t nitems=0)
 
void Set (void *buf=NULL, size_t nitems=0, size_t itemsize=0)
 
int Allocate ()
 
int Allocate (size_t nitems)
 
int Allocate (size_t nitems, size_t isize)
 
size_t size () const
 
size_t resize (size_t newsize)
 
const char * data () const
 
char * data ()
 
template<class T >
std::ostream & OutputToStream (std::ostream &Ostr) const
 
template<class T >
std::istream & ReadFromStream (std::istream &Istr)
 

Public Attributes

size_t DataSize [5]
 

Private Attributes

char * _data_ptr
 
size_t _item_size
 
bool _my_data
 
size_t _number_of_items
 

Friends

std::ostream & operator<< (std::ostream &Ostr, const databuffer &buf)
 
std::istream & operator>> (std::istream &Istr, databuffer &buf)
 

Member Enumeration Documentation

◆ DataType

enum DataType
Enumerator
DTCHAR 
DTBYTE 
DTINT 
DTFLOAT 
DTDOUBLE 

Definition at line 27 of file PCPPFieldData.H.

Constructor & Destructor Documentation

◆ databuffer() [1/4]

databuffer ( )
inline

Definition at line 39 of file PCPPFieldData.H.

◆ databuffer() [2/4]

databuffer ( const databuffer inBuffer)
inline

Definition at line 47 of file PCPPFieldData.H.

References databuffer::Copy().

Here is the call graph for this function:

◆ databuffer() [3/4]

databuffer ( void *  buf,
size_t  number,
size_t  type 
)
inline

Definition at line 52 of file PCPPFieldData.H.

◆ databuffer() [4/4]

databuffer ( size_t  number,
size_t  type 
)
inline

Definition at line 61 of file PCPPFieldData.H.

◆ ~databuffer()

~databuffer ( )
inline

Definition at line 69 of file PCPPFieldData.H.

References databuffer::Destroy().

Here is the call graph for this function:

Member Function Documentation

◆ Allocate() [1/3]

int Allocate ( )
inline

Definition at line 156 of file PCPPFieldData.H.

References databuffer::_item_size, and databuffer::Destroy().

Referenced by pcpp::field::operator>>(), and dataset::ReCreate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Allocate() [2/3]

int Allocate ( size_t  nitems)
inline

Definition at line 166 of file PCPPFieldData.H.

References databuffer::_item_size, and databuffer::Destroy().

Here is the call graph for this function:

◆ Allocate() [3/3]

int Allocate ( size_t  nitems,
size_t  isize 
)
inline

Definition at line 177 of file PCPPFieldData.H.

References databuffer::_item_size, and databuffer::Destroy().

Here is the call graph for this function:

◆ Copy()

void Copy ( const databuffer inBuffer)
inline

Definition at line 84 of file PCPPFieldData.H.

References databuffer::_data_ptr, databuffer::_item_size, databuffer::_number_of_items, and databuffer::Destroy().

Referenced by dataset::Copy(), databuffer::databuffer(), databuffer::operator=(), and metadataset::operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CopyData()

void CopyData ( const void *  buf,
size_t  start = 0,
size_t  nitems = 0 
)
inline

Definition at line 124 of file PCPPFieldData.H.

References databuffer::_item_size, and databuffer::_number_of_items.

◆ Data() [1/2]

T* Data ( )
inline

Definition at line 111 of file PCPPFieldData.H.

Referenced by rk4advancer< DomainType >::AXPY(), testfixtures::viscid::GeneratePoiseuilleExact(), testfixtures::viscid::GenerateViscidShockExact(), euler::util::InitializeAcousticPulse(), rk4advancer< DomainType >::InitializeAdvancer(), euler::util::InitializeAdvectionDiffusion(), euler::util::InitializeConvectingVortex(), euler::util::InitializeDensityPulse(), Maxwell::util::InitializeGaussianPulse1DXDir(), euler::util::InitializeGaussianScalar(), euler::util::InitializeHoles(), Maxwell::util::InitializeMaxwellParameters(), Maxwell::util::InitializeMaxwellStateConstFields(), Maxwell::util::InitializeMaxwellStateGridIndices(), viscid::util::InitializePoiseuille(), euler::util::InitializeProtoY4Test1(), testfixtures::euler::InitializeQuiescentFlow(), testfixtures::viscid::InitializeQuiescentFlow(), euler::util::InitializeQuiescentState(), euler::util::InitializeRiemann1D(), euler::util::InitializeShock1D(), euler::util::InitializeShocktube(), rhs< GridT, StateT, OperatorT >::InitializeState(), euler::util::InitializeUniformFlow(), base::operator*=(), base::operator-=(), halo::PackSendBuffers(), halo::PackSimpleSendBuffers(), probe::Probe(), testrhs< DomainT >::ProcessInterior(), rhs< GridT, StateT, OperatorT >::SetParamState(), TestIntegrated_PFCurvilinear2DX(), TestIntegrated_PFCurvilinear2DY(), TestIntegrated_PFCurvilinear3DZ(), TestIntegrated_PFRectilinear2DX(), TestIntegrated_PFRectilinear2DY(), TestIntegrated_PFRectilinear3DZ(), TestIntegrated_Poiseuille2DX(), TestIntegrated_Poiseuille2DY(), TestIntegrated_Poiseuille3DZ(), TestIntegrated_ViscousShock2DX(), TestIntegrated_ViscousShock2DY(), TestIntegrated_ViscousShock3DZ(), TestIntegrated_VSCurvilinear2DX(), TestIntegrated_VSCurvilinear2DY(), TestIntegrated_VSCurvilinear3DZ(), TestIntegrated_VSRectilinear2DX(), TestIntegrated_VSRectilinear2DY(), TestIntegrated_VSRectilinear3DZ(), TestStateBasic(), TestStateHandles(), and base::Zero().

◆ Data() [2/2]

const T* Data ( ) const
inline

Definition at line 114 of file PCPPFieldData.H.

◆ data() [1/2]

const char* data ( ) const
inline

Definition at line 210 of file PCPPFieldData.H.

Referenced by dataset::MakeLink(), and dataset::Use().

Here is the caller graph for this function:

◆ data() [2/2]

char* data ( )
inline

Definition at line 211 of file PCPPFieldData.H.

◆ Destroy()

void Destroy ( )
inline

Definition at line 95 of file PCPPFieldData.H.

References databuffer::_data_ptr.

Referenced by databuffer::Allocate(), databuffer::Copy(), databuffer::resize(), databuffer::Set(), dataset::SetMetaData(), and databuffer::~databuffer().

Here is the caller graph for this function:

◆ Empty()

bool Empty ( )
inline

Definition at line 71 of file PCPPFieldData.H.

Referenced by dataset::FieldEmpty().

Here is the caller graph for this function:

◆ ItemSize() [1/2]

size_t ItemSize ( ) const
inline

Definition at line 116 of file PCPPFieldData.H.

◆ ItemSize() [2/2]

size_t& ItemSize ( )
inline

Definition at line 120 of file PCPPFieldData.H.

◆ NItems() [1/2]

size_t NItems ( ) const
inline

Definition at line 118 of file PCPPFieldData.H.

Referenced by base::operator*=(), base::operator+=(), base::operator-=(), halo::PackSendBuffers(), halo::PackSimpleSendBuffers(), probe::Probe(), and base::Zero().

Here is the caller graph for this function:

◆ NItems() [2/2]

size_t& NItems ( )
inline

Definition at line 122 of file PCPPFieldData.H.

◆ operator=()

databuffer& operator= ( const databuffer inBuffer)
inline

Definition at line 76 of file PCPPFieldData.H.

References databuffer::Copy().

Here is the call graph for this function:

◆ OutputToStream()

std::ostream& OutputToStream ( std::ostream &  Ostr) const
inline

Definition at line 214 of file PCPPFieldData.H.

References databuffer::_number_of_items.

Referenced by pcpp::field::operator<<().

Here is the caller graph for this function:

◆ ReadFromStream()

std::istream& ReadFromStream ( std::istream &  Istr)
inline

Definition at line 232 of file PCPPFieldData.H.

References databuffer::_number_of_items.

Referenced by pcpp::field::operator>>().

Here is the caller graph for this function:

◆ resize()

size_t resize ( size_t  newsize)
inline

Definition at line 194 of file PCPPFieldData.H.

References databuffer::_item_size, databuffer::_number_of_items, and databuffer::Destroy().

Referenced by metadataset::Copy(), and metadataset::ReadFromStream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Set()

void Set ( void *  buf = NULL,
size_t  nitems = 0,
size_t  itemsize = 0 
)
inline

Definition at line 142 of file PCPPFieldData.H.

References databuffer::_item_size, databuffer::_number_of_items, and databuffer::Destroy().

Here is the call graph for this function:

◆ size()

size_t size ( ) const
inline

Definition at line 189 of file PCPPFieldData.H.

Referenced by metadataset::WriteToStream().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  Ostr,
const databuffer buf 
)
friend

Definition at line 7 of file PCPPFieldData.C.

◆ operator>>

std::istream& operator>> ( std::istream &  Istr,
databuffer buf 
)
friend

Definition at line 32 of file PCPPFieldData.C.

Member Data Documentation

◆ _data_ptr

char* _data_ptr
private

◆ _item_size

◆ _my_data

bool _my_data
private

Definition at line 34 of file PCPPFieldData.H.

◆ _number_of_items

◆ DataSize

size_t DataSize[5]

Definition at line 28 of file PCPPFieldData.H.


The documentation for this class was generated from the following file: