Skip to content

Commit

Permalink
cloth working
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjm97 committed Jan 16, 2024
1 parent fa8e6af commit c36bdb7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions enzyme/test/Integration/Sparse/cloth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,16 +304,16 @@ int main() {
dpos[i] = 0;
gradient_ip(pos0, edges, num_edges, faces, num_faces, flaps, num_flaps, edge_coefficient, face_coefficient, bending_stiffness, pos, dpos);

// for (size_t i=0; i<sizeof(dpos)/sizeof(dpos[0]); i++)
// printf("grad_vert[%zu] = %f\n", i, dpos[i]);
for (size_t i=0; i<sizeof(dpos)/sizeof(dpos[0]); i++)
printf("grad_vert[%zu] = %f\n", i, dpos[i]);

// Hessian
const size_t num_verts = 4;
auto hess_verts = hessian(pos0, edges, num_edges, faces, num_faces, flaps, num_flaps, edge_coefficient, face_coefficient, bending_stiffness, pos, num_verts);

// for (auto hess : hess_verts) {
// printf("i=%lu, j=%lu, val=%f", std::get<0>(hess), std::get<1>(hess), std::get<2>(hess));
// }
for (auto &hess : hess_verts) {
printf("i=%lu, j=%lu, val=%f\n", hess.row, hess.col, hess.val);
}

return 0;
}

0 comments on commit c36bdb7

Please sign in to comment.