ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Types | Public Member Functions | Public Attributes | List of all members
CellDataSoA Class Reference

Structure of Arrays for vectorized force calculation. More...

#include <CellDataSoA.h>

Inheritance diagram for CellDataSoA:
CellDataSoABase

Public Types

enum class  QuantityType { MOL_POSITION , CENTER_POSITION , FORCE , VIRIAL }
 

Public Member Functions

 CellDataSoA (size_t mol_arg, size_t ljc_arg, size_t charges_arg, size_t dipoles_arg, size_t quadrupoles_arg)
 
vcp_inline vcp_real_calc * getBeginCalc (QuantityType qt, SiteType st, CoordinateType coord)
 Get Pointer to the beginning of the specified data. More...
 
vcp_inline const vcp_real_calc * getBeginCalc (QuantityType qt, SiteType st, CoordinateType coord) const
 
vcp_inline vcp_real_accum * getBeginAccum (QuantityType qt, SiteType st, CoordinateType coord)
 
vcp_inline const vcp_real_accum * getBeginAccum (QuantityType qt, SiteType st, CoordinateType coord) const
 
vcp_inline std::array< vcp_real_calc, 3 > getTripletCalc (QuantityType qt, SiteType st, size_t index) const
 Get a triplet of data from a ConcatenatedSites at specific index.
 
vcp_inline std::array< vcp_real_accum, 3 > getTripletAccum (QuantityType qt, SiteType st, size_t index) const
 
vcp_inline void setTripletCalc (std::array< vcp_real_calc, 3 > t, QuantityType qt, SiteType st, size_t index)
 Set a triplet of data in a ConcatenatedSites to specified values.
 
vcp_inline void setTripletAccum (std::array< vcp_real_accum, 3 > t, QuantityType qt, SiteType st, size_t index)
 
void pushBackLJC (const size_t index, std::array< vcp_real_calc, 3 > moleculePos, std::array< vcp_real_calc, 3 > centerPos, vcp_ljc_id_t lookUpIndex)
 Add a set of LJC-data at position index.
 
void pushBackCharge (const size_t index, std::array< vcp_real_calc, 3 > moleculePos, std::array< vcp_real_calc, 3 > centerPos, vcp_real_calc charge)
 Add a set of charge-data at position index.
 
void pushBackDipole (const size_t index, std::array< vcp_real_calc, 3 > moleculePos, std::array< vcp_real_calc, 3 > centerPos, vcp_real_calc dipoleMoment, std::array< vcp_real_calc, 3 > orientation)
 Add a set of dipole-data at position index.
 
void pushBackQuadrupole (const size_t index, std::array< vcp_real_calc, 3 > moleculePos, std::array< vcp_real_calc, 3 > centerPos, vcp_real_calc quadrupoleMoment, std::array< vcp_real_calc, 3 > orientation)
 Add a set of quadrupole-data at position index.
 
void vcp_inline initDistLookupPointers (AlignedArray< vcp_lookupOrMask_single > &centers_dist_lookup, vcp_lookupOrMask_single *&ljc_dist_lookup, vcp_lookupOrMask_single *&charges_dist_lookup, vcp_lookupOrMask_single *&dipoles_dist_lookup, vcp_lookupOrMask_single *&quadrupoles_dist_lookup) const
 
void vcp_inline initDistLookupPointersSingle (AlignedArray< vcp_lookupOrMask_single > &centers_dist_lookup, vcp_lookupOrMask_single *&sites_dist_lookup, size_t sites_num) const
 
void resize (size_t molecules_arg, size_t ljcenters_arg, size_t charges_arg, size_t dipoles_arg, size_t quadrupoles_arg)
 
size_t getDynamicSize () const
 
- Public Member Functions inherited from CellDataSoABase
void setMolNum (size_t molNum)
 
size_t getMolNum () const
 
void incrementMolNum ()
 
void decrementMolNum ()
 

Public Attributes

size_t _ljc_num
 
size_t _charges_num
 
size_t _dipoles_num
 
size_t _quadrupoles_num
 
size_t _centers_num
 
AlignedArrayTriplet< vcp_real_calc > _mol_pos
 
AlignedArray< int > _mol_ljc_num
 
AlignedArray< int > _mol_charges_num
 
AlignedArray< int > _mol_dipoles_num
 
AlignedArray< int > _mol_quadrupoles_num
 
ConcatenatedSites< vcp_real_calc > _centers_m_r
 
ConcatenatedSites< vcp_real_calc > _centers_r
 
ConcatenatedSites< vcp_real_accum > _centers_f
 
ConcatenatedSites< vcp_real_accum > _centers_V
 
AlignedArray< vcp_ljc_id_t > _ljc_id
 
AlignedArray< vcp_real_calc > _charges_q
 
AlignedArray< vcp_real_calc > _dipoles_p
 
AlignedArrayTriplet< vcp_real_calc > _dipoles_e
 
AlignedArrayTriplet< vcp_real_accum > _dipoles_M
 
AlignedArray< vcp_real_calc > _quadrupoles_m
 
AlignedArrayTriplet< vcp_real_calc > _quadrupoles_e
 
AlignedArrayTriplet< vcp_real_accum > _quadrupoles_M
 

Detailed Description

Structure of Arrays for vectorized force calculation.

Author
Johannes Heckl, Wolfgang Eckhardt, Uwe Ehmann

Member Function Documentation

◆ getBeginCalc()

vcp_inline vcp_real_calc* CellDataSoA::getBeginCalc ( QuantityType  qt,
SiteType  st,
CoordinateType  coord 
)
inline

Get Pointer to the beginning of the specified data.

Template Parameters
qtThe Quantity you want to access, as defined in enum QuantityType
stThe site one wants to access in the quantity (LJC, CHARGE, DIPOLE or QUADRUPOLE)
coordChoose the coordinate of the site you want
Returns
Pointer to the first element of the data you requested

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