MRMD 0.4.0
Multi Resolution Molecular Dynamics
Loading...
Searching...
No Matches
mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE > Class Template Reference

Data structure for storing information about atoms on the host and the device. More...

#include <data/Atoms.hpp>

Public Types

enum  Props {
  POS = 0 , VEL = 1 , FORCE = 2 , TYPE = 3 ,
  MASS = 4 , CHARGE = 5 , RELATIVE_MASS = 6
}
 
using DataTypes = Cabana::MemberTypes< real_t[DIMENSIONS], real_t[DIMENSIONS], real_t[DIMENSIONS], idx_t, real_t, real_t, real_t >
 
using AtomsT = Cabana::AoSoA< DataTypes, typename DEVICE_TYPE::memory_space, VECTOR_LENGTH >
 
using pos_t = typename AtomsT::template member_slice_type< POS >
 
using vel_t = typename AtomsT::template member_slice_type< VEL >
 
using force_t = typename AtomsT::template member_slice_type< FORCE >
 
using type_t = typename AtomsT::template member_slice_type< TYPE >
 
using mass_t = typename AtomsT::template member_slice_type< MASS >
 
using charge_t = typename AtomsT::template member_slice_type< CHARGE >
 
using relative_mass_t = typename AtomsT::template member_slice_type< RELATIVE_MASS >
 

Public Member Functions

KOKKOS_FORCEINLINE_FUNCTION pos_t getPos () const
 
KOKKOS_FORCEINLINE_FUNCTION vel_t getVel () const
 
KOKKOS_FORCEINLINE_FUNCTION force_t getForce () const
 
KOKKOS_FORCEINLINE_FUNCTION type_t getType () const
 
KOKKOS_FORCEINLINE_FUNCTION charge_t getMass () const
 
KOKKOS_FORCEINLINE_FUNCTION charge_t getCharge () const
 
KOKKOS_FORCEINLINE_FUNCTION relative_mass_t getRelativeMass () const
 
void setForce (const real_t &val) const
 
void sliceAll ()
 
KOKKOS_INLINE_FUNCTION auto size () const
 
KOKKOS_INLINE_FUNCTION auto numSoA () const
 
KOKKOS_INLINE_FUNCTION auto arraySize (size_t s) const
 
void resize (size_t size)
 
void permute (LinkedCellList &linkedCellList) const
 
KOKKOS_INLINE_FUNCTION void copy (const idx_t dst, const idx_t src) const
 
void removeGhostAtoms ()
 
auto & getAoSoA () const
 
 GeneralAtoms (const idx_t numAtoms)
 
template<class DEVICE_TYPE_SRC , bool DEVICE_SRC>
 GeneralAtoms (const GeneralAtoms< DEVICE_TYPE_SRC, DEVICE_SRC > &atoms)
 

Public Attributes

idx_t numLocalAtoms = 0
 
idx_t numGhostAtoms = 0
 

Detailed Description

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
class mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >

Data structure for storing information about atoms on the host and the device.

Template Parameters
DEVICE_TYPEmemory location, HostType or DeviceType
DEVICEartificial parameter to distinguish classes if HostType==DeviceType for CPU backends

Member Typedef Documentation

◆ AtomsT

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
using mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::AtomsT = Cabana::AoSoA<DataTypes, typename DEVICE_TYPE::memory_space, VECTOR_LENGTH>

◆ charge_t

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
using mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::charge_t = typename AtomsT::template member_slice_type<CHARGE>

◆ DataTypes

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
using mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::DataTypes = Cabana::MemberTypes<real_t[DIMENSIONS], real_t[DIMENSIONS], real_t[DIMENSIONS], idx_t, real_t, real_t, real_t>

◆ force_t

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
using mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::force_t = typename AtomsT::template member_slice_type<FORCE>

◆ mass_t

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
using mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::mass_t = typename AtomsT::template member_slice_type<MASS>

◆ pos_t

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
using mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::pos_t = typename AtomsT::template member_slice_type<POS>

◆ relative_mass_t

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
using mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::relative_mass_t = typename AtomsT::template member_slice_type<RELATIVE_MASS>

◆ type_t

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
using mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::type_t = typename AtomsT::template member_slice_type<TYPE>

◆ vel_t

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
using mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::vel_t = typename AtomsT::template member_slice_type<VEL>

Member Enumeration Documentation

◆ Props

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
enum mrmd::data::impl::GeneralAtoms::Props
Enumerator
POS 
VEL 
FORCE 
TYPE 
MASS 
CHARGE 
RELATIVE_MASS 

relative mass of the atom in relation to the molecule

Constructor & Destructor Documentation

◆ GeneralAtoms() [1/2]

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::GeneralAtoms ( const idx_t  numAtoms)
inlineexplicit

◆ GeneralAtoms() [2/2]

template<class DEVICE_TYPE , bool DEVICE>
template<class DEVICE_TYPE_SRC , bool DEVICE_SRC>
mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::GeneralAtoms ( const GeneralAtoms< DEVICE_TYPE_SRC, DEVICE_SRC > &  atoms)
explicit

Member Function Documentation

◆ arraySize()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
KOKKOS_INLINE_FUNCTION auto mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::arraySize ( size_t  s) const
inline

◆ copy()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
KOKKOS_INLINE_FUNCTION void mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::copy ( const idx_t  dst,
const idx_t  src 
) const
inline

◆ getAoSoA()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
auto & mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::getAoSoA ( ) const
inline

◆ getCharge()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
KOKKOS_FORCEINLINE_FUNCTION charge_t mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::getCharge ( ) const
inline

◆ getForce()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
KOKKOS_FORCEINLINE_FUNCTION force_t mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::getForce ( ) const
inline

◆ getMass()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
KOKKOS_FORCEINLINE_FUNCTION charge_t mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::getMass ( ) const
inline

◆ getPos()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
KOKKOS_FORCEINLINE_FUNCTION pos_t mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::getPos ( ) const
inline

◆ getRelativeMass()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
KOKKOS_FORCEINLINE_FUNCTION relative_mass_t mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::getRelativeMass ( ) const
inline

◆ getType()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
KOKKOS_FORCEINLINE_FUNCTION type_t mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::getType ( ) const
inline

◆ getVel()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
KOKKOS_FORCEINLINE_FUNCTION vel_t mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::getVel ( ) const
inline

◆ numSoA()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
KOKKOS_INLINE_FUNCTION auto mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::numSoA ( ) const
inline

◆ permute()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
void mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::permute ( LinkedCellList &  linkedCellList) const
inline

◆ removeGhostAtoms()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
void mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::removeGhostAtoms ( )
inline

◆ resize()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
void mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::resize ( size_t  size)
inline

◆ setForce()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
void mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::setForce ( const real_t &  val) const
inline

◆ size()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
KOKKOS_INLINE_FUNCTION auto mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::size ( ) const
inline

◆ sliceAll()

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
void mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::sliceAll ( )
inline

Member Data Documentation

◆ numGhostAtoms

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
idx_t mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::numGhostAtoms = 0

◆ numLocalAtoms

template<class DEVICE_TYPE = DeviceType, bool DEVICE = true>
idx_t mrmd::data::impl::GeneralAtoms< DEVICE_TYPE, DEVICE >::numLocalAtoms = 0

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