OpenMD 3.1
Molecular Dynamics in the Open
|
#include <DataStorage.hpp>
Public Member Functions | |
DataStorage (std::size_t size, int storageLayout=0) | |
std::size_t | getSize () |
return the size of this DataStorage. | |
void | resize (std::size_t newSize) |
Changes the size of this DataStorage. | |
void | reserve (std::size_t size) |
Reallocates memory manually. | |
void | copy (int source, std::size_t num, std::size_t target) |
Copies data inside DataStorage class. | |
int | getStorageLayout () |
Returns the storage layout | |
void | setStorageLayout (int layout) |
Sets the storage layout | |
RealType * | getArrayPointer (int whichArray) |
Returns the pointer of internal array. | |
Static Public Member Functions | |
static std::size_t | getBytesPerStuntDouble (int layout) |
electrostatic site potentials | |
Public Attributes | |
vector< Vector3d > | position |
vector< Vector3d > | velocity |
position array | |
vector< Vector3d > | force |
velocity array | |
vector< RotMat3x3d > | aMat |
force array | |
vector< Vector3d > | angularMomentum |
rotation matrix array | |
vector< Vector3d > | torque |
angular momentum array (body-fixed) | |
vector< RealType > | particlePot |
torque array | |
vector< RealType > | density |
particle potential arrray | |
vector< RealType > | functional |
electron density | |
vector< RealType > | functionalDerivative |
density functional | |
vector< Vector3d > | dipole |
derivative of functional | |
vector< Mat3x3d > | quadrupole |
space-frame dipole vector | |
vector< Vector3d > | electricField |
space-frame quadrupole tensor | |
vector< RealType > | skippedCharge |
local electric field | |
vector< RealType > | flucQPos |
charge skipped during normal pairwise calculation | |
vector< RealType > | flucQVel |
fluctuating charges | |
vector< RealType > | flucQFrc |
fluctuating charge velocities | |
vector< RealType > | sitePotential |
fluctuating charge forces | |
Definition at line 69 of file DataStorage.hpp.
anonymous enum |
Definition at line 71 of file DataStorage.hpp.
OpenMD::DataStorage::DataStorage | ( | ) |
Definition at line 56 of file DataStorage.cpp.
OpenMD::DataStorage::DataStorage | ( | std::size_t | size, |
int | storageLayout = 0 ) |
Definition at line 58 of file DataStorage.cpp.
void OpenMD::DataStorage::copy | ( | int | source, |
std::size_t | num, | ||
std::size_t | target ) |
Copies data inside DataStorage class.
Copy function actually calls copy for every vector in DataStorage class. One Precondition of copy is that target is not within the range [source, soruce + num]
source | |
num | number of element to be moved |
target |
Definition at line 255 of file DataStorage.cpp.
RealType * OpenMD::DataStorage::getArrayPointer | ( | int | whichArray | ) |
Returns the pointer of internal array.
Definition at line 335 of file DataStorage.cpp.
|
static |
electrostatic site potentials
Definition at line 456 of file DataStorage.cpp.
std::size_t OpenMD::DataStorage::getSize | ( | ) |
return the size of this DataStorage.
Definition at line 63 of file DataStorage.cpp.
int OpenMD::DataStorage::getStorageLayout | ( | ) |
Returns the storage layout
Definition at line 328 of file DataStorage.cpp.
void OpenMD::DataStorage::reserve | ( | std::size_t | size | ) |
Reallocates memory manually.
The main reason for using reserve() is efficiency if you know the capacity to which your vector must eventually grow, then it is usually more efficient to allocate that memory all at once.
Definition at line 215 of file DataStorage.cpp.
void OpenMD::DataStorage::resize | ( | std::size_t | newSize | ) |
Changes the size of this DataStorage.
newSize | new size of this DataStorage |
Definition at line 159 of file DataStorage.cpp.
Referenced by OpenMD::ForceMatrixDecomposition::distributeInitialData().
void OpenMD::DataStorage::setStorageLayout | ( | int | layout | ) |
Sets the storage layout
Definition at line 330 of file DataStorage.cpp.
Referenced by OpenMD::ForceMatrixDecomposition::distributeInitialData().
vector<RotMat3x3d> OpenMD::DataStorage::aMat |
force array
Definition at line 132 of file DataStorage.hpp.
vector<Vector3d> OpenMD::DataStorage::angularMomentum |
rotation matrix array
Definition at line 133 of file DataStorage.hpp.
vector<RealType> OpenMD::DataStorage::density |
particle potential arrray
Definition at line 136 of file DataStorage.hpp.
vector<Vector3d> OpenMD::DataStorage::dipole |
derivative of functional
Definition at line 139 of file DataStorage.hpp.
vector<Vector3d> OpenMD::DataStorage::electricField |
space-frame quadrupole tensor
Definition at line 141 of file DataStorage.hpp.
vector<RealType> OpenMD::DataStorage::flucQFrc |
fluctuating charge velocities
Definition at line 146 of file DataStorage.hpp.
vector<RealType> OpenMD::DataStorage::flucQPos |
charge skipped during normal pairwise calculation
Definition at line 144 of file DataStorage.hpp.
vector<RealType> OpenMD::DataStorage::flucQVel |
fluctuating charges
Definition at line 145 of file DataStorage.hpp.
vector<Vector3d> OpenMD::DataStorage::force |
velocity array
Definition at line 131 of file DataStorage.hpp.
vector<RealType> OpenMD::DataStorage::functional |
electron density
Definition at line 137 of file DataStorage.hpp.
vector<RealType> OpenMD::DataStorage::functionalDerivative |
density functional
Definition at line 138 of file DataStorage.hpp.
vector<RealType> OpenMD::DataStorage::particlePot |
torque array
Definition at line 135 of file DataStorage.hpp.
vector<Vector3d> OpenMD::DataStorage::position |
Definition at line 129 of file DataStorage.hpp.
vector<Mat3x3d> OpenMD::DataStorage::quadrupole |
space-frame dipole vector
Definition at line 140 of file DataStorage.hpp.
vector<RealType> OpenMD::DataStorage::sitePotential |
fluctuating charge forces
Definition at line 147 of file DataStorage.hpp.
vector<RealType> OpenMD::DataStorage::skippedCharge |
local electric field
Definition at line 143 of file DataStorage.hpp.
vector<Vector3d> OpenMD::DataStorage::torque |
angular momentum array (body-fixed)
Definition at line 134 of file DataStorage.hpp.
vector<Vector3d> OpenMD::DataStorage::velocity |
position array
Definition at line 130 of file DataStorage.hpp.