33std::tuple<Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d>
50 auto const Ai = n1.norm();
53 auto const Aj = n2.norm();
57 auto const sc = std::min(1.0, n1 * n2);
61 auto const desc = (dx1 * direc);
62 auto const theta = std::acos(sc) * std::copysign(1., desc);
64 auto const DTh = theta -
theta0;
65 auto const Pre =
kb * DTh * std::copysign(1., theta);
67 auto const v1 = (n2 - sc * n1).normalize();
68 auto const v2 = (n1 - sc * n2).normalize();
85 return std::make_tuple(force1, force2, force3, force4);
98 auto const [ind1, ind2, ind3, ind4] =
p_ids;
114 auto const n1 = n1l / n1l.norm();
115 auto const n2 = n2l / n2l.norm();
118 auto const sc = std::min(1., n1 * n2);
Vector implementation and trait types for boost qvm interoperability.
ESPRESSO_ATTR_ALWAYS_INLINE Utils::Vector< T, 3 > get_mi_vector(const Utils::Vector< T, 3 > &a, const Utils::Vector< T, 3 > &b) const
Get the minimum-image vector between two coordinates.
Describes a cell structure / cell system.
__device__ void vector_product(float const *a, float const *b, float *out)
Utils::Vector3d get_ibm_particle_position(CellStructure const &cell_structure, int pid)
Returns the position of a given particle.
std::tuple< int, int, int, int > p_ids
Particle ids.
double theta0
Reference angle.
double kb
Bare bending modulus.
std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > calc_forces(BoxGeometry const &box_geo, Particle const &p1, Particle const &p2, Particle const &p3, Particle const &p4) const
Calculate the forces The equations can be found in Appendix C of .
void initialize(BoxGeometry const &box_geo, CellStructure const &cell_structure)
Set the IBM Tribend parameters.
Struct holding all information for one particle.