ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Member Functions | List of all members
ConcatenatedSites< T > Class Template Reference

Class to manage the storage of ljc-, charge-, dipole- and quadrupole-data in one single AlignedArrayTriplet. More...

#include <ConcatenatedSites.h>

Public Member Functions

 ConcatenatedSites (size_t ljc_num=0, size_t charges_num=0, size_t dipoles_num=0, size_t quadrupoles_num=0)
 
vcp_inline T * getBeginPointer (ConcSites::SiteType st, ConcSites::CoordinateType coord)
 Get a Pointer to the beginning of the specified data. More...
 
vcp_inline const T * getBeginPointer (ConcSites::SiteType st, ConcSites::CoordinateType coord) const
 
vcp_inline std::array< T, 3 > getTriplet (ConcSites::SiteType st, size_t index) const
 Get the value triplet X,Y,Z of ConcSites::SiteType st at position index.
 
vcp_inline void setTriplet (std::array< T, 3 > values, ConcSites::SiteType st, size_t index)
 Set the value triplet X,Y,Z of ConcSites::SiteType st at position index to given values.
 
void resize (size_t ljc_num, size_t charges_num, size_t dipoles_num, size_t quadrupoles_num)
 Resize the ConcatenatedSites to have enough space for the given number of elements. More...
 
size_t get_dynamic_memory () const
 Get the size of currently occupied memory. More...
 

Detailed Description

template<typename T>
class ConcatenatedSites< T >

Class to manage the storage of ljc-, charge-, dipole- and quadrupole-data in one single AlignedArrayTriplet.

Template Parameters
TThe type which is to be stored in the Arrays
Author
Micha Mueller

Member Function Documentation

◆ get_dynamic_memory()

template<typename T >
size_t ConcatenatedSites< T >::get_dynamic_memory ( ) const
inline

Get the size of currently occupied memory.

Returns
Number of allocated bytes

◆ getBeginPointer()

template<typename T >
vcp_inline T* ConcatenatedSites< T >::getBeginPointer ( ConcSites::SiteType  st,
ConcSites::CoordinateType  coord 
)
inline

Get a Pointer to the beginning of the specified data.

Template Parameters
stSpecify which of the four site-types you would like to access. See enum ConcSites::SiteType for possible values
coordIndicates which of the 3 coordinates one needs. Has to be a value as specified in enum ConcSites::CoordinateType
Returns
Pointer to the first value of the data, as indicated by the parameters

◆ resize()

template<typename T >
void ConcatenatedSites< T >::resize ( size_t  ljc_num,
size_t  charges_num,
size_t  dipoles_num,
size_t  quadrupoles_num 
)
inline

Resize the ConcatenatedSites to have enough space for the given number of elements.

Template Parameters
ljc_num
charges
dipoles_num
quadrupoles_num

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