-
Notifications
You must be signed in to change notification settings - Fork 48
Anisotropic friction #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anisotropic friction #210
Changes from 19 commits
c81799b
b711166
238f64d
daa4967
7da5f45
044d520
822c7ed
ea6f654
2ead2c0
2b759e4
cff3dbb
9b925ff
785d68c
b5d6a6d
cbbed82
a9eef3a
40d2cdd
63e723b
4ff3dc2
2519f02
d8d466c
0dcf561
b28d7e9
5140c4a
32acee0
adc9626
3b74176
e899d79
a88ac11
011132a
9bdb441
1fc71c4
4a24adf
d5ca5a0
f36fd3b
800e138
2bcb988
22bde96
b0cbc89
06e48f7
42b9946
c0e2320
2bc622c
aa028ba
92a66ea
5def3c2
d4b8063
0430354
1dedbf5
55a1367
ee1b1b3
2fec756
483bba6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,9 +104,28 @@ class TangentialCollision : virtual public CollisionStencil { | |
| /// @brief Ratio between normal and kinetic tangential forces (e.g., friction coefficient) | ||
| double mu_k = 0; | ||
|
|
||
| /// @brief Anisotropic static friction coefficients (2D, one per tangent direction). | ||
| /// @note Zero vector → scalar mu_s (backward compatible). Elliptical model; | ||
| /// see ipc::friction::smooth_mu and Erleben et al., CGF 2019, | ||
| /// DOI 10.1111/cgf.13885. | ||
|
zfergus marked this conversation as resolved.
|
||
| Eigen::Vector2d mu_s_aniso = Eigen::Vector2d::Zero(); | ||
|
|
||
| /// @brief Anisotropic kinetic friction coefficients (2D, one per tangent direction). | ||
| /// @note Zero vector → scalar mu_k (backward compatible). Elliptical model; | ||
| /// see ipc::friction::smooth_mu and Erleben et al., CGF 2019, | ||
| /// DOI 10.1111/cgf.13885. | ||
| Eigen::Vector2d mu_k_aniso = Eigen::Vector2d::Zero(); | ||
|
|
||
| /// @brief Weight | ||
| double weight = 1; | ||
|
|
||
| /// @brief Tangential anisotropy scaling in the collision's tangent basis. | ||
| /// @note Default (1,1) preserves current isotropic behavior. | ||
| /// Requires a_i > 0. Values scale tau before friction evaluation. | ||
| /// Used with mu_s_aniso/mu_k_aniso by the elliptical model in | ||
| /// ipc::friction::smooth_mu. | ||
| Eigen::Vector2d mu_aniso = Eigen::Vector2d::Ones(); | ||
|
Comment on lines
+121
to
+127
|
||
|
|
||
| /// @brief Gradient of weight with respect to all DOF | ||
| Eigen::SparseVector<double> weight_gradient; | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Python docstring for anisotropic_mu_eff_f describes (0,0) as an "isotropic fallback", but this function only evaluates the elliptical formula along a direction; it doesn't apply scalar μ_s/μ_k when axes are zero. To avoid confusing API users, please clarify that isotropic fallback is handled elsewhere (e.g., via anisotropic_mu_eff_from_tau_aniso / lagged collision coefficients) and that (0,0) is just the result for zero axes.