33#include <Kokkos_Core.hpp>
73 auto const thread_id = omp_get_thread_num();
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 =
85#ifdef ESPRESSO_ELECTROSTATICS
86 aosoa.charge(i) * aosoa.charge(j)
94 for (std::size_t k = 0; k < 9; ++k)
95 local_pressure(thread_id,
96 layout.tensor_offset(layout.bonded_idx(bond_id), k)) +=
99 auto partner_id = aosoa.id(j);
127 auto const thread_id = omp_get_thread_num();
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)
145 local_pressure(thread_id,
146 layout.tensor_offset(layout.bonded_idx(bond_id), k2)) +=
149 std::array<int, 2> pids = {aosoa.id(j), aosoa.id(k)};
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.
void flatten(Range const &v, OutputIterator out)
Flatten a range of ranges.
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
Kokkos::View< int *[2], Kokkos::LayoutRight > PairBondlistType
Kokkos::View< int *[3], Kokkos::LayoutRight > AngleBondlistType
Kokkos::View< int *, Kokkos::LayoutRight > PairBondIDType
Kokkos::View< int *, Kokkos::LayoutRight > AngleBondIDType
KOKKOS_INLINE_FUNCTION void operator()(std::size_t) const
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