Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit ecfebca

Browse files
committed
force hessian symmetric
1 parent 80e4d59 commit ecfebca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ipc/potentials/friction_potential.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ FrictionPotential::force_jacobian(
549549
assert(rest_positions.size() == lagged_displacements.size());
550550
assert(lagged_displacements.size() == velocities.size());
551551
const int n = rest_positions.size();
552-
const int dim = n / collision.num_vertices();
553552
assert(n % collision.num_vertices() == 0);
554553

555554
// const Vector<double, -1, FrictionPotential::element_size> x =

src/ipc/smooth_contact/collisions/smooth_collision.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,8 @@ SmoothCollisionTemplate<max_vert, PrimitiveA, PrimitiveB>::hessian(
375375
gOrient(core_indices) += gBarrier * orient;
376376
orient *= barrier;
377377

378-
return hOrient;
378+
// return hOrient
379+
return (hOrient + hOrient.transpose()) / 2.;
379380
}
380381

381382
// ---- distance ----

0 commit comments

Comments
 (0)