Skip to content

Commit bf42fae

Browse files
committed
Fix comments
1 parent 9397a42 commit bf42fae

File tree

4 files changed

+21
-16
lines changed

4 files changed

+21
-16
lines changed

python/src/collisions/tangential/tangential_collision.cpp

+8-7
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void define_tangential_collision(py::module_& m)
2121
Compute the tangent basis of the collision.
2222
2323
Parameters:
24-
positions: NormalCollision stencil's vertex positions.
24+
positions: Collision stencil's vertex positions.
2525
2626
Returns:
2727
Tangent basis of the collision.
@@ -34,7 +34,7 @@ void define_tangential_collision(py::module_& m)
3434
Compute the Jacobian of the tangent basis of the collision.
3535
3636
Parameters:
37-
positions: NormalCollision stencil's vertex positions.
37+
positions: Collision stencil's vertex positions.
3838
3939
Returns:
4040
Jacobian of the tangent basis of the collision.
@@ -47,7 +47,7 @@ void define_tangential_collision(py::module_& m)
4747
Compute the barycentric coordinates of the closest point.
4848
4949
Parameters:
50-
positions: NormalCollision stencil's vertex positions.
50+
positions: Collision stencil's vertex positions.
5151
5252
Returns:
5353
Barycentric coordinates of the closest point.
@@ -60,7 +60,7 @@ void define_tangential_collision(py::module_& m)
6060
Compute the Jacobian of the barycentric coordinates of the closest point.
6161
6262
Parameters:
63-
positions: NormalCollision stencil's vertex positions.
63+
positions: Collision stencil's vertex positions.
6464
6565
Returns:
6666
Jacobian of the barycentric coordinates of the closest point.
@@ -72,7 +72,7 @@ void define_tangential_collision(py::module_& m)
7272
Compute the relative velocity of the collision.
7373
7474
Parameters:
75-
positions: NormalCollision stencil's vertex velocities.
75+
positions: Collision stencil's vertex velocities.
7676
7777
Returns:
7878
Relative velocity of the collision.
@@ -121,9 +121,10 @@ void define_tangential_collision(py::module_& m)
121121
.def_readwrite(
122122
"normal_force_magnitude",
123123
&TangentialCollision::normal_force_magnitude,
124-
"NormalCollision force magnitude")
124+
"Normal force magnitude")
125125
.def_readwrite(
126-
"mu", &TangentialCollision::mu, "Coefficient of friction")
126+
"mu", &TangentialCollision::mu,
127+
"Ratio between normal and tangential forces (e.g., friction coefficient)")
127128
.def_readwrite("weight", &TangentialCollision::weight, "Weight")
128129
.def_property(
129130
"weight_gradient",

python/src/potentials/friction_potential.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ void define_friction_potential(py::module_& m)
1919
py::arg("eps_v"))
2020
.def_property(
2121
"eps_v", &FrictionPotential::eps_v, &FrictionPotential::set_eps_v,
22-
"Get the smooth friction mollifier parameter :math:`\epsilon_v`.");
22+
"The smooth friction mollifier parameter :math:`\\epsilon_{v}`.");
2323
}

python/src/potentials/potential.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
namespace py = pybind11;
66
using namespace ipc;
77

8+
/// @brief Define the methods of the templated generic Potential class.
9+
/// @tparam TCollisions Type of the collisions.
10+
/// @tparam PyClass The pybind11 class to define the methods on.
11+
/// @param potential The pybind11 class to define the methods on.
812
template <typename TCollisions, typename PyClass>
913
void define_potential_methods(PyClass& potential)
1014
{

src/ipc/collisions/tangential/tangential_collision.hpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class TangentialCollision : virtual public CollisionStencil {
1414
protected:
1515
/// @brief Initialize the collision.
1616
/// @param collision NormalCollision stencil.
17-
/// @param positions NormalCollision stencil's vertex positions.
17+
/// @param positions Collision stencil's vertex positions.
1818
/// @param normal_potential Barrier potential used for normal force.
1919
/// @param barrier_stiffness Barrier potential stiffness.
2020
void init(
@@ -35,31 +35,31 @@ class TangentialCollision : virtual public CollisionStencil {
3535
// -- Abstract methods -----------------------------------------------------
3636

3737
/// @brief Compute the tangent basis of the collision.
38-
/// @param positions NormalCollision stencil's vertex positions.
38+
/// @param positions Collision stencil's vertex positions.
3939
/// @return Tangent basis of the collision.
4040
virtual MatrixMax<double, 3, 2>
4141
compute_tangent_basis(const VectorMax12d& positions) const = 0;
4242

4343
/// @brief Compute the Jacobian of the tangent basis of the collision.
44-
/// @param positions NormalCollision stencil's vertex positions.
44+
/// @param positions Collision stencil's vertex positions.
4545
/// @return Jacobian of the tangent basis of the collision.
4646
virtual MatrixMax<double, 36, 2>
4747
compute_tangent_basis_jacobian(const VectorMax12d& positions) const = 0;
4848

4949
/// @brief Compute the barycentric coordinates of the closest point.
50-
/// @param positions NormalCollision stencil's vertex positions.
50+
/// @param positions Collision stencil's vertex positions.
5151
/// @return Barycentric coordinates of the closest point.
5252
virtual VectorMax2d
5353
compute_closest_point(const VectorMax12d& positions) const = 0;
5454

5555
/// @brief Compute the Jacobian of the barycentric coordinates of the closest point.
56-
/// @param positions NormalCollision stencil's vertex positions.
56+
/// @param positions Collision stencil's vertex positions.
5757
/// @return Jacobian of the barycentric coordinates of the closest point.
5858
virtual MatrixMax<double, 2, 12>
5959
compute_closest_point_jacobian(const VectorMax12d& positions) const = 0;
6060

6161
/// @brief Compute the relative velocity of the collision.
62-
/// @param positions NormalCollision stencil's vertex velocities.
62+
/// @param positions Collision stencil's vertex velocities.
6363
/// @return Relative velocity of the collision.
6464
virtual VectorMax3d
6565
relative_velocity(const VectorMax12d& velocities) const = 0;
@@ -85,10 +85,10 @@ class TangentialCollision : virtual public CollisionStencil {
8585
const VectorMax2d& closest_point) const = 0;
8686

8787
public:
88-
/// @brief NormalCollision force magnitude
88+
/// @brief Normal force magnitude
8989
double normal_force_magnitude;
9090

91-
/// @brief Coefficient of friction
91+
/// @brief Ratio between normal and tangential forces (e.g., friction coefficient)
9292
double mu;
9393

9494
/// @brief Weight

0 commit comments

Comments
 (0)