|
15 | 15 | using namespace ipc; |
16 | 16 |
|
17 | 17 | void check_friction_force_jacobian( |
18 | | - CollisionMesh mesh, |
| 18 | + const CollisionMesh& mesh, |
19 | 19 | const Eigen::MatrixXd& Ut, |
20 | 20 | const Eigen::MatrixXd& U, |
21 | 21 | const Constraints& constraints, |
@@ -92,6 +92,7 @@ void check_friction_force_jacobian( |
92 | 92 | Eigen::MatrixXd fd_X = fd::unflatten(x, X.cols()); |
93 | 93 |
|
94 | 94 | CollisionMesh fd_mesh(fd_X, mesh.edges(), mesh.faces()); |
| 95 | + fd_mesh.init_area_jacobians(); |
95 | 96 |
|
96 | 97 | FrictionConstraints fd_friction_constraints; |
97 | 98 | if (recompute_constraints) { |
@@ -228,6 +229,7 @@ TEST_CASE("Test friction force jacobian", "[friction][force-jacobian][thisone]") |
228 | 229 | U = V1 - X; |
229 | 230 |
|
230 | 231 | CollisionMesh mesh(X, E, F); |
| 232 | + mesh.init_area_jacobians(); |
231 | 233 |
|
232 | 234 | check_friction_force_jacobian( |
233 | 235 | mesh, Ut, U, constraints, mu, epsv_times_h, dhat, barrier_stiffness, |
@@ -303,6 +305,7 @@ TEST_CASE( |
303 | 305 | std::vector<bool> is_on_surface = |
304 | 306 | CollisionMesh::construct_is_on_surface(X.rows(), E); |
305 | 307 | CollisionMesh mesh(is_on_surface, X, E, F); |
| 308 | + mesh.init_area_jacobians(); |
306 | 309 |
|
307 | 310 | X = mesh.vertices(X); |
308 | 311 | if (Ut.rows() != X.rows()) { |
|
0 commit comments