33#include <Kokkos_Core.hpp>
77 auto const &
iaparams = *bonded_ias.at(bond_id);
79 auto const pos1 = aosoa.get_vector_at(aosoa.position, i);
80 auto const pos2 = aosoa.get_vector_at(aosoa.position,
j);
82 std::optional<Utils::Matrix<double, 3, 3>>
pressure =
86 aosoa.charge(i) * aosoa.charge(
j)
94 for (std::size_t k = 0; k < 9; ++k)
96 layout.tensor_offset(layout.bonded_idx(bond_id), k)) +=
132 auto const &
iaparams = *bonded_ias.at(bond_id);
134 auto const pos1 = aosoa.get_vector_at(aosoa.position, i);
135 auto const pos2 = aosoa.get_vector_at(aosoa.position,
j);
136 auto const pos3 = aosoa.get_vector_at(aosoa.position, k);
138 std::optional<Utils::Matrix<double, 3, 3>>
pressure =
144 for (std::size_t k2 = 0; k2 < 9; ++k2)
146 layout.tensor_offset(layout.bonded_idx(bond_id), k2)) +=
149 std::array<int, 2>
pids = {aosoa.id(
j), aosoa.id(k)};
183 auto const &
iaparams = *bonded_ias.at(bond_id);
185 auto const pos1 = aosoa.get_vector_at(aosoa.position, i);
186 auto const pos2 = aosoa.get_vector_at(aosoa.position,
j);
187 auto const pos3 = aosoa.get_vector_at(aosoa.position, k);
188 auto const pos4 = aosoa.get_vector_at(aosoa.position, m);
190 std::optional<Utils::Matrix<double, 3, 3>>
pressure =
196 for (std::size_t
k3 = 0;
k3 < 9; ++
k3)
198 layout.tensor_offset(layout.bonded_idx(bond_id),
k3)) +=
201 std::array<int, 3>
pids = {aosoa.id(
j), aosoa.id(k), aosoa.id(m)};
Vector implementation and trait types for boost qvm interoperability.
#define ESPRESSO_ATTR_ALWAYS_INLINE
void bond_broken_error(int id, std::span< const int > partner_ids)
container for bonded interactions.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
void flatten(Range const &v, OutputIterator out)
Flatten a range of ranges.
std::optional< Utils::Matrix< double, 3, 3 > > calc_bonded_four_body_pressure_tensor(Bonded_IA_Parameters const &iaparams, Utils::Vector3d const &pos1, Utils::Vector3d const &pos2, Utils::Vector3d const &pos3, Utils::Vector3d const &pos4, BoxGeometry const &box_geo)
std::optional< Utils::Matrix< double, 3, 3 > > calc_bonded_three_body_pressure_tensor(Bonded_IA_Parameters const &iaparams, Utils::Vector3d const &pos1, Utils::Vector3d const &pos2, Utils::Vector3d const &pos3, BoxGeometry const &box_geo)
std::optional< Utils::Matrix< double, 3, 3 > > calc_bonded_virial_pressure_tensor(Bonded_IA_Parameters const &iaparams, Utils::Vector3d const &pos1, Utils::Vector3d const &pos2, BoxGeometry const &box_geo, Coulomb::ShortRangeForceKernel::kernel_type const *kernel, double q1q2)
BondsPressureKernelData data
LocalBondState::AngleBondIDType bond_ids
ESPRESSO_ATTR_ALWAYS_INLINE KOKKOS_INLINE_FUNCTION void operator()(std::size_t idx) const
LocalBondState::AngleBondlistType bond_list
AngleBondsPressureKernel(BondsPressureKernelData data_, LocalBondState::AngleBondlistType bond_list_, LocalBondState::AngleBondIDType bond_ids_)
Kokkos::View< double **, Kokkos::LayoutRight > local_pressure
BondedInteractionsMap const & bonded_ias
CellStructure::AoSoA_pack const & aosoa
BoxGeometry const & box_geo
Solver::ShortRangeForceKernel kernel_type
ESPRESSO_ATTR_ALWAYS_INLINE KOKKOS_INLINE_FUNCTION void operator()(std::size_t idx) const
LocalBondState::DihedralBondIDType bond_ids
DihedralBondsPressureKernel(BondsPressureKernelData data_, LocalBondState::DihedralBondlistType bond_list_, LocalBondState::DihedralBondIDType bond_ids_)
LocalBondState::DihedralBondlistType bond_list
BondsPressureKernelData data
Kokkos::View< int *[4], Kokkos::LayoutRight > DihedralBondlistType
Kokkos::View< int *[2], Kokkos::LayoutRight > PairBondlistType
Kokkos::View< int *, Kokkos::LayoutRight > DihedralBondIDType
Kokkos::View< int *[3], Kokkos::LayoutRight > AngleBondlistType
Kokkos::View< int *, Kokkos::LayoutRight > PairBondIDType
Kokkos::View< int *, Kokkos::LayoutRight > AngleBondIDType
ESPRESSO_ATTR_ALWAYS_INLINE KOKKOS_INLINE_FUNCTION void operator()(std::size_t idx) const
BondsPressureKernelData data
LocalBondState::PairBondIDType bond_ids
PairBondsPressureKernel(BondsPressureKernelData data_, LocalBondState::PairBondlistType bond_list_, LocalBondState::PairBondIDType bond_ids_, Coulomb::ShortRangeForceKernel::kernel_type const *coulomb_f_kernel_)
Coulomb::ShortRangeForceKernel::kernel_type const *const coulomb_f_kernel
LocalBondState::PairBondlistType bond_list