OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <DiscParticle.h>
Classes | |
struct | RecordInfo |
Public Types | |
enum | DPMode1 { INPUT , OUTPUT , APPEND } |
enum | DPMode2 { ALL , ATTRIB } |
Public Member Functions | |
DiscParticle (const char *fname, const char *config, int iomode, const char *typestr=0) | |
DiscParticle (const char *fname, int iomode, const char *=0) | |
~DiscParticle () | |
bool | get_OK () const |
unsigned int | get_NumRecords () const |
int | get_DataMode (unsigned int record=0) const |
int | get_IOMode () const |
unsigned int | get_NumLocalParticles (unsigned int record=0) const |
unsigned int | get_NumGlobalParticles (unsigned int record=0) const |
unsigned int | get_NumAttributes (unsigned int record=0) const |
unsigned int | get_ElemByteSize (unsigned int record=0, unsigned int attrib=0) const |
const char * | get_TypeString () const |
const char * | get_DiscType (unsigned int record=0, unsigned int attrib=0) const |
template<class T > | |
bool | read (IpplParticleBase< T > &pbase, unsigned int record) |
template<class T > | |
bool | read (ParticleAttrib< T > &pattr, unsigned int record) |
template<class T > | |
bool | write (IpplParticleBase< T > &pbase) |
template<class T > | |
bool | write (ParticleAttrib< T > &pattr) |
void | printDebug (std::ostream &) |
void | printDebug () |
Private Types | |
typedef long | Offset_t |
Private Member Functions | |
void | initialize (const char *base, const char *config, const char *typestr, int iomode) |
FILE * | open_file (const std::string &fnm, const std::string &mode, bool reporterr=true) |
bool | read_meta () |
bool | write_meta () |
void * | read_data (FILE *outputData, unsigned int attrib, unsigned int record, unsigned int fileset) |
bool | write_data (FILE *outputData, std::vector< Message * > &, RecordInfo *) |
DiscParticle (const DiscParticle &) | |
DiscParticle & | operator= (const DiscParticle &) |
Private Attributes | |
DiscConfig * | Config |
bool | ConfigOK |
int | IOMode |
std::string | BaseFile |
std::string | TypeString |
std::vector< RecordInfo * > | RecordList |
Offset_t | CurrentOffset |
Definition at line 30 of file DiscParticle.h.
|
private |
Definition at line 588 of file DiscParticle.h.
Enumerator | |
---|---|
INPUT | |
OUTPUT | |
APPEND |
Definition at line 35 of file DiscParticle.h.
Enumerator | |
---|---|
ALL | |
ATTRIB |
Definition at line 39 of file DiscParticle.h.
DiscParticle::DiscParticle | ( | const char * | fname, |
const char * | config, | ||
int | iomode, | ||
const char * | typestr = 0 |
||
) |
Definition at line 45 of file DiscParticleFunctions.cpp.
References initialize().
DiscParticle::DiscParticle | ( | const char * | fname, |
int | iomode, | ||
const char * | typestr = 0 |
||
) |
Definition at line 56 of file DiscParticleFunctions.cpp.
References initialize().
DiscParticle::~DiscParticle | ( | ) |
Definition at line 103 of file DiscParticleFunctions.cpp.
References Config, and RecordList.
|
private |
|
inline |
Definition at line 76 of file DiscParticle.h.
References ALL, ATTRIB, and RecordList.
Referenced by get_NumAttributes(), and read().
const char * DiscParticle::get_DiscType | ( | unsigned int | record = 0 , |
unsigned int | attrib = 0 |
||
) | const |
Definition at line 119 of file DiscParticleFunctions.cpp.
References get_NumRecords(), and RecordList.
Referenced by printDebug().
|
inline |
Definition at line 100 of file DiscParticle.h.
References RecordList.
Referenced by printDebug(), and read().
|
inline |
Definition at line 82 of file DiscParticle.h.
References IOMode.
|
inline |
Definition at line 95 of file DiscParticle.h.
References ALL, get_DataMode(), and RecordList.
Referenced by printDebug(), and read().
|
inline |
unsigned int DiscParticle::get_NumLocalParticles | ( | unsigned int | record = 0 | ) | const |
Definition at line 133 of file DiscParticleFunctions.cpp.
References RecordList.
|
inline |
Definition at line 71 of file DiscParticle.h.
References RecordList.
Referenced by get_DiscType(), printDebug(), read(), and write().
|
inline |
Definition at line 65 of file DiscParticle.h.
References ConfigOK.
|
inline |
Definition at line 106 of file DiscParticle.h.
References TypeString.
|
private |
Definition at line 65 of file DiscParticleFunctions.cpp.
References IpplInfo::abort(), APPEND, BaseFile, Config, ConfigOK, CurrentOffset, INPUT, IOMode, DiscConfig::ok(), OUTPUT, read_meta(), and TypeString.
Referenced by DiscParticle().
|
private |
Definition at line 144 of file DiscParticleFunctions.cpp.
References endl(), ERRORMSG, and IpplInfo::myNode().
Referenced by read(), write(), and write_meta().
|
private |
void DiscParticle::printDebug | ( | ) |
Definition at line 686 of file DiscParticleFunctions.cpp.
void DiscParticle::printDebug | ( | std::ostream & | outmsg | ) |
Definition at line 688 of file DiscParticleFunctions.cpp.
References a, BaseFile, Config, CurrentOffset, endl(), get_DiscType(), get_ElemByteSize(), get_NumAttributes(), get_NumGlobalParticles(), get_NumRecords(), DiscConfig::getNumFiles(), INFORM_ALL_NODES, DiscConfig::printDebug(), and RecordList.
|
inline |
Definition at line 142 of file DiscParticle.h.
References a, ALL, Config, ConfigOK, IpplParticleBase< PLayout >::destroy(), ParticleAttribBase::elementSize(), endl(), ERRORMSG, get_DataMode(), get_ElemByteSize(), get_NumAttributes(), get_NumRecords(), IpplParticleBase< PLayout >::getAttribute(), DiscConfig::getFilename(), IpplParticleBase< PLayout >::getLocalNum(), IpplParticleBase< PLayout >::getMessageAndCreate(), DiscConfig::getNumFiles(), DiscConfig::getSMPBox0(), INPUT, IOMode, IpplInfo::myNode(), IpplParticleBase< PLayout >::numAttributes(), open_file(), PAssert, Message::put(), Message::putmsg(), read_data(), read_meta(), RecordList, Message::setCopy(), Message::setDelete(), and IpplParticleBase< PLayout >::update().
|
inline |
Definition at line 250 of file DiscParticle.h.
References ATTRIB, Config, ConfigOK, ParticleAttrib< T >::destroy(), ParticleAttribBase::elementSize(), endl(), ERRORMSG, get_DataMode(), get_ElemByteSize(), get_NumRecords(), DiscConfig::getFilename(), ParticleAttrib< T >::getMessage(), DiscConfig::getNumFiles(), DiscConfig::getSMPBox0(), INPUT, IOMode, IpplInfo::myNode(), open_file(), PAssert, Message::putmsg(), read_data(), read_meta(), RecordList, Message::setCopy(), Message::setDelete(), and ParticleAttrib< T >::size().
|
private |
Definition at line 645 of file DiscParticleFunctions.cpp.
References endl(), ERRORMSG, and RecordList.
Referenced by read().
|
private |
Definition at line 245 of file DiscParticleFunctions.cpp.
References DiscMeta::begin(), IpplInfo::Comm, Config, ConfigOK, CurrentOffset, DF_READ_META_TAG, DF_TAG_CYCLE, DiscMeta::end(), endl(), ERRORMSG, DiscConfig::fileSMPs(), Message::get(), DiscConfig::getFilename(), getMessage(), DiscConfig::getNumFiles(), DiscConfig::getNumOtherSMP(), DiscConfig::getNumSMPNodes(), DiscConfig::getOtherSMP(), DiscConfig::getSMPBox0(), DiscConfig::getSMPNode(), IpplInfo::myNode(), DiscConfig::mySMP(), Hypervolume::n, TagMaker::next_tag(), PAssert, Message::put(), putMessage(), Communicate::receive_block(), RecordList, Communicate::send(), DiscMeta::size(), and TypeString.
Referenced by initialize(), read(), and write().
|
inline |
Definition at line 338 of file DiscParticle.h.
References a, APPEND, Communicate::barrier(), IpplInfo::Comm, COMM_ANY_NODE, Config, ConfigOK, ParticleAttribBase::elementSize(), endl(), ERRORMSG, FB_TAG_CYCLE, FB_WRITE_TAG, get_NumRecords(), IpplParticleBase< PLayout >::getAttribute(), DiscConfig::getFilename(), IpplParticleBase< PLayout >::getLocalNum(), DiscConfig::getNumOtherSMP(), DiscConfig::getNumSMPNodes(), DiscConfig::getOtherSMP(), DiscConfig::getSMPBox0(), IpplParticleBase< PLayout >::getTotalNum(), Options::info, INPUT, IOMode, IpplInfo::myNode(), TagMaker::next_tag(), IpplParticleBase< PLayout >::numAttributes(), open_file(), PAssert, IpplParticleBase< PLayout >::putMessage(), read_meta(), Communicate::receive_block(), RecordList, Communicate::send(), ParticleAttribBase::typeString(), write_data(), and write_meta().
|
inline |
Definition at line 465 of file DiscParticle.h.
References APPEND, Communicate::barrier(), IpplInfo::Comm, COMM_ANY_NODE, Config, ConfigOK, ParticleAttribBase::elementSize(), endl(), ERRORMSG, FB_TAG_CYCLE, FB_WRITE_TAG, get_NumRecords(), DiscConfig::getFilename(), DiscConfig::getNumOtherSMP(), DiscConfig::getNumSMPNodes(), DiscConfig::getOtherSMP(), DiscConfig::getSMPBox0(), Options::info, INPUT, IOMode, IpplInfo::myNode(), TagMaker::next_tag(), open_file(), PAssert, Message::put(), ParticleAttrib< T >::putMessage(), read_meta(), Communicate::receive_block(), RecordList, Communicate::send(), ParticleAttrib< T >::size(), ParticleAttribBase::typeString(), write_data(), and write_meta().
|
private |
Definition at line 571 of file DiscParticleFunctions.cpp.
References a, CurrentOffset, endl(), ERRORMSG, Options::info, and Hypervolume::n.
Referenced by write().
|
private |
Definition at line 175 of file DiscParticleFunctions.cpp.
References Config, ConfigOK, CurrentOffset, endl(), ERRORMSG, DiscConfig::fileSMPs(), DiscConfig::getFilename(), DiscConfig::getNumFiles(), DiscConfig::getSMPBox0(), INPUT, IOMode, IpplInfo::myNode(), open_file(), RecordList, and TypeString.
Referenced by write().
|
private |
Definition at line 598 of file DiscParticle.h.
Referenced by initialize(), and printDebug().
|
private |
Definition at line 591 of file DiscParticle.h.
Referenced by initialize(), printDebug(), read(), read_meta(), write(), write_meta(), and ~DiscParticle().
|
private |
Definition at line 592 of file DiscParticle.h.
Referenced by get_OK(), initialize(), read(), read_meta(), write(), and write_meta().
|
private |
Definition at line 622 of file DiscParticle.h.
Referenced by initialize(), printDebug(), read_meta(), write_data(), and write_meta().
|
private |
Definition at line 595 of file DiscParticle.h.
Referenced by get_IOMode(), initialize(), read(), write(), and write_meta().
|
private |
Definition at line 619 of file DiscParticle.h.
Referenced by get_DataMode(), get_DiscType(), get_ElemByteSize(), get_NumAttributes(), get_NumGlobalParticles(), get_NumLocalParticles(), get_NumRecords(), printDebug(), read(), read_data(), read_meta(), write(), write_meta(), and ~DiscParticle().
|
private |
Definition at line 599 of file DiscParticle.h.
Referenced by get_TypeString(), initialize(), read_meta(), and write_meta().