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);
60 auto theta = acos(sc);
63 auto const desc = (dx1 * direc);
68 auto const DTh = theta -
theta0;
75 auto const v1 = (n2 - sc * n1).normalize();
76 auto const v2 = (n1 - sc * n2).normalize();
93 return std::make_tuple(force1, force2, force3, force4);
106 auto const [ind1, ind2, ind3, ind4] =
p_ids;
122 auto const n1 = n1l / n1l.norm();
123 auto const n2 = n2l / n2l.norm();
126 auto const sc = std::min(1., n1 * n2);
Vector implementation and trait types for boost qvm interoperability.
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.
__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.
Describes a cell structure / cell system.
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.