Skip to content

Update dependencies #30

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

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ set(TIGHT_INCLUSION_WITH_NO_ZERO_TOI OFF CACHE BOOL "Enable refinement if CCD pr
add_library(ipc_rigid
src/autodiff/autodiff.cpp


src/utils/sinc.cpp

src/ccd/impact.cpp
src/ccd/ccd.cpp
src/ccd/linear/broad_phase.cpp
src/ccd/piecewise_linear/time_of_impact.cpp
src/interval/filib_rounding.cpp
src/interval/interval.cpp
src/interval/interval_root_finder.cpp
src/ccd/rigid/broad_phase.cpp
src/ccd/rigid/rigid_body_hash_grid.cpp
Expand Down Expand Up @@ -193,10 +194,6 @@ target_link_libraries(ipc_rigid PUBLIC spdlog::spdlog)
include(finite_diff)
target_link_libraries(ipc_rigid PUBLIC finitediff::finitediff)

# Boost
include(boost)
target_link_libraries(ipc_rigid PUBLIC Boost::boost)

# TBB
include(onetbb)
target_link_libraries(ipc_rigid PUBLIC TBB::tbb)
Expand Down
66 changes: 0 additions & 66 deletions cmake/recipes/boost.cmake

This file was deleted.

9 changes: 1 addition & 8 deletions src/SimState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,7 @@ bool SimState::init(const nlohmann::json& args_in)
"energy_conv_tol": null,
"velocity_conv_tol": null,
"is_velocity_conv_tol_abs": false,
"line_search_lower_bound": null,
"linear_solver": {
"name": "Eigen::SimplicialLDLT",
"max_iter": 1000,
"tolerance": 1e-10,
"pre_max_iter": 1,
"mtype": 2
}
"line_search_lower_bound": null
},
"ipc_solver": {
"dhat_epsilon": 1e-9,
Expand Down
2 changes: 1 addition & 1 deletion src/ccd/rigid/rigid_body_bvh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ inline AABB vertex_aabb(const VectorMax3I& v, double inflation_radius = 0)
VectorMax3d min(v.size());
VectorMax3d max(v.size());
for (int i = 0; i < v.size(); i++) {
if (empty(v(i))) {
if (v(i).is_empty()) {
throw "interval is empty";
}
min(i) = (v(i) - inflation_radius).lower();
Expand Down
6 changes: 3 additions & 3 deletions src/ccd/rigid/rigid_body_hash_grid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ int RigidBodyHashGrid::compute_vertices_intervals(

// If the vertices' intervals are outside the scene bbox, then split t in
// hopes that a smaller interval will be more accurate.
std::pair<Interval, Interval> t_halves = bisect(t);
std::pair<Interval, Interval> t_halves = t.bisect();
MatrixXI V_first, V_second;
int n_subs0 = compute_vertices_intervals(
body, pose_t0, pose_t1, V_first, inflation_radius, t_halves.first,
Expand All @@ -236,7 +236,7 @@ int RigidBodyHashGrid::compute_vertices_intervals(
// Take the hull of the two halves of the vertices' trajectories
for (int i = 0; i < vertices.rows(); i++) {
for (int j = 0; j < vertices.cols(); j++) {
vertices(i, j) = hull(V_first(i, j), V_second(i, j));
vertices(i, j) = V_first(i, j) | V_second(i, j);
assert(vertices(i, j).lower() - inflation_radius >= m_domainMin(j));
assert(vertices(i, j).upper() + inflation_radius <= m_domainMax(j));
}
Expand All @@ -253,7 +253,7 @@ intervals_to_AABB(const Eigen::MatrixBase<Derived>& x, double inflation_radius)
VectorMax3d min(x.size());
VectorMax3d max(x.size());
for (int i = 0; i < x.size(); i++) {
if (empty(x(i))) {
if (x(i).is_empty()) {
throw "interval is empty";
}
min(i) = x(i).lower() - inflation_radius;
Expand Down
2 changes: 1 addition & 1 deletion src/ccd/rigid/time_of_impact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ bool compute_face_vertex_time_of_impact(
const auto is_domain_valid = [&](const VectorMax3I& params) {
const Interval &t = params[0], &u = params[1], &v = params[2];
// 0 ≤ t, u, v ≤ 1 is satisfied by the initial domain of the solve
return overlap(u + v, Interval(0, 1));
return (u + v).overlaps(Interval(0, 1));
};

Eigen::Vector3d tol = compute_face_vertex_tolerance(
Expand Down
4 changes: 2 additions & 2 deletions src/geometry/intersection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ bool is_point_along_edge(

Interval alpha = point_edge_closest_point(p, e0, e1);
// Check this in case empty intervals are not allowed
if (!overlap(alpha, Interval(0, 1))) {
if (!alpha.overlaps(Interval(0, 1))) {
return false;
}
Interval valid_alpha = boost::numeric::intersect(alpha, Interval(0, 1));
Interval valid_alpha = alpha & Interval(0, 1);

// Check the distance to the closest point is small
VectorMax3I edge_to_point = e0 + valid_alpha * e - p;
Expand Down
Loading
Loading