NormalAdhesionPotential¶
- class NormalAdhesionPotential : public ipc::NormalPotential;¶
The normal adhesion potential.
Public Functions¶
-
NormalAdhesionPotential(const double _dhat_p, const double _dhat_a,
const double _Y, const double _eps_c);¶
-
virtual double force_magnitude(const double distance_squared,
const double dmin,
const double barrier_stiffness) const override;¶ Compute the force magnitude for a collision.
-
virtual VectorMax12d force_magnitude_gradient(
const double distance_squared,
Eigen::ConstRef<VectorMax12d> distance_squared_gradient,
const double dmin,
const double barrier_stiffness) const override;¶ Compute the gradient of the force magnitude for a collision.
- Parameters:¶
- const double distance_squared¶
The squared distance between elements.
- Eigen::ConstRef<VectorMax12d> distance_squared_gradient¶
The gradient of the squared distance.
- const double dmin¶
The minimum distance offset to the barrier.
- const double barrier_stiffness¶
The stiffness of the barrier.
- Returns:¶
The gradient of the force.
-
VectorMax12d gradient(const NormalCollision& collision,
Eigen::ConstRef<VectorMax12d> positions) const override;¶ Compute the gradient of the potential for a single collision.
- Parameters:¶
- const NormalCollision &collision¶
The collision.
- Eigen::ConstRef<VectorMax12d> positions¶
The collision stencil’s positions.
- Returns:¶
The gradient of the potential.
-
virtual double gradient(
const double distance_squared, const double dmin = 0) const
= 0;¶ Compute the gradient of the unmollified distance-based potential for a collision.
-
MatrixMax12d hessian(const NormalCollision& collision,
Eigen::ConstRef<VectorMax12d> positions,
const PSDProjectionMethod project_hessian_to_psd
= PSDProjectionMethod::NONE) const override;¶ Compute the hessian of the potential for a single collision.
- Parameters:¶
- const NormalCollision &collision¶
The collision.
- Eigen::ConstRef<VectorMax12d> positions¶
The collision stencil’s positions.
- const PSDProjectionMethod project_hessian_to_psd = PSDProjectionMethod::NONE¶
Whether to project the hessian to the positive semi-definite cone.
- Returns:¶
The hessian of the potential.
-
virtual double hessian(
const double distance_squared, const double dmin = 0) const
= 0;¶ Compute the hessian of the unmollified distance-based potential for a collision.
Public Members¶
- double dhat_p;¶
The distance of largest adhesion force ( \(\hat{d}_p\)) ( \(0 < \hat{d}_p < \hat{d}_a\)).
- double dhat_a;¶
The adhesion activation distance ( \(\hat{d}_a\)).
- double Y;¶
The Young’s modulus ( \(Y\)).
- double eps_c;¶
The critical strain ( \(\varepsilon_c\)).
Protected Functions¶
-
virtual double operator()(const double distance_squared,
const double dmin = 0) const override;¶ Compute the barrier potential for a collision.
-
virtual double gradient(const double distance_squared,
const double dmin = 0) const override; Compute the gradient of the barrier potential for a collision.
-
virtual double hessian(const double distance_squared,
const double dmin = 0) const override; Compute the hessian of the barrier potential for a collision.
Private Types¶
- using Super = NormalPotential;¶
-
NormalAdhesionPotential(const double _dhat_p, const double _dhat_a,