OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::BlockSnapshotManager Class Reference

#include <BlockSnapshotManager.hpp>

Inheritance diagram for OpenMD::BlockSnapshotManager:
OpenMD::SnapshotManager

Public Member Functions

 BlockSnapshotManager (SimInfo *info, const std::string &filename, int storageLayout, long long int memSize, int blockCapacity=2)
 
 ~BlockSnapshotManager ()
 
virtual SnapshotgetSnapshot (int id)
 
int getNBlocks ()
 
SnapshotBlock getSnapshotBlock (int block)
 
int getNActiveBlocks ()
 
void needCOMprops (bool ncp)
 
bool isBlockActive (int block)
 
bool loadBlock (int block)
 
bool unloadBlock (int block)
 
std::vector< int > getActiveBlocks ()
 
int getBlockCapacity ()
 
int getNFrames ()
 
- Public Member Functions inherited from OpenMD::SnapshotManager
virtual ~SnapshotManager ()
 
virtual bool advance ()
 
SnapshotgetPrevSnapshot ()
 
SnapshotgetCurrentSnapshot ()
 
int getStorageLayout ()
 

Private Member Functions

std::vector< int >::iterator findActiveBlock (int block)
 
bool hasZeroRefBlock ()
 
int getFirstZeroRefBlock ()
 
void internalLoad (int block)
 
void internalUnload (int block)
 
SnapshotloadFrame (int frame)
 

Private Attributes

SimInfoinfo_
 
int blockCapacity_
 
long long int memSize_
 
std::vector< Snapshot * > snapshots_
 
std::vector< SnapshotBlockblocks_
 
std::vector< int > activeBlocks_
 
std::vector< int > activeRefCount_
 
int nAtoms_
 
int nRigidBodies_
 
int nCutoffGroups_
 
bool usePBC_
 
DumpReaderreader_
 
int nframes_
 
int nSnapshotPerBlock_
 

Additional Inherited Members

- Protected Member Functions inherited from OpenMD::SnapshotManager
 SnapshotManager (int storageLayout)
 
- Protected Attributes inherited from OpenMD::SnapshotManager
SnapshotcurrentSnapshot_
 
SnapshotpreviousSnapshot_
 

Detailed Description

Todo:
document

Definition at line 58 of file BlockSnapshotManager.hpp.

Constructor & Destructor Documentation

◆ BlockSnapshotManager()

◆ ~BlockSnapshotManager()

OpenMD::BlockSnapshotManager::~BlockSnapshotManager ( )

Member Function Documentation

◆ findActiveBlock()

std::vector<int>::iterator OpenMD::BlockSnapshotManager::findActiveBlock ( int  block)
inlineprivate

◆ getActiveBlocks()

std::vector< int > OpenMD::BlockSnapshotManager::getActiveBlocks ( )

Definition at line 258 of file BlockSnapshotManager.cpp.

References activeBlocks_, and OpenMD::copy_if().

Referenced by isBlockActive().

◆ getBlockCapacity()

int OpenMD::BlockSnapshotManager::getBlockCapacity ( )
inline

Definition at line 93 of file BlockSnapshotManager.hpp.

References blockCapacity_, and getNFrames().

◆ getFirstZeroRefBlock()

int OpenMD::BlockSnapshotManager::getFirstZeroRefBlock ( )
private

Definition at line 251 of file BlockSnapshotManager.cpp.

References activeBlocks_, and activeRefCount_.

Referenced by findActiveBlock(), and loadBlock().

◆ getNActiveBlocks()

int OpenMD::BlockSnapshotManager::getNActiveBlocks ( )

Definition at line 157 of file BlockSnapshotManager.cpp.

References activeBlocks_.

Referenced by getSnapshotBlock(), and loadBlock().

◆ getNBlocks()

int OpenMD::BlockSnapshotManager::getNBlocks ( )
inline

◆ getNFrames()

int OpenMD::BlockSnapshotManager::getNFrames ( )

◆ getSnapshot()

◆ getSnapshotBlock()

◆ hasZeroRefBlock()

bool OpenMD::BlockSnapshotManager::hasZeroRefBlock ( )
private

Definition at line 246 of file BlockSnapshotManager.cpp.

References activeRefCount_.

Referenced by findActiveBlock(), and loadBlock().

◆ internalLoad()

void OpenMD::BlockSnapshotManager::internalLoad ( int  block)
private

◆ internalUnload()

void OpenMD::BlockSnapshotManager::internalUnload ( int  block)
private

Definition at line 235 of file BlockSnapshotManager.cpp.

References activeBlocks_, blocks_, OpenMD::first, and snapshots_.

Referenced by findActiveBlock(), loadBlock(), and unloadBlock().

◆ isBlockActive()

◆ loadBlock()

◆ loadFrame()

◆ needCOMprops()

void OpenMD::BlockSnapshotManager::needCOMprops ( bool  ncp)

◆ unloadBlock()

Member Data Documentation

◆ activeBlocks_

std::vector<int> OpenMD::BlockSnapshotManager::activeBlocks_
private

◆ activeRefCount_

std::vector<int> OpenMD::BlockSnapshotManager::activeRefCount_
private

◆ blockCapacity_

int OpenMD::BlockSnapshotManager::blockCapacity_
private

Definition at line 114 of file BlockSnapshotManager.hpp.

Referenced by BlockSnapshotManager(), getBlockCapacity(), and loadBlock().

◆ blocks_

std::vector<SnapshotBlock> OpenMD::BlockSnapshotManager::blocks_
private

◆ info_

SimInfo* OpenMD::BlockSnapshotManager::info_
private

Definition at line 113 of file BlockSnapshotManager.hpp.

◆ memSize_

long long int OpenMD::BlockSnapshotManager::memSize_
private

Definition at line 115 of file BlockSnapshotManager.hpp.

Referenced by BlockSnapshotManager().

◆ nAtoms_

int OpenMD::BlockSnapshotManager::nAtoms_
private

Definition at line 122 of file BlockSnapshotManager.hpp.

Referenced by BlockSnapshotManager(), and loadFrame().

◆ nCutoffGroups_

int OpenMD::BlockSnapshotManager::nCutoffGroups_
private

Definition at line 124 of file BlockSnapshotManager.hpp.

Referenced by BlockSnapshotManager(), and loadFrame().

◆ nframes_

int OpenMD::BlockSnapshotManager::nframes_
private

Definition at line 128 of file BlockSnapshotManager.hpp.

Referenced by BlockSnapshotManager().

◆ nRigidBodies_

int OpenMD::BlockSnapshotManager::nRigidBodies_
private

Definition at line 123 of file BlockSnapshotManager.hpp.

Referenced by BlockSnapshotManager(), and loadFrame().

◆ nSnapshotPerBlock_

int OpenMD::BlockSnapshotManager::nSnapshotPerBlock_
private

Definition at line 129 of file BlockSnapshotManager.hpp.

Referenced by BlockSnapshotManager().

◆ reader_

DumpReader* OpenMD::BlockSnapshotManager::reader_
private

◆ snapshots_

std::vector<Snapshot*> OpenMD::BlockSnapshotManager::snapshots_
private

◆ usePBC_

bool OpenMD::BlockSnapshotManager::usePBC_
private

Definition at line 125 of file BlockSnapshotManager.hpp.

Referenced by BlockSnapshotManager(), and loadFrame().


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