68 static constexpr int num = 3;
83 std::tuple<Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d>
124 auto const lambda =
len /
r0;
125 auto const spring = (std::pow(lambda, 0.5) + std::pow(lambda, -2.5)) /
126 (lambda + std::pow(lambda, -3.));
137 auto const len2 =
dx.norm2();
165 auto const f =
fac *
dx;
214 auto const h = (1. / 3.) * (
c1 +
c2 +
c3);
216 auto const t = sqrt(A /
A0) - 1.0;
218 auto const m1 =
h -
c1;
219 auto const m2 =
h -
c2;
220 auto const m3 =
h -
c3;
222 auto const fac =
kal *
A0 * (2 * t + t * t) /
223 (
m1.norm2() +
m2.norm2() +
m3.norm2());
Vector implementation and trait types for boost qvm interoperability.
auto unfolded_position(Utils::Vector3d const &pos, Utils::Vector3i const &image_box) const
Unfold particle coordinates to image box.
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.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
double angle_btw_triangles(const Vector3d &P1, const Vector3d &P2, const Vector3d &P3, const Vector3d &P4)
Computes the angle between two triangles in 3D space.
double area_triangle(const Vector3d &P1, const Vector3d &P2, const Vector3d &P3)
Computes the area of triangle between vectors P1,P2,P3, by computing the cross product P1P2 x P1P3 an...
Vector3d get_n_triangle(const Vector3d &P1, const Vector3d &P2, const Vector3d &P3)
Computes the normal vector of a triangle.
constexpr auto tiny_oif_elasticity_coefficient
Tiny OIF elasticity cutoff.
Parameters for OIF local forces.
double A02
Equilibrium surface of the second triangle.
OifLocalForcesBond(double r0, double ks, double kslin, double phi0, double kb, double A01, double A02, double kal, double kvisc)
double phi0
Equilibrium angle between the two triangles.
double r0
Equilibrium bond length of triangle edges.
double kslin
Linear stretching coefficient of triangle edges.
double kb
Bending coefficient for the angle between the two triangles.
double A01
Equilibrium surface of the first triangle.
double kvisc
Viscous coefficient of the triangle vertices.
double ks
Non-linear stretching coefficient of triangle edges.
double kal
Stretching coefficient of a triangle surface.
std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > calc_forces(BoxGeometry const &box_geo, Particle const &p2, Particle const &p1, Particle const &p3, Particle const &p4) const
Compute the OIF local forces.
Struct holding all information for one particle.